Re: pull-request: bpf-next 2023-12-18

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

 



On Mon, Dec 18, 2023 at 5:11 PM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxx> wrote:
>
> I literally see complete garbage like tghis:
>
>         ..
>         __u32 btf_token_fd;
>         ...
>         if (attr->btf_token_fd) {
>                 token = bpf_token_get_from_fd(attr->btf_token_fd);
>
> and this is all *new* code that makes that same bogus sh*t-for-brains
> mistake that was wrong the first time.

Point taken.
We can do s/__u32 token_fd/__u64 token/
and waste upper 32-bit as flags that indicate that lower 32-bit is an FD
or
are you ok with __u32 token that is 'fd + 1'.
zero - invalid
one - FD==0
two - FD==1
?

Naming is hard. 'token_handle' maybe?





[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