[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-keyrings
Subject:    Re: [PATCH v14 05/12] KEYS: Move KEY_LOOKUP_ to include/linux/key.h and set KEY_LOOKUP_FLAGS_ALL
From:       Roberto Sassu <roberto.sassu () huaweicloud ! com>
Date:       2022-08-31 15:55:35
Message-ID: 827bd5dc3b1ee88b14af53f4575da1b62c8ae452.camel () huaweicloud ! com
[Download RAW message or body]

On Wed, 2022-08-31 at 08:33 -0700, Alexei Starovoitov wrote:
> On Wed, Aug 31, 2022 at 2:24 AM Roberto Sassu
> <roberto.sassu@huaweicloud.com> wrote:
> > > > > +#define KEY_LOOKUP_CREATE        0x01
> > > > > +#define KEY_LOOKUP_PARTIAL       0x02
> > > > > +#define KEY_LOOKUP_FLAGS_ALL     (KEY_LOOKUP_CREATE |
> > > > > KEY_LOOKUP_PARTIAL)
> > > > 
> > > > IMHO this could be just KEY_LOOKUP_ALL.
> 
> Since this is supposed to be kernel internal flags
> please make them enum, so that bpf progs can auto-adjust
> (with the help of CORE) to changes in this enum.
> With #define there is no way for bpf prog to know
> when #define changed in the future kernels.

Ok, will add in the next version.

Thanks

Roberto

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic