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]
Message-ID: <9dda4484-4c81-ab86-0227-ea926178986e@intel.com>
Date:   Thu, 25 Aug 2022 11:38:00 -0700
From:   Dave Hansen <dave.hansen@...el.com>
To:     Jarkko Sakkinen <jarkko@...nel.org>
Cc:     linux-sgx@...r.kernel.org, Paul Menzel <pmenzel@...gen.mpg.de>,
        Haitao Huang <haitao.huang@...ux.intel.com>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Reinette Chatre <reinette.chatre@...el.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" <x86@...nel.org>,
        "H. Peter Anvin" <hpa@...or.com>,
        "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" 
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3] x86/sgx: Do not consider unsanitized pages an error

On 8/25/22 11:27, Jarkko Sakkinen wrote:
> On Thu, Aug 25, 2022 at 07:07:44AM -0700, Dave Hansen wrote:
>> On 8/25/22 01:08, Jarkko Sakkinen wrote:
>>> However, if the SGX subsystem initialization is retracted, the sanitization
>>> process could end up in the middle, and sgx_dirty_page_list be left
>>> non-empty for legit reasons.
>> What does "retraction" mean in this context?
> Rest of the initialization failing or features not detected (-ENODEV).

Can you please work on communicating better descriptions of the
problems?  This really isn't good enough.

I think you're talking about sgx_init().  It launches ksgxd from
sgx_page_reclaimer_init() which sets about sanitizing the
'dirty_page_list'.  After launching ksgxd, if later actions in
sgx_init() (misc_register(), sgx_drv_init(), sgx_vepc_init()) fail,
ksgxd will be stopped prematurely.

This will leave pages in 'sgx_dirty_page_list' after
__sgx_sanitize_pages() has completed, which results in a WARN_ON().

The WARN_ON() is really only valid when __sgx_sanitize_pages() runs to
completion *and* fails to empty 'sgx_dirty_page_list'.

Is that it?

If so, could you please give the changelog another go?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ