Re: [PATCH bpf 3/5] bpf: Remove MEM_UNINIT from skb/xdp MTU helpers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Oct 2024 at 17:28, Daniel Borkmann <daniel@xxxxxxxxxxxxx> wrote:
>
> 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@xxxxxxxxxxxxx>
> Link: https://lore.kernel.org/bpf/a86eb76d-f52f-dee4-e5d2-87e45de3e16f@xxxxxxxxxxxxx [0]
> ---

Acked-by: Kumar Kartikeya Dwivedi <memxor@xxxxxxxxx>




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux