[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191008133511.GB14020@linux.intel.com>
Date: Tue, 8 Oct 2019 06:35:11 -0700
From: Sean Christopherson <sean.j.christopherson@...el.com>
To: Borislav Petkov <bp@...en8.de>
Cc: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
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,
serge.ayoun@...el.com, shay.katz-zamir@...el.com,
haitao.huang@...el.com, andriy.shevchenko@...ux.intel.com,
tglx@...utronix.de, kai.svahn@...el.com, josh@...htriplett.org,
luto@...nel.org, kai.huang@...el.com, rientjes@...gle.com,
cedric.xing@...el.com
Subject: Re: [PATCH v22 07/24] x86/sgx: Add wrappers for ENCLS leaf functions
On Tue, Oct 08, 2019 at 09:18:45AM +0200, Borislav Petkov wrote:
> On Mon, Oct 07, 2019 at 09:04:05PM -0700, Sean Christopherson wrote:
> > > BIT(30)
> >
> > This is intentionally open coded so that it can be stringified in asm.
>
> It stringifies just fine with the BIT() macro too:
>
> # 187 "arch/x86/kernel/cpu/sgx/encls.h" 1
> 1: .byte 0x0f, 0x01, 0xcf;
> 2:
> .section .fixup,"ax"
> 3: orl $((((1UL))) << (30)),%eax
> jmp 2b
> .previous
>
> and the resulting object:
>
> Disassembly of section .fixup:
>
> 0000000000000000 <.fixup>:
> 0: 0d 00 00 00 40 or $0x40000000,%eax
> 5: e9 00 00 00 00 jmpq a <__addressable_sgx_free_page107+0x2>
Hmm, I get assembler errors using gcc 5.4.0
linux/arch/x86/kernel/cpu/sgx/encls.h: Assembler messages:
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: junk `UL)))<<(30))' after expression
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: junk `UL)))<<(30))' after expression
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: missing ')'
linux/arch/x86/kernel/cpu/sgx/encls.h:207: Error: junk `UL)))<<(30))' after expression
linux/scripts/Makefile.build:265: recipe for target 'arch/x86/kernel/cpu/sgx/encls.o' failed
Powered by blists - more mailing lists