diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2024-10-21 17:28:07 +0200 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2024-10-22 15:42:56 -0700 |
commit | 14a3d3ef02ba53447d5112a2641aac0d10dc994f (patch) | |
tree | d68f06d3d5e8de20bab3df0e24dbd28e707c0be2 /tools/testing/selftests/bpf/progs | |
parent | 8ea607330a39184f51737c6ae706db7fdca7628e (diff) |
bpf: Remove MEM_UNINIT from skb/xdp MTU helpers
We can now undo parts of 4b3786a6c539 ("bpf: Zero former ARG_PTR_TO_{LONG,INT}
args in case of error") as discussed in [0].
Given the BPF helpers now have MEM_WRITE tag, the MEM_UNINIT can be cleared.
The mtu_len is an input as well as output argument, meaning, the BPF program
has to set it to something. It cannot be uninitialized. Therefore, allowing
uninitialized memory and zeroing it on error would be odd. It was done as
an interim step in 4b3786a6c539 as the desired behavior could not have been
expressed before the introduction of MEM_WRITE tag.
Fixes: 4b3786a6c539 ("bpf: Zero former ARG_PTR_TO_{LONG,INT} args in case of error")
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/a86eb76d-f52f-dee4-e5d2-87e45de3e16f@iogearbox.net [0]
Acked-by: Kumar Kartikeya Dwivedi <memxor@gmail.com>
Link: https://lore.kernel.org/r/20241021152809.33343-3-daniel@iogearbox.net
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/progs')
0 files changed, 0 insertions, 0 deletions