aboutsummaryrefslogtreecommitdiffstats
path: root/sys/linux/bpf.txt.const
diff options
context:
space:
mode:
authorPaul Chaignon <paul.chaignon@gmail.com>2023-11-07 12:10:53 +0100
committerAleksandr Nogikh <nogikh@google.com>2023-11-09 18:26:45 +0000
commit44a9f04e7f0a741a7e9e72387809ae1fdf6b2a4e (patch)
treeacdd074cbee6f07cc923026c56e33351b90642af /sys/linux/bpf.txt.const
parentce85d4183896b735669c38b5f6c441d4f31db1ca (diff)
sys/linux: add null check BPF instructions
This commit adds a new struct with two BPF instructions to perform a null check on a given pointer. It is then used to update our small ringbuf program to null check the ringbuf reserved data pointer as follows. u64 *e; e = bpf_ringbuf_reserve(&rb, sizeof(*e), 0); if (!e) return 0; [...] bpf_ringbuf_submit(e, 0); return 0; With this null check, our test case corresponding to this program now passes the verifier and is successfully loaded. Signed-off-by: Paul Chaignon <paul.chaignon@gmail.com>
Diffstat (limited to 'sys/linux/bpf.txt.const')
0 files changed, 0 insertions, 0 deletions