mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Uros Bizjak" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Uros Bizjak <ubizjak@gmail.com>,
	"Borislav Petkov (AMD)" <bp@alien8.de>,
	Jarkko Sakkinen <jarkko@kernel.org>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/cleanups] x86/sgx: Use ENCLS mnemonic in <kernel/cpu/sgx/encls.h>
Date: Wed, 27 Aug 2025 06:45:45 -0000	[thread overview]
Message-ID: <175627714549.1920.13829887049245292535.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250616085716.158942-1-ubizjak@gmail.com>

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     13bdfb53aa04eeb8022af87288c5bc0a5d13a834
Gitweb:        https://git.kernel.org/tip/13bdfb53aa04eeb8022af87288c5bc0a5d13a834
Author:        Uros Bizjak <ubizjak@gmail.com>
AuthorDate:    Mon, 16 Jun 2025 10:56:30 +02:00
Committer:     Borislav Petkov (AMD) <bp@alien8.de>
CommitterDate: Mon, 25 Aug 2025 17:28:43 +02:00

x86/sgx: Use ENCLS mnemonic in <kernel/cpu/sgx/encls.h>

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>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Link: https://lore.kernel.org/20250616085716.158942-1-ubizjak@gmail.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 99004b0..42a088a 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)				\

      parent reply	other threads:[~2025-08-27  6:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-16  8:56 [PATCH] " Uros Bizjak
2025-06-17 14:44 ` Jarkko Sakkinen
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
2025-08-27  6:45 ` tip-bot2 for Uros Bizjak [this message]

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=175627714549.1920.13829887049245292535.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=bp@alien8.de \
    --cc=jarkko@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --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

all inboxes | Powered by JetHome®