lkml.org 
[lkml]   [2022]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH V8 18/44] x86/fault: Add a PKS test fault hook
On Mon, Jan 31, 2022 at 11:56:57AM -0800, Edgecombe, Rick P wrote:
> On Thu, 2022-01-27 at 09:54 -0800, ira.weiny@intel.com wrote:
> > + * If a protection key exception occurs it could be
> > because a PKS test
> > + * is running. If so, pks_test_callback() will clear
> > the protection
> > + * mechanism and return true to indicate the fault
> > was handled.
> > + */
> > + if (pks_test_callback())
> > + return;
>
> Why do we need both this and pks_handle_key_fault()?

I debated this. And I convinced myself that it was worth the extra code.

For this series, when testing pks_handle_key_fault() this may get called if
something goes wrong. And when the test code is not configured it is a no-op.
So I don't see any harm in keeping this as a general handler.

I mentioned this when adding pks_handle_key_fault().[1] I could make a note of
it in this patch if that would help.

Ira

[1] https://lore.kernel.org/lkml/20220127175505.851391-30-ira.weiny@intel.com/

\
 
 \ /
  Last update: 2022-02-11 21:41    [W:0.151 / U:0.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site