diff options
| author | Andrii Nakryiko <andrii@kernel.org> | 2023-04-05 02:53:31 +0300 |
|---|---|---|
| committer | Andrii Nakryiko <andrii@kernel.org> | 2023-04-05 02:57:30 +0300 |
| commit | e8f59d84f43deab59bb86ff9e12cd4d542a4bb34 (patch) | |
| tree | aea96c5f74e751b37c3ab587b07a783b80a90a53 /tools | |
| parent | 8fc59c26d212c23d6fd5ad47a10651cf72d83b4a (diff) | |
| parent | 69f41a787761633b752d71166786eb642bad4913 (diff) | |
| download | linux-e8f59d84f43deab59bb86ff9e12cd4d542a4bb34.tar.xz | |
Merge branch 'bpf: Follow up to RCU enforcement in the verifier.'
Alexei Starovoitov says:
====================
From: Alexei Starovoitov <ast@kernel.org>
The patch set is addressing a fallout from
commit 6fcd486b3a0a ("bpf: Refactor RCU enforcement in the verifier.")
It was too aggressive with PTR_UNTRUSTED marks.
Patches 1-6 are cleanup and adding verifier smartness to address real
use cases in bpf programs that broke with too aggressive PTR_UNTRUSTED.
The partial revert is done in patch 7 anyway.
====================
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/testing/selftests/bpf/progs/test_sk_storage_tracing.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/progs/test_sk_storage_tracing.c b/tools/testing/selftests/bpf/progs/test_sk_storage_tracing.c index 6dc1f28fc4b6..02e718f06e0f 100644 --- a/tools/testing/selftests/bpf/progs/test_sk_storage_tracing.c +++ b/tools/testing/selftests/bpf/progs/test_sk_storage_tracing.c @@ -92,4 +92,20 @@ int BPF_PROG(inet_csk_accept, struct sock *sk, int flags, int *err, bool kern, return 0; } +SEC("tp_btf/tcp_retransmit_synack") +int BPF_PROG(tcp_retransmit_synack, struct sock* sk, struct request_sock* req) +{ + /* load only test */ + bpf_sk_storage_get(&sk_stg_map, sk, 0, 0); + bpf_sk_storage_get(&sk_stg_map, req->sk, 0, 0); + return 0; +} + +SEC("tp_btf/tcp_bad_csum") +int BPF_PROG(tcp_bad_csum, struct sk_buff* skb) +{ + bpf_sk_storage_get(&sk_stg_map, skb->sk, 0, 0); + return 0; +} + char _license[] SEC("license") = "GPL"; |
