lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ