Add support for i686 architecture

This commit is contained in:
eabdullin 2026-01-23 12:56:46 +03:00
parent 1a2d50c7f1
commit b754b6604c
6 changed files with 17153 additions and 0 deletions

View File

@ -0,0 +1,35 @@
From 44fe6b26d992d1e432f62c6f817814a77bb803fb Mon Sep 17 00:00:00 2001
From: eabdullin <eabdullin@almalinux.org>
Date: Thu, 22 Jan 2026 11:41:17 +0300
Subject: [PATCH] panic: Fix TAINT_FLAGS_MAX overflow on i686
Red Hat specific taint flags extend TAINT_FLAGS_COUNT to 32.
On 32-bit architectures this makes (1UL << TAINT_FLAGS_COUNT)
an invalid shift (shift by the width of unsigned long), resulting
in undefined behaviour and build failures with -Wshift-count-overflow.
Fix this by avoiding the shift when TAINT_FLAGS_COUNT >= BITS_PER_LONG
and using an all-bits-set mask instead.
---
include/linux/panic.h | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/include/linux/panic.h b/include/linux/panic.h
index 0ac2aa0c0..ccef37b4b 100644
--- a/include/linux/panic.h
+++ b/include/linux/panic.h
@@ -92,7 +92,12 @@ static inline void set_arch_panic_timeout(int timeout, int arch_default_timeout)
#define TAINT_UNPRIVILEGED_BPF 31
/* End of Red Hat-specific taint flags */
#define TAINT_FLAGS_COUNT 32
+
+#if TAINT_FLAGS_COUNT >= BITS_PER_LONG
+#define TAINT_FLAGS_MAX (~0UL)
+#else
#define TAINT_FLAGS_MAX ((1UL << TAINT_FLAGS_COUNT) - 1)
+#endif
struct taint_flag {
char c_true; /* character printed when tainted */
--
2.51.0

1
Module.kabi_dup_i686 Symbolic link
View File

@ -0,0 +1 @@
Module.kabi_dup_x86_64

1
Module.kabi_i686 Symbolic link
View File

@ -0,0 +1 @@
Module.kabi_x86_64

File diff suppressed because it is too large Load Diff

8539
kernel-i686-rhel.config Normal file

File diff suppressed because it is too large Load Diff

View File

@ -620,6 +620,10 @@ Summary: The Linux kernel
%define nobuildarches i386 i686
%endif
%if 0%{?almalinux}
%define nobuildarches i386
%endif
%ifarch %nobuildarches
# disable BuildKernel commands
%define with_up 0
@ -973,6 +977,8 @@ Source32: %{name}-x86_64-rhel.config
Source33: %{name}-x86_64-debug-rhel.config
Source10001: %{name}-x86_64_v2-rhel.config
Source10002: %{name}-x86_64_v2-debug-rhel.config
Source10003: %{name}-i686-rhel.config
Source10004: %{name}-i686-debug-rhel.config
# ARM64 64K page-size kernel config
Source42: %{name}-aarch64-64k-rhel.config
Source43: %{name}-aarch64-64k-debug-rhel.config
@ -1055,6 +1061,7 @@ Source203: Module.kabi_s390x
Source204: Module.kabi_x86_64
Source205: Module.kabi_riscv64
Source206: Module.kabi_x86_64_v2
Source207: Module.kabi_i686
Source210: Module.kabi_dup_aarch64
Source211: Module.kabi_dup_ppc64le
@ -1062,6 +1069,7 @@ Source212: Module.kabi_dup_s390x
Source213: Module.kabi_dup_x86_64
Source214: Module.kabi_dup_riscv64
Source215: Module.kabi_dup_x86_64_v2
Source216: Module.kabi_dup_i686
Source300: kernel-abi-stablelists-%{kabiversion}.tar.xz
Source301: kernel-kabi-dw-%{kabiversion}.tar.xz
@ -1149,6 +1157,9 @@ Patch2007: 0007-Bring-back-deprecated-pci-ids-to-be2iscsi-driver.patch
Patch2008: 0008-Bring-back-deprecated-pci-ids-to-megaraid_sas-driver.patch
Patch2009: 0009-Bring-back-deprecated-pci-ids-to-mpt3sas-driver.patch
# i686 specific patches
Patch2010: 0001-panic-Fix-TAINT_FLAGS_MAX-overflow-on-i686.patch
# END OF PATCH DEFINITIONS
%description
@ -2008,6 +2019,10 @@ ApplyPatch 0007-Bring-back-deprecated-pci-ids-to-be2iscsi-driver.patch
ApplyPatch 0008-Bring-back-deprecated-pci-ids-to-megaraid_sas-driver.patch
ApplyPatch 0009-Bring-back-deprecated-pci-ids-to-mpt3sas-driver.patch
%ifarch i686
ApplyPatch 0001-panic-Fix-TAINT_FLAGS_MAX-overflow-on-i686.patch
%endif
%{log_msg "End of patch applications"}
# END OF PATCH APPLICATIONS
@ -2689,7 +2704,9 @@ BuildKernel() {
cp -a --parents tools/arch/x86/include/asm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
cp -a --parents tools/arch/x86/include/uapi/asm $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
%ifnarch i686
cp -a --parents tools/objtool/arch/x86/lib $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
%endif
cp -a --parents tools/arch/x86/lib/ $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
cp -a --parents tools/arch/x86/tools/gen-insn-attr-x86.awk $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
cp -a --parents tools/objtool/arch/x86/ $RPM_BUILD_ROOT/lib/modules/$KernelVer/build
@ -4517,6 +4534,9 @@ fi\
#
#
%changelog
* Fri Jan 23 2026 Eduard Abdullin <eabdullin@almalinux.org> - 6.12.0-187
- Add support for i686 architecture
* Wed Jan 21 2026 Eduard Abdullin <eabdullin@almalinux.org> - 6.12.0-187
- Debrand for AlmaLinux OS
- Use AlmaLinux OS secure boot cert