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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Yhz/gK9K6KtON0bq@iweiny-desk3>
Date:   Mon, 28 Feb 2022 08:59:44 -0800
From:   Ira Weiny <ira.weiny@...el.com>
To:     Dan Williams <dan.j.williams@...el.com>
Cc:     Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Fenghua Yu <fenghua.yu@...el.com>,
        Rick Edgecombe <rick.p.edgecombe@...el.com>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V8 33/44] memremap_pages: Introduce
 pgmap_protection_available()

On Fri, Feb 04, 2022 at 08:19:43AM -0800, Dan Williams wrote:
> On Thu, Jan 27, 2022 at 9:55 AM <ira.weiny@...el.com> wrote:

[snip]

> > @@ -63,6 +64,16 @@ static void devmap_managed_enable_put(struct dev_pagemap *pgmap)
> >  }
> >  #endif /* CONFIG_DEV_PAGEMAP_OPS */
> >
> > +#ifdef CONFIG_DEVMAP_ACCESS_PROTECTION
> > +
> > +bool pgmap_protection_available(void)
> > +{
> > +       return pks_available();
> > +}
> > +EXPORT_SYMBOL_GPL(pgmap_protection_available);
> 
> Any reason this was chosen to be an out-of-line function? Doesn't this
> defeat the performance advantages of static_cpu_has()?

Unfortunately, yes.  pkeys.h includes mm.h which means I can't include pkeys.h
here in mm.h.

Let me see what I can do.  In patch 11 I created pks-keys.h.  Let me see if I
can leverage that header instead of pkeys.h.

When I created that header I was thinking that the user and supervisor pkey
functions may need even more separation in the headers but I was fearful of
putting too much in pks-keys.h because it was created to avoid conflicts in
asm/processor.h.  Looking at it again I think pks_available() may be ok in
pks-keys.h.

Ira

> 
> > +
> > +#endif /* CONFIG_DEVMAP_ACCESS_PROTECTION */
> > +
> >  static void pgmap_array_delete(struct range *range)
> >  {
> >         xa_store_range(&pgmap_array, PHYS_PFN(range->start), PHYS_PFN(range->end),
> > --
> > 2.31.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ