mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "tip-bot2 for Nathan Chancellor" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Nathan Chancellor <nathan@kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	"H. Peter Anvin (Intel)" <hpa@zytor.com>,
	x86@kernel.org, linux-kernel@vger.kernel.org
Subject: [tip: x86/entry] x86/entry/vdso32: Omit '.cfi_offset eflags' for LLVM < 16
Date: Sat, 24 Jan 2026 09:23:26 -0000	[thread overview]
Message-ID: <176924660698.510.2856740193141790742.tip-bot2@tip-bot2> (raw)
In-Reply-To: =?utf-8?q?=3C20260123-x86-vdso32-wa-llvm-15-cfi-offset-eflags-v?= =?utf-8?q?1-1-0f412e3516a4=40kernel=2Eorg=3E?=

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

Commit-ID:     3e30278e0c71808e156cac8da5895d636ce819d5
Gitweb:        https://git.kernel.org/tip/3e30278e0c71808e156cac8da5895d636ce819d5
Author:        Nathan Chancellor <nathan@kernel.org>
AuthorDate:    Fri, 23 Jan 2026 16:20:28 -07:00
Committer:     Ingo Molnar <mingo@kernel.org>
CommitterDate: Sat, 24 Jan 2026 10:18:28 +01:00

x86/entry/vdso32: Omit '.cfi_offset eflags' for LLVM < 16

After commit:

  884961618ee5 ("x86/entry/vdso32: Remove open-coded DWARF in sigreturn.S")

building arch/x86/entry/vdso/vdso32/sigreturn.S with LLVM 15 fails with:

  <instantiation>:18:20: error: invalid register name
   .cfi_offset eflags, 64
                     ^
  arch/x86/entry/vdso/vdso32/sigreturn.S:33:2: note: while in macro instantiation
   STARTPROC_SIGNAL_FRAME 8
   ^

Support for eflags as an argument to .cfi_offset was added in the LLVM
16 development cycle:

    https://github.com/llvm/llvm-project/commit/67bd3c58c0c7389e39c5a2f4d3b1a30459ccf5b7 [1]

Only add this .cfi_offset directive if it is supported by the assembler
to clear up the error.

[ mingo: Tidied up the changelog and the comment a bit ]

Fixes: 884961618ee5 ("x86/entry/vdso32: Remove open-coded DWARF in sigreturn.S")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Link: https://patch.msgid.link/20260123-x86-vdso32-wa-llvm-15-cfi-offset-eflags-v1-1-0f412e3516a4@kernel.org
---
 arch/x86/entry/vdso/vdso32/sigreturn.S | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/x86/entry/vdso/vdso32/sigreturn.S b/arch/x86/entry/vdso/vdso32/sigreturn.S
index 25b0ac4..b433353 100644
--- a/arch/x86/entry/vdso/vdso32/sigreturn.S
+++ b/arch/x86/entry/vdso/vdso32/sigreturn.S
@@ -22,7 +22,17 @@
 	CFI_OFFSET	cs,     IA32_SIGCONTEXT_cs
 	CFI_OFFSET	ss,     IA32_SIGCONTEXT_ss
 	CFI_OFFSET	ds,     IA32_SIGCONTEXT_ds
+/*
+ * .cfi_offset eflags requires LLVM 16 or newer:
+ *
+ *   https://github.com/llvm/llvm-project/commit/67bd3c58c0c7389e39c5a2f4d3b1a30459ccf5b7
+ *
+ * Check for 16.0.1 to ensure the support is present, as 16.0.0 may be a
+ * prerelease version.
+ */
+#if defined(CONFIG_AS_IS_GNU) || (defined(CONFIG_AS_IS_LLVM) && CONFIG_AS_VERSION >= 160001)
 	CFI_OFFSET	eflags, IA32_SIGCONTEXT_flags
+#endif
 .endm
 
 	.text

                 reply	other threads:[~2026-01-24  9:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=176924660698.510.2856740193141790742.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=nathan@kernel.org \
    --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®