aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/recursion.c
diff options
context:
space:
mode:
authorAlexei Starovoitov <ast@kernel.org>2021-02-10 10:44:19 -0800
committerAlexei Starovoitov <ast@kernel.org>2021-02-10 11:10:45 -0800
commitcf2d0a5e788bbe072cc4415572f4a3d9689cf8b8 (patch)
tree93a8834f71d6cab87fdaabd0eace79d096388f6a /tools/testing/selftests/bpf/prog_tests/recursion.c
parentee5cc0363ea0d587f62349ff3b3e2dfa751832e4 (diff)
parent0fd7562af1cd21fce4c1011825e18de1cfa97baa (diff)
downloadlinux-cf2d0a5e788bbe072cc4415572f4a3d9689cf8b8.tar.gz
linux-cf2d0a5e788bbe072cc4415572f4a3d9689cf8b8.tar.bz2
linux-cf2d0a5e788bbe072cc4415572f4a3d9689cf8b8.zip
Merge branch 'allow variable-offset stack acces'
Andrei Matei says: ==================== Before this patch, variable offset access to the stack was dissalowed for regular instructions, but was allowed for "indirect" accesses (i.e. helpers). This patch removes the restriction, allowing reading and writing to the stack through stack pointers with variable offsets. This makes stack-allocated buffers more usable in programs, and brings stack pointers closer to other types of pointers. The motivation is being able to use stack-allocated buffers for data manipulation. When the stack size limit is sufficient, allocating buffers on the stack is simpler than per-cpu arrays, or other alternatives. V2 -> V3 - var-offset writes mark all the stack slots in range as initialized, so that future reads are not rejected. - rewrote the C test to not use uprobes, as per Andrii's suggestion. - addressed other review comments from Alexei. V1 -> V2 - add support for var-offset stack writes, in addition to reads - add a C test - made variable offset direct reads no longer destroy spilled registers in the access range - address review nits ==================== Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/recursion.c')
0 files changed, 0 insertions, 0 deletions