summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/module.c
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2026-05-17 13:05:15 -1000
committerNathan Chancellor <nathan@kernel.org>2026-05-27 15:20:06 -0700
commit12b7bf92bddd449e4e72e23d5b4e2ed730e4d3e8 (patch)
treebf4d5afe5851659567e626e4aca9ef433b498654 /arch/x86/kernel/module.c
parent7b3281fcb43c5fce8d4d2b0996d3ac719cb5068b (diff)
x86/module: Revert "Deal with GOT based stack cookie load on Clang < 17"
Now that the minimum supported version of LLVM for building the kernel has been raised to 17.0.1, the workaround added by 78c4374ef8b8 ("x86/module: Deal with GOT based stack cookie load on Clang < 17") will never be included, as the final clause in the preprocessor conditional is always false. Revert the change to clean up the dead code. Acked-by: Ard Biesheuvel <ardb@kernel.org> Link: https://patch.msgid.link/20260517-bump-minimum-supported-llvm-version-to-17-v2-12-b3b8cda46bdd@kernel.org Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Diffstat (limited to 'arch/x86/kernel/module.c')
-rw-r--r--arch/x86/kernel/module.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/arch/x86/kernel/module.c b/arch/x86/kernel/module.c
index 11c45ce42694..b5b4de4f08e6 100644
--- a/arch/x86/kernel/module.c
+++ b/arch/x86/kernel/module.c
@@ -19,7 +19,6 @@
#include <linux/jump_label.h>
#include <linux/random.h>
#include <linux/memory.h>
-#include <linux/stackprotector.h>
#include <asm/text-patching.h>
#include <asm/page.h>
@@ -132,20 +131,6 @@ static int __write_relocate_add(Elf64_Shdr *sechdrs,
goto overflow;
size = 4;
break;
-#if defined(CONFIG_STACKPROTECTOR) && \
- defined(CONFIG_CC_IS_CLANG) && CONFIG_CLANG_VERSION < 170000
- case R_X86_64_REX_GOTPCRELX: {
- static unsigned long __percpu *const addr = &__stack_chk_guard;
-
- if (sym->st_value != (u64)addr) {
- pr_err("%s: Unsupported GOTPCREL relocation\n", me->name);
- return -ENOEXEC;
- }
-
- val = (u64)&addr + rel[i].r_addend;
- fallthrough;
- }
-#endif
case R_X86_64_PC32:
case R_X86_64_PLT32:
val -= (u64)loc;