lkml.org 
[lkml]   [2022]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V8 16/44] mm/pkeys: Introduce pks_mk_readwrite()
On Tue, Feb 01, 2022 at 09:40:06AM -0800, Dave Hansen wrote:
> On 1/27/22 09:54, ira.weiny@intel.com wrote:
> > +static inline void pks_mk_readwrite(int pkey)
> > +{
> > + pks_update_protection(pkey, PKEY_READ_WRITE);
> > +}
>
> I don't really like the "mk" terminology in here. Maybe it's from
> dealing with the PTE helpers, but "mk" to me means that it won't do
> anything observable by itself. We're also not starved for space here,
> and it's really odd to abbreviate "make->mk" but not do "readwrite->rw".
>
> This really is going off and changing a register value. I think:
>
> pks_set_readwrite()

Ok For completeness I'm changing the pgmap_mk_* calls to match; pgmap_set_*.

>
> would be fine. This starts to get a bit redundant, but looks fine too:
>
> pks_set_key_readwrite()

Yes I think that is a bit to verbose.

I think pks_set_xxx() reads nicely.

Ira

\
 
 \ /
  Last update: 2022-02-18 05:40    [W:0.108 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site