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: <a006c85ef21f4dbd46a2ec1f73fa4e273afc5f6c.camel@kernel.org>
Date:   Thu, 26 Aug 2021 19:08:07 +0300
From:   Jarkko Sakkinen <jarkko@...nel.org>
To:     Borislav Petkov <bp@...en8.de>
Cc:     linux-sgx@...r.kernel.org,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Kai Huang <kai.huang@...el.com>, Shuah Khan <shuah@...nel.org>,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3 1/2] x86/sgx: Add the missing ifdef for
 sgx_set_attribute()

On Thu, 2021-08-26 at 11:58 +0200, Borislav Petkov wrote:
> On Thu, Aug 26, 2021 at 02:52:32AM +0300, Jarkko Sakkinen wrote:
> > Similarly as sgx_virt_*, decorate sgx_set_attribute() with ifdef, so that
> > calling it without appropraite config flags, will cause a compilation
> > error, and not a linking error.
> 
> Please explain what exactly is this fixing. IOW, how can I reproduce the
> failure?

You're right, fixes tag is not necessary.

I made this change because I'm including the header to set_memory.c, and
IMHO it is better to make sure when possible that we get compilation errors
than linker errors, if for some reason kernel did not have SGX support.

It's also incoherent that KVM specific functions are compilation flagged but
sgx_set_attribute() is not.

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ