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, 18 Jun 2021 08:41:23 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Borislav Petkov <bp@...en8.de>,
        Sean Christopherson <seanjc@...gle.com>
Cc:     Jarkko Sakkinen <jarkko@...nel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        "H. Peter Anvin" <hpa@...or.com>, linux-sgx@...r.kernel.org,
        linux-kernel@...r.kernel.org, Du Cheng <ducheng2@...il.com>
Subject: Re: [PATCH] x86/sgx: Suppress WARN on inability to sanitize EPC if
 ksgxd is stopped

On 6/17/21 9:45 AM, Borislav Petkov wrote:
> Hmm, this looks weird. Why aren't we starting ksgxd only after
> *everything* has initialized successfully? I.e., after both kvm and
> native drivers' init functions have succeeded?

ksgxd has two roles.  I think that's why it looks weird.

The obvious role is its use as the kswapd equivalent for SGX.

But, it's also used to speed up SGX initialization.  It "sanitizes" the
EPC asynchronously because it can take quite a while.  That's why it
gets launched off early.  If it gets interrupted, that's when this
warning can trigger.

I think you're suggesting that we just defer starting ksgxd until we
*know* it won't be interrupted, basically moving
sgx_page_reclaimer_init() down below sgx_drv_init() and sgx_vepc_init().

While I can see why it's best to get it going as early as possible, I
don't see much going on in those init functions that would justify
needing to fork off ksgx earlier.  Am I missing anything?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ