From: Xin Li <xin3.li@intel.com>
To: linux-kernel@vger.kernel.org
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
luto@kernel.org, ravi.v.shankar@intel.com,
andrew.cooper3@citrix.com
Subject: [PATCH 1/2] x86/fred: Fix build with clang
Date: Sat, 27 Jan 2024 01:37:27 -0800 [thread overview]
Message-ID: <20240127093728.1323-2-xin3.li@intel.com> (raw)
In-Reply-To: <20240127093728.1323-1-xin3.li@intel.com>
As clang doesn't allow .fill to refernece a symbol before it's defined,
use asm_fred_entrypoint_user instead of asm_fred_entrypoint_kernel.
Fixes: 5e0636a41485 ("x86/fred: FRED entry/exit and dispatch code")
Reported-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/lkml/20240126100050.GAZbOC0g3Rlr6otZcT@fat_crate.local/
Signed-off-by: Xin Li <xin3.li@intel.com>
---
arch/x86/entry/entry_64_fred.S | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/arch/x86/entry/entry_64_fred.S b/arch/x86/entry/entry_64_fred.S
index eedf98de7538..5427e0da190d 100644
--- a/arch/x86/entry/entry_64_fred.S
+++ b/arch/x86/entry/entry_64_fred.S
@@ -43,13 +43,12 @@ SYM_INNER_LABEL(asm_fred_exit_user, SYM_L_GLOBAL)
_ASM_EXTABLE_TYPE(1b, asm_fred_entrypoint_user, EX_TYPE_ERETU)
SYM_CODE_END(asm_fred_entrypoint_user)
-.fill asm_fred_entrypoint_kernel - ., 1, 0xcc
-
/*
* The new RIP value that FRED event delivery establishes is
* (IA32_FRED_CONFIG & ~FFFH) + 256 for events that occur in
* ring 0, i.e., asm_fred_entrypoint_user + 256.
*/
+ .fill asm_fred_entrypoint_user + 256 - ., 1, 0xcc
.org asm_fred_entrypoint_user + 256
SYM_CODE_START_NOALIGN(asm_fred_entrypoint_kernel)
FRED_ENTER
--
2.43.0
next prev parent reply other threads:[~2024-01-27 10:08 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-27 9:37 [PATCH 0/2] x86/fred: Fix two build issues Xin Li
2024-01-27 9:37 ` Xin Li [this message]
2024-01-27 18:14 ` [PATCH 1/2] x86/fred: Fix build with clang H. Peter Anvin
2024-01-27 19:46 ` Li, Xin3
2024-01-28 19:33 ` H. Peter Anvin
2024-01-28 20:27 ` Li, Xin3
2024-01-29 6:45 ` [PATCH v1A " Xin Li
2024-01-30 10:34 ` Borislav Petkov
2024-01-27 9:37 ` [PATCH 2/2] x86/fred: Fix build with CONFIG_IA32_EMULATION=n Xin Li
2024-01-30 12:48 ` Borislav Petkov
2024-01-30 15:22 ` Li, Xin3
2024-01-30 15:31 ` Borislav Petkov
2024-01-30 16:30 ` Li, Xin3
2024-01-30 16:34 ` Borislav Petkov
2024-01-30 17:17 ` Borislav Petkov
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=20240127093728.1323-2-xin3.li@intel.com \
--to=xin3.li@intel.com \
--cc=andrew.cooper3@citrix.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@redhat.com \
--cc=ravi.v.shankar@intel.com \
--cc=tglx@linutronix.de \
--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