[packages/kernel/LINUX_5_15] - rel 2, fix x86 build
baggins
baggins at pld-linux.org
Sat May 24 13:39:15 CEST 2025
commit fe4c6f622d78cee2bbfa03d3e576b7d770271ed8
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Sat May 24 14:47:06 2025 +0200
- rel 2, fix x86 build
new functions used all over arch code wre hidden behind x86_64-specific features
kernel-small_fixes.patch | 46 ++++++++++++++++++++++++++++++++++++++++++++++
kernel-x86.config | 2 +-
kernel.spec | 2 +-
3 files changed, 48 insertions(+), 2 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 19466dd4..c37ff6f4 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -65,7 +65,7 @@
%define have_pcmcia 0
%endif
-%define rel 1
+%define rel 2
%define basever 5.15
%define postver .184
diff --git a/kernel-small_fixes.patch b/kernel-small_fixes.patch
index dc2c31ff..24442d4c 100644
--- a/kernel-small_fixes.patch
+++ b/kernel-small_fixes.patch
@@ -107,3 +107,49 @@ diff -ur linux-5.3/drivers/scsi/aacraid.org/linit.c linux-5.3/drivers/scsi/aacra
if (dev->msi_enabled)
+--- linux-5.15/arch/x86/kernel/alternative.c.orig 2025-05-24 14:33:00.616663327 +0200
++++ linux-5.15/arch/x86/kernel/alternative.c 2025-05-24 14:42:49.963329920 +0200
+@@ -359,6 +359,21 @@
+ return insn->opcode.bytes[0] == 0x0f && (insn->opcode.bytes[1] & 0xf0) == 0x80;
+ }
+
++bool cpu_wants_rethunk(void)
++{
++ return cpu_feature_enabled(X86_FEATURE_RETHUNK);
++}
++
++bool cpu_wants_rethunk_at(void *addr)
++{
++ if (!cpu_feature_enabled(X86_FEATURE_RETHUNK))
++ return false;
++ if (x86_return_thunk != its_return_thunk)
++ return true;
++
++ return !((unsigned long)addr & 0x20);
++}
++
+ #if defined(CONFIG_RETPOLINE) && defined(CONFIG_STACK_VALIDATION)
+
+ /*
+@@ -749,21 +764,6 @@
+
+ #ifdef CONFIG_RETHUNK
+
+-bool cpu_wants_rethunk(void)
+-{
+- return cpu_feature_enabled(X86_FEATURE_RETHUNK);
+-}
+-
+-bool cpu_wants_rethunk_at(void *addr)
+-{
+- if (!cpu_feature_enabled(X86_FEATURE_RETHUNK))
+- return false;
+- if (x86_return_thunk != its_return_thunk)
+- return true;
+-
+- return !((unsigned long)addr & 0x20);
+-}
+-
+ /*
+ * Rewrite the compiler generated return thunk tail-calls.
+ *
diff --git a/kernel-x86.config b/kernel-x86.config
index 32d575ab..5e136e0c 100644
--- a/kernel-x86.config
+++ b/kernel-x86.config
@@ -108,7 +108,7 @@ CPU_MITIGATIONS x86=y x86_64=y
RETPOLINE x86=y
SLS x86=y
GDS_FORCE_MITIGATION all=n
-MITIGATION_RFDS x86_64=y
+MITIGATION_RFDS x86=y x86_64=y
MITIGATION_SPECTRE_BHI x86=y x86_64=y
MITIGATION_ITS x86_64=y
#- file kernel/power/Kconfig goes here
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/fe4c6f622d78cee2bbfa03d3e576b7d770271ed8
More information about the pld-cvs-commit
mailing list