lkml.org 
[lkml]   [2022]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v14 05/12] KEYS: Move KEY_LOOKUP_ to include/linux/key.h and set KEY_LOOKUP_FLAGS_ALL
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.

\
 
 \ /
  Last update: 2022-08-31 17:34    [W:0.062 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site