diff options
author | Andrii Nakryiko <[email protected]> | 2023-11-17 19:46:23 -0800 |
---|---|---|
committer | Alexei Starovoitov <[email protected]> | 2023-11-18 11:39:59 -0800 |
commit | 46862ee854b4f5a315d63b677ca3af14a89aefeb (patch) | |
tree | c9df3007d849646ad84684b894fa8350a6d8e949 /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | 0f8dbdbc641b45a5fa31d497f9fc83ffe1174fa3 (diff) |
bpf: emit frameno for PTR_TO_STACK regs if it differs from current one
It's possible to pass a pointer to parent's stack to child subprogs. In
such case verifier state output is ambiguous not showing whether
register container a pointer to "current" stack, belonging to current
subprog (frame), or it's actually a pointer to one of parent frames.
So emit this information if frame number differs between the state which
register is part of. E.g., if current state is in frame 2 and it has
a register pointing to stack in grand parent state (frame #0), we'll see
something like 'R1=fp[0]-16', while "local stack pointer" will be just
'R2=fp-16'.
Acked-by: Eduard Zingerman <[email protected]>
Acked-by: Stanislav Fomichev <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Alexei Starovoitov <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions