From: Jarkko Sakkinen <jarkko@kernel.org>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: linux-sgx@vger.kernel.org, x86@kernel.org,
linux-kernel@vger.kernel.org,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@kernel.org>, Borislav Petkov <bp@alien8.de>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: [PATCH] x86/sgx: Use ENCLS mnemonic in <kernel/cpu/sgx/encls.h>
Date: Tue, 17 Jun 2025 17:44:35 +0300 [thread overview]
Message-ID: <aFF_UwJ2XlFQSZOi@kernel.org> (raw)
In-Reply-To: <20250616085716.158942-1-ubizjak@gmail.com>
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@gmail.com>
> Cc: Jarkko Sakkinen <jarkko@kernel.org>
> Cc: Dave Hansen <dave.hansen@linux.intel.com>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ingo Molnar <mingo@kernel.org>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: "H. Peter Anvin" <hpa@zytor.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
next prev parent reply other threads:[~2025-06-17 14:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-16 8:56 [PATCH] x86/sgx: Use ENCLS mnemonic in <kernel/cpu/sgx/encls.h> Uros Bizjak
2025-06-17 14:44 ` Jarkko Sakkinen [this message]
2025-06-17 15:01 ` Dave Hansen
2025-06-17 16:20 ` Uros Bizjak
2025-06-24 20:49 ` Jarkko Sakkinen
2025-06-24 20:47 ` Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aFF_UwJ2XlFQSZOi@kernel.org \
--to=jarkko@kernel.org \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sgx@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=tglx@linutronix.de \
--cc=ubizjak@gmail.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox