From: Jian Cai <caij2003@gmail.com>
To: unlisted-recipients:; (no To-header on input)
Cc: caij2003@gmail.com, jiancai@google.com, ndesaulniers@google.com,
manojgupta@google.com, sedat.dilek@gmail.com,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Andy Lutomirski <luto@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Alexandre Chartre <alexandre.chartre@oracle.com>,
linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com
Subject: [PATCH] x86/entry: add compatibility with IAS
Date: Sun, 12 Jul 2020 18:24:22 -0700 [thread overview]
Message-ID: <20200713012428.1039487-1-caij2003@gmail.com> (raw)
Clang's integrated assembler does not allow symbols with non-absolute
values to be reassigned. This patch allows the affected code to be
compatible with IAS.
Link: https://github.com/ClangBuiltLinux/linux/issues/1043
Reported-by: Nick Desaulniers <ndesaulniers@google.com>
Reported-by: Sedat Dilek <sedat.dilek@gmail.com>
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Jian Cai <caij2003@gmail.com>
---
arch/x86/include/asm/idtentry.h | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
diff --git a/arch/x86/include/asm/idtentry.h b/arch/x86/include/asm/idtentry.h
index f3d70830bf2a..77beed2cd6d9 100644
--- a/arch/x86/include/asm/idtentry.h
+++ b/arch/x86/include/asm/idtentry.h
@@ -468,34 +468,32 @@ __visible noinstr void func(struct pt_regs *regs, \
*/
.align 8
SYM_CODE_START(irq_entries_start)
- vector=FIRST_EXTERNAL_VECTOR
- pos = .
+ i = 1
+ pos1 = .
.rept (FIRST_SYSTEM_VECTOR - FIRST_EXTERNAL_VECTOR)
UNWIND_HINT_IRET_REGS
- .byte 0x6a, vector
+ .byte 0x6a, FIRST_EXTERNAL_VECTOR + i - 1
jmp asm_common_interrupt
nop
/* Ensure that the above is 8 bytes max */
- . = pos + 8
- pos=pos+8
- vector=vector+1
+ . = pos1 + 8 * i
+ i = i + 1
.endr
SYM_CODE_END(irq_entries_start)
#ifdef CONFIG_X86_LOCAL_APIC
.align 8
SYM_CODE_START(spurious_entries_start)
- vector=FIRST_SYSTEM_VECTOR
- pos = .
+ i = 1
+ pos2 = .
.rept (NR_VECTORS - FIRST_SYSTEM_VECTOR)
UNWIND_HINT_IRET_REGS
- .byte 0x6a, vector
+ .byte 0x6a, FIRST_SYSTEM_VECTOR + i - 1
jmp asm_spurious_interrupt
nop
/* Ensure that the above is 8 bytes max */
- . = pos + 8
- pos=pos+8
- vector=vector+1
+ . = pos2 + 8 * i
+ i = i + 1
.endr
SYM_CODE_END(spurious_entries_start)
#endif
--
2.27.0.383.g050319c2ae-goog
next reply other threads:[~2020-07-13 1:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-13 1:24 Jian Cai [this message]
2020-07-13 2:33 ` [PATCH] x86/entry: add compatibility with IAS Brian Gerst
2020-07-13 2:54 ` Arvind Sankar
2020-07-13 3:57 ` Arvind Sankar
2020-07-13 21:38 ` Jian Cai
2020-07-13 22:17 ` Arvind Sankar
2020-07-13 22:40 ` Jian Cai
2020-07-14 9:34 ` Sedat Dilek
2020-07-14 10:48 ` Sedat Dilek
2020-07-14 23:30 ` [PATCH v2] " Jian Cai
2020-07-16 15:30 ` [tip: x86/urgent] x86/entry: Add " tip-bot2 for Jian Cai
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=20200713012428.1039487-1-caij2003@gmail.com \
--to=caij2003@gmail.com \
--cc=alexandre.chartre@oracle.com \
--cc=bp@alien8.de \
--cc=clang-built-linux@googlegroups.com \
--cc=hpa@zytor.com \
--cc=jiancai@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=luto@kernel.org \
--cc=manojgupta@google.com \
--cc=mingo@redhat.com \
--cc=ndesaulniers@google.com \
--cc=peterz@infradead.org \
--cc=sedat.dilek@gmail.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;
as well as URLs for NNTP newsgroup(s).