summaryrefslogtreecommitdiff
path: root/include/linux/debugobjects.h
diff options
context:
space:
mode:
authorYonghong Song <yonghong.song@linux.dev>2026-04-23 06:35:01 +0300
committerAlexei Starovoitov <ast@kernel.org>2026-04-23 17:54:50 +0300
commit9b9f0b42703ceb88332bcb19453c4288c2683e34 (patch)
tree7b1a306c748f98a8810b3b1ac5fd261b11543501 /include/linux/debugobjects.h
parent053a48cb2a5459659a5034ad20e7d9f28bc56f16 (diff)
downloadlinux-9b9f0b42703ceb88332bcb19453c4288c2683e34.tar.xz
bpf: Prepare verifier logs for upcoming kfunc stack arguments
This change prepares verifier log reporting for upcoming kfunc stack argument support. Currently verifier log code mostly assumes that an argument can be described directly by a register number. That works for arguments passed in `R1` to `R5`, but it does not work once kfunc arguments can also be passed on the stack. Introduce an opaque `argno_t` type that encodes both register-based and arg-based references. Four helpers form the interface: - argno_from_reg(regno): create from a register number - argno_from_arg(arg): create from a 1-based arg number - reg_from_argno(a): extract register number, or -1 - arg_from_argno(a): extract arg number, or -1 reg_arg_name() converts an argno_t to a human-readable string for verifier logs: "R%d" for register arguments, or "*(R11-off)" for stack arguments beyond R5. Update selftests accordingly. Signed-off-by: Yonghong Song <yonghong.song@linux.dev> Link: https://lore.kernel.org/r/20260423033501.2539667-1-yonghong.song@linux.dev Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions