]> Git Repo - J-linux.git/blob - tools/testing/selftests/bpf/progs/verifier_mtu.c
Merge tag 'vfs-6.13-rc7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs
[J-linux.git] / tools / testing / selftests / bpf / progs / verifier_mtu.c
1 // SPDX-License-Identifier: GPL-2.0
2
3 #include "vmlinux.h"
4 #include <bpf/bpf_helpers.h>
5 #include "bpf_misc.h"
6
7 SEC("tc/ingress")
8 __description("uninit/mtu: write rejected")
9 __success
10 __caps_unpriv(CAP_BPF|CAP_NET_ADMIN)
11 __failure_unpriv __msg_unpriv("invalid indirect read from stack")
12 int tc_uninit_mtu(struct __sk_buff *ctx)
13 {
14         __u32 mtu;
15
16         bpf_check_mtu(ctx, 0, &mtu, 0, 0);
17         return TCX_PASS;
18 }
19
20 char LICENSE[] SEC("license") = "GPL";
This page took 0.028144 seconds and 4 git commands to generate.