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: <20200309211425.GA19235@linux.intel.com>
Date:   Mon, 9 Mar 2020 14:14:25 -0700
From:   Sean Christopherson <sean.j.christopherson@...el.com>
To:     Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
Cc:     linux-kernel@...r.kernel.org, x86@...nel.org,
        linux-sgx@...r.kernel.org, akpm@...ux-foundation.org,
        dave.hansen@...el.com, nhorman@...hat.com, npmccallum@...hat.com,
        haitao.huang@...el.com, andriy.shevchenko@...ux.intel.com,
        tglx@...utronix.de, kai.svahn@...el.com, bp@...en8.de,
        josh@...htriplett.org, luto@...nel.org, kai.huang@...el.com,
        rientjes@...gle.com, cedric.xing@...el.com, puiterwijk@...hat.com
Subject: Re: [PATCH v28 06/22] x86/sgx: Add wrappers for ENCLS leaf functions

On Wed, Mar 04, 2020 at 01:35:53AM +0200, Jarkko Sakkinen wrote:
> +/* Issue a WARN() about an ENCLS leaf. */
> +#define ENCLS_WARN(r, name) {						  \
> +	do {								  \
> +		int _r = (r);						  \
> +		WARN(_r, "%s returned %d (0x%x)\n", (name), _r, _r); \

This should be a WARN_ONCE(), otherwise we'll spam the log if something
goes awry, e.g. if there's a correctable #MC or a rogue write to a MCi_CTL
MSR, either of which will "soft" disable SGX (CPUID 0x7 still reports
SGX/SGXLC support, but all CPUID 0x12 sub-leafs return zeros).

> +	} while (0);							  \
> +}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ