[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220211204027.GS785175@iweiny-DESK2.sc.intel.com>
Date: Fri, 11 Feb 2022 12:40:28 -0800
From: Ira Weiny <ira.weiny@...el.com>
To: "Edgecombe, Rick P" <rick.p.edgecombe@...el.com>
Cc: "hpa@...or.com" <hpa@...or.com>,
"Williams, Dan J" <dan.j.williams@...el.com>,
"dave.hansen@...ux.intel.com" <dave.hansen@...ux.intel.com>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [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@...el.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/
Powered by blists - more mailing lists