FILE
verifier_mtu.c
File preview with syntax highlighting.
linux-6.19.14/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 7SEC("tc/ingress") 8__description("uninit/mtu: write rejected") 9__success 10__caps_unpriv(CAP_BPF|CAP_NET_ADMIN) 11__failure_unpriv __msg_unpriv("invalid read from stack") 12int 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 20char LICENSE[] SEC("license") = "GPL";
~/
Read-only file preview.