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: <aFF_UwJ2XlFQSZOi@kernel.org>
Date: Tue, 17 Jun 2025 17:44:35 +0300
From: Jarkko Sakkinen <jarkko@...nel.org>
To: Uros Bizjak <ubizjak@...il.com>
Cc: linux-sgx@...r.kernel.org, x86@...nel.org, linux-kernel@...r.kernel.org,
	Dave Hansen <dave.hansen@...ux.intel.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...nel.org>, Borislav Petkov <bp@...en8.de>,
	"H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH] x86/sgx: Use ENCLS mnemonic in <kernel/cpu/sgx/encls.h>

On Mon, Jun 16, 2025 at 10:56:30AM +0200, Uros Bizjak wrote:
> Current minimum required version of binutils is 2.30,
> which supports ENCLS instruction mnemonic.
> 
> Replace the byte-wise specification of ENCLS with
> this proper mnemonic.
> 
> No functional change intended.
> 
> Signed-off-by: Uros Bizjak <ubizjak@...il.com>
> Cc: Jarkko Sakkinen <jarkko@...nel.org>
> Cc: Dave Hansen <dave.hansen@...ux.intel.com>
> Cc: Thomas Gleixner <tglx@...utronix.de>
> Cc: Ingo Molnar <mingo@...nel.org>
> Cc: Borislav Petkov <bp@...en8.de>
> Cc: "H. Peter Anvin" <hpa@...or.com>
> ---
>  arch/x86/kernel/cpu/sgx/encls.h | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/x86/kernel/cpu/sgx/encls.h b/arch/x86/kernel/cpu/sgx/encls.h
> index 99004b02e2ed..42a088a337c5 100644
> --- a/arch/x86/kernel/cpu/sgx/encls.h
> +++ b/arch/x86/kernel/cpu/sgx/encls.h
> @@ -68,7 +68,7 @@ static inline bool encls_failed(int ret)
>  	({							\
>  	int ret;						\
>  	asm volatile(						\
> -	"1: .byte 0x0f, 0x01, 0xcf;\n\t"			\
> +	"1: encls\n"						\
>  	"2:\n"							\
>  	_ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_FAULT_SGX)		\
>  	: "=a"(ret)						\
> @@ -111,8 +111,8 @@ static inline bool encls_failed(int ret)
>  	({							\
>  	int ret;						\
>  	asm volatile(						\
> -	"1: .byte 0x0f, 0x01, 0xcf;\n\t"			\
> -	"   xor %%eax,%%eax;\n"					\
> +	"1: encls\n\t"						\
> +	"xor %%eax,%%eax\n"					\
>  	"2:\n"							\
>  	_ASM_EXTABLE_TYPE(1b, 2b, EX_TYPE_FAULT_SGX)		\
>  	: "=a"(ret), "=b"(rbx_out)				\
> -- 
> 2.49.0
> 

I don't really see how this is that useful. That said, f a bug fix or
feature used encls mnemonic, I'd had no problems with acking it.

BR, Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ