Re: [PATCH v2 07/13] bpf: Move the signature kfuncs to helpers.c

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

 



On Mon, 2025-07-21 at 23:19 +0200, KP Singh wrote:
> No functional changes, except for the addition of the headers for the
> kfuncs so that they can be used for signature verification.

Not really anything to do with this code, but looking at the whole of
the keyrings handing, it does seem to be a bit pointlessly redundant. 
There's actually no need for the

bool has_ref;

in struct bpf_key because there's already an exported macro that can
tell you that based on struct key *
(verification.h:system_id_keyring_check), so if you replaced that, you
could drop has_ref and then, I think you could eliminate the pointer
allocation as well meaning bpf_key simply becomes an alias for struct
key ... it should simplify the code quite a lot.  I can put a patch set
together and see what it looks like.

Regards,

James






[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