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:   Tue, 4 Sep 2018 18:38:03 +0300
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        Platform Driver <platform-driver-x86@...r.kernel.org>,
        Dave Hansen <dave.hansen@...el.com>,
        sean.j.christopherson@...el.com, nhorman@...hat.com,
        npmccallum@...hat.com, linux-sgx@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, suresh.b.siddha@...el.com,
        serge.ayoun@...el.com,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v13 09/13] x86/sgx: Enclave Page Cache (EPC) memory
 manager

On Mon, Sep 03, 2018 at 10:02:16PM +0300, Andy Shevchenko wrote:
> On Mon, Aug 27, 2018 at 9:58 PM Jarkko Sakkinen
> <jarkko.sakkinen@...ux.intel.com> wrote:
> >
> > Add a Enclave Page Cache (EPC) memory manager that can be used to
> > allocate and free EPC pages. The swapper thread ksgxswapd reclaims pages
> > on the event when the number of free EPC pages goes below
> > %SGX_NR_LOW_PAGES up until it reaches %SGX_NR_HIGH_PAGES.
> >
> > Pages are reclaimed in LRU fashion from a global list. The consumers
> > take care of calling EBLOCK (block page from new accesses), ETRACK
> > (restart counting the entering hardware threads) and EWB (write page to
> > the regular memory) because executing these operations usually (if not
> > always) requires to do some subsystem-internal locking operations.
> 
> > +                       list_del(&page->list);
> 
> Is this page will be completely gone? Otherwise it might be needed to
> reinit list head here as well.

The swapper cannot access the page once it has been removed from the
list of active pages so it does not matter whether this is list_del()
or list_del_init().

> > +       WARN(ret < 0, "sgx: cannot free page, reclaim in-progress");
> > +       WARN(ret > 0, "sgx: EREMOVE returned %d (0x%x)", ret, ret);
> 
> I'm not sure (though it's easy to check) that you need sgx: prefix
> here. WARN() might take pr_fmt() if defined.

Sean, you took care of this one. Was it so that WARN() does not respect
pr_fmt?

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ