Re: [PATCH bpf-next] bpf: add BPF_F_TOKEN_FD flag to pass with BPF token FD

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

 



On Mon, Dec 18, 2023 at 09:31:50PM -0800, Andrii Nakryiko wrote:
> Add BPF_F_TOKEN_FD flag to be used across bpf() syscall commands
> that accept BPF token FD: BPF_PROG_LOAD, BPF_MAP_CREATE, and
> BPF_BTF_LOAD. This flag has to be set whenever token FD is provided.
> 
> BPF_BTF_LOAD command didn't have a flags field, so add it as well.
> 
> Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
> ---

Reviewed-by: Christian Brauner <brauner@xxxxxxxxxx>

>  /* Get path from provided FD in BPF_OBJ_PIN/BPF_OBJ_GET commands */
>  	BPF_F_PATH_FD		= (1U << 14),
> +
> +/* BPF token FD is passed in a corresponding command's token_fd field */
> +	BPF_F_TOKEN_FD		= (1U << 15),

The placement of the new flag right after the BPF_F_PATH_FD flag alone
does tell us everything about the "we didn't know" claims wrt to the
token fd stuff. Literally the same review and the same solution I
requested back then.




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux