Lines Matching +full:write +full:- +full:0
1 // SPDX-License-Identifier: GPL-2.0
14 __description("rodata/strtol: write rejected")
15 __failure __msg("write into map forbidden")
18 char buff[] = { '8', '4', '\0' }; in tcx1()
19 bpf_strtol(buff, sizeof(buff), 0, (long *)&foo); in tcx1()
24 __description("bss/strtol: write accepted")
28 char buff[] = { '8', '4', '\0' }; in tcx2()
29 bpf_strtol(buff, sizeof(buff), 0, &bar); in tcx2()
34 __description("data/strtol: write accepted")
38 char buff[] = { '8', '4', '\0' }; in tcx3()
39 bpf_strtol(buff, sizeof(buff), 0, &bart); in tcx3()
44 __description("rodata/mtu: write rejected")
45 __failure __msg("write into map forbidden")
48 bpf_check_mtu(skb, skb->ifindex, (__u32 *)&foo, 0, 0); in tcx4()
53 __description("bss/mtu: write accepted")
57 bpf_check_mtu(skb, skb->ifindex, (__u32 *)&bar, 0, 0); in tcx5()
62 __description("data/mtu: write accepted")
66 bpf_check_mtu(skb, skb->ifindex, (__u32 *)&bart, 0, 0); in tcx6()
81 __description("rodata/mark: write with unknown reg rejected")
82 __failure __msg("write into map forbidden")
85 write_fixed((void *)&foo, skb->mark); in tcx7()
90 __description("rodata/mark: write with unknown reg rejected")
91 __failure __msg("write into map forbidden")
95 return 0; in BPF_PROG()