lkml.org 
[lkml]   [2020]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC V2 02/17] x86/fpu: Refactor arch_set_user_pkey_access() for PKS support
On Fri, Jul 17, 2020 at 01:52:55PM -0700, Ira Weiny wrote:
> On Fri, Jul 17, 2020 at 10:54:42AM +0200, Peter Zijlstra wrote:

> > Then we at least have a little clue wtf the thing does.. Yes I started
> > with a rename and then got annoyed at the implementation too.
>
> On the code I think this is fair. I've also updated the calling function to be
> a bit cleaner as well.
>
> However, I think the name 'update' is a bit misleading. Here is the new
> calling code:
>
> ...
> pkru = read_pkru();
> pkru = update_pkey_reg(pkru, pkey, init_val);
> write_pkru(pkru);
> ...
>
>
> I think it is odd to have a function called update_pkey_reg() called right
> before a write_pkru(). Can we call this update_pkey_value? or just 'val'?
> Because write_pkru() actually updates the register.

Fair enough, update_pkey_val() works fine for me.

\
 
 \ /
  Last update: 2020-07-20 11:15    [W:0.071 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site