Re: [RFC][PATCH v3 02/15] bpf: Set open_flags as last bpf_attr field for bpf_*_get_fd_by_id() funcs

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

 



On Fri, Jul 22, 2022 at 07:18:23PM +0200, Roberto Sassu wrote:
> The bpf() system call validates the bpf_attr structure received as
> argument, and considers data until the last field, defined for each
> operation. The remaing space must be filled with zeros.
> 
> Currently, for bpf_*_get_fd_by_id() functions except bpf_map_get_fd_by_id()
> the last field is *_id. Setting open_flags to BPF_F_RDONLY from user space
> will result in bpf() rejecting the argument.

The kernel is doing the right thing. It should not ignore fields.



[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