summaryrefslogtreecommitdiff
path: root/scripts/basic
diff options
context:
space:
mode:
authorSami Tolvanen <samitolvanen@google.com>2019-05-24 15:11:17 -0700
committerWill Deacon <will.deacon@arm.com>2019-05-29 13:45:59 +0100
commit0e358bd7b7ebd27e491dabed938eae254c17fe3b (patch)
treeef16e50c90b53b2ebc36409197feca2057ed2737 /scripts/basic
parent8ef8f368ce72b5e17f7c1f1ef15c38dcfd0fef64 (diff)
downloadkernel-0e358bd7b7ebd27e491dabed938eae254c17fe3b.tar.gz
arm64: use the correct function type in SYSCALL_DEFINE0
Although a syscall defined using SYSCALL_DEFINE0 doesn't accept parameters, use the correct function type to avoid indirect call type mismatches with Control-Flow Integrity checking. Signed-off-by: Sami Tolvanen <samitolvanen@google.com> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
document, from Dave. 5) Extend struct_ops libbpf APIs to allow specify version suffixes for stuct_ops map types, share the same BPF program between several map definitions, and other improvements, from Eduard. 6) Enable struct_ops support for more than one page in trampolines, from Kui-Feng. 7) Support kCFI + BPF on riscv64, from Puranjay. 8) Use bpf_prog_pack for arm64 bpf trampoline, from Puranjay. 9) Fix roundup_pow_of_two undefined behavior on 32-bit archs, from Toke. ==================== Link: https://lore.kernel.org/r/20240312003646.8692-1-alexei.starovoitov@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> selftests/bpf: Test may_goto 2024-03-06T23:18:10Z Alexei Starovoitov ast@kernel.org 2024-03-06T03:19:29Z urn:sha1:0c8bbf990bddef1a4f32889b18a4a016d9bd2cfd Add tests for may_goto instruction via cond_break macro. Signed-off-by: Alexei Starovoitov <ast@kernel.org> Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Acked-by: John Fastabend <john.fastabend@gmail.com> Tested-by: John Fastabend <john.fastabend@gmail.com> Link: https://lore.kernel.org/bpf/20240306031929.42666-5-alexei.starovoitov@gmail.com selftests/bpf: test case for callback_depth states pruning logic 2024-03-06T00:15:56Z Eduard Zingerman eddyz87@gmail.com 2024-02-22T15:41:21Z urn:sha1:5c2bc5e2f81d3344095ae241032dde20a4ea2b48 The test case was minimized from mailing list discussion [0]. It is equivalent to the following C program: struct iter_limit_bug_ctx { __u64 a; __u64 b; __u64 c; }; static __naked void iter_limit_bug_cb(void) { switch (bpf_get_prandom_u32()) { case 1: ctx->a = 42; break; case 2: ctx->b = 42; break; default: ctx->c = 42; break; } } int iter_limit_bug(struct __sk_buff *skb) { struct iter_limit_bug_ctx ctx = { 7, 7, 7 }; bpf_loop(2, iter_limit_bug_cb, &ctx, 0); if (ctx.a == 42 && ctx.b == 42 && ctx.c == 7) asm volatile("r1 /= 0;":::"r1"); return 0; } The main idea is that each loop iteration changes one of the state variables in a non-deterministic manner. Hence it is premature to prune the states that have two iterations left comparing them to states with one iteration left. E.g. {{7,7,7}, callback_depth=0} can reach state {42,42,7}, while {{7,7,7}, callback_depth=1} can't. [0] https://lore.kernel.org/bpf/9b251840-7cb8-4d17-bd23-1fc8071d8eef@linux.dev/ Acked-by: Yonghong Song <yonghong.song@linux.dev> Signed-off-by: Eduard Zingerman <eddyz87@gmail.com> Link: https://lore.kernel.org/r/20240222154121.6991-3-eddyz87@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>