From 2da23d4a948ddf4bc1c01e55e09a3f2e3f8a2f7f Mon Sep 17 00:00:00 2001 From: Jacob Wang Date: Thu, 24 Jul 2025 09:29:56 +0800 Subject: [PATCH 1/2] [CVE]update to kernel-4.18.0-553.63.1 to #ICOEZO update to kernel-4.18.0-553.63.1 for CVE-2024-50154 CVE-2025-38086 Project: TC2024080204 Signed-off-by: Jacob Wang --- download | 4 +- kernel-aarch64-debug.config | 1 + kernel-aarch64.config | 1 + kernel-ppc64le-debug.config | 1 + kernel-ppc64le.config | 1 + kernel-s390x-debug.config | 1 + kernel-s390x-zfcpdump.config | 1 + kernel-s390x.config | 1 + kernel-x86_64-debug.config | 1 + kernel-x86_64.config | 1 + kernel.spec | 28 +++++-- ...es-causes-kernel-compilation-to-fail.patch | 11 --- standalone-aarch64.c | 41 ++++++++++ standalone-ppc64le.c | 79 +++++++++++++++++++ standalone-s390x.c | 29 +++++++ standalone-x86_64.c | 37 +++++++++ 16 files changed, 218 insertions(+), 20 deletions(-) delete mode 100644 repair-dwarves-causes-kernel-compilation-to-fail.patch create mode 100644 standalone-aarch64.c create mode 100644 standalone-ppc64le.c create mode 100644 standalone-s390x.c create mode 100644 standalone-x86_64.c diff --git a/download b/download index a3bb8f2..82d09da 100644 --- a/download +++ b/download @@ -1,3 +1,3 @@ -d029616e4dee467c9597e0593706e62b kernel-abi-stablelists-4.18.0-553.tar.bz2 +e74a198308ed206e8b710a97df24e6fd kernel-abi-stablelists-4.18.0-553.tar.bz2 dacb6c59855053065f7f64fcfb9aa828 kernel-kabi-dw-4.18.0-553.tar.bz2 -3ff977a1a488eb8ce11d8b3f9de1bf94 linux-4.18.0-553.62.1.el8_10.tar.xz +868fdf964135b0b895beb2bda8dfa2a0 linux-4.18.0-553.63.1.el8_10.tar.xz diff --git a/kernel-aarch64-debug.config b/kernel-aarch64-debug.config index 82cb82d..474579a 100644 --- a/kernel-aarch64-debug.config +++ b/kernel-aarch64-debug.config @@ -1591,6 +1591,7 @@ # CONFIG_RFD77402 is not set # CONFIG_RFD_FTL is not set # CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set +# CONFIG_RH_KABI_STABLE_ASM_OFFSETS is not set # CONFIG_RING_BUFFER_STARTUP_TEST is not set # CONFIG_RMI4_F54 is not set # CONFIG_RMNET is not set diff --git a/kernel-aarch64.config b/kernel-aarch64.config index 62f3b6f..f78f6e5 100644 --- a/kernel-aarch64.config +++ b/kernel-aarch64.config @@ -4743,6 +4743,7 @@ CONFIG_RFKILL_GPIO=m CONFIG_RFKILL_INPUT=y CONFIG_RHEL_DIFFERENCES=y CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y +CONFIG_RH_KABI_STABLE_ASM_OFFSETS=y CONFIG_RING_BUFFER_BENCHMARK=m CONFIG_RMI4_2D_SENSOR=y CONFIG_RMI4_CORE=m diff --git a/kernel-ppc64le-debug.config b/kernel-ppc64le-debug.config index bc16c7d..312c622 100644 --- a/kernel-ppc64le-debug.config +++ b/kernel-ppc64le-debug.config @@ -1457,6 +1457,7 @@ # CONFIG_RFD_FTL is not set # CONFIG_RFKILL_GPIO is not set # CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set +# CONFIG_RH_KABI_STABLE_ASM_OFFSETS is not set # CONFIG_RING_BUFFER_STARTUP_TEST is not set # CONFIG_RMI4_F54 is not set # CONFIG_RMNET is not set diff --git a/kernel-ppc64le.config b/kernel-ppc64le.config index d36880c..ee6239b 100644 --- a/kernel-ppc64le.config +++ b/kernel-ppc64le.config @@ -4403,6 +4403,7 @@ CONFIG_RFKILL=m CONFIG_RFKILL_INPUT=y CONFIG_RHEL_DIFFERENCES=y CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y +CONFIG_RH_KABI_STABLE_ASM_OFFSETS=y CONFIG_RING_BUFFER_BENCHMARK=m CONFIG_RMI4_2D_SENSOR=y CONFIG_RMI4_CORE=m diff --git a/kernel-s390x-debug.config b/kernel-s390x-debug.config index e841d38..d3f72d6 100644 --- a/kernel-s390x-debug.config +++ b/kernel-s390x-debug.config @@ -1552,6 +1552,7 @@ # CONFIG_RFD_FTL is not set # CONFIG_RFKILL_GPIO is not set # CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set +# CONFIG_RH_KABI_STABLE_ASM_OFFSETS is not set # CONFIG_RING_BUFFER_STARTUP_TEST is not set # CONFIG_RMI4_CORE is not set # CONFIG_RMI4_F54 is not set diff --git a/kernel-s390x-zfcpdump.config b/kernel-s390x-zfcpdump.config index 3e61fd8..9135e31 100644 --- a/kernel-s390x-zfcpdump.config +++ b/kernel-s390x-zfcpdump.config @@ -1760,6 +1760,7 @@ # CONFIG_RFD_FTL is not set # CONFIG_RFKILL is not set # CONFIG_RFKILL_GPIO is not set +# CONFIG_RH_KABI_STABLE_ASM_OFFSETS is not set # CONFIG_RING_BUFFER_STARTUP_TEST is not set # CONFIG_RMI4_CORE is not set # CONFIG_RMI4_F54 is not set diff --git a/kernel-s390x.config b/kernel-s390x.config index 7708b72..8f8e46f 100644 --- a/kernel-s390x.config +++ b/kernel-s390x.config @@ -4348,6 +4348,7 @@ CONFIG_RFKILL=m CONFIG_RFKILL_INPUT=y CONFIG_RHEL_DIFFERENCES=y CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y +CONFIG_RH_KABI_STABLE_ASM_OFFSETS=y CONFIG_RING_BUFFER_BENCHMARK=m CONFIG_RMI4_2D_SENSOR=y CONFIG_RMI4_F03=y diff --git a/kernel-x86_64-debug.config b/kernel-x86_64-debug.config index ebfd1fd..779f161 100644 --- a/kernel-x86_64-debug.config +++ b/kernel-x86_64-debug.config @@ -1429,6 +1429,7 @@ # CONFIG_RFD_FTL is not set # CONFIG_RFKILL_GPIO is not set # CONFIG_RH_KABI_SIZE_ALIGN_CHECKS is not set +# CONFIG_RH_KABI_STABLE_ASM_OFFSETS is not set # CONFIG_RING_BUFFER_STARTUP_TEST is not set # CONFIG_RMI4_F54 is not set # CONFIG_RMNET is not set diff --git a/kernel-x86_64.config b/kernel-x86_64.config index 705b265..c7fc8a8 100644 --- a/kernel-x86_64.config +++ b/kernel-x86_64.config @@ -4654,6 +4654,7 @@ CONFIG_RFKILL=m CONFIG_RFKILL_INPUT=y CONFIG_RHEL_DIFFERENCES=y CONFIG_RH_KABI_SIZE_ALIGN_CHECKS=y +CONFIG_RH_KABI_STABLE_ASM_OFFSETS=y CONFIG_RING_BUFFER_BENCHMARK=m CONFIG_RMI4_2D_SENSOR=y CONFIG_RMI4_CORE=m diff --git a/kernel.spec b/kernel.spec index 8e658d3..acadd8e 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1,6 +1,5 @@ # We have to override the new %%install behavior because, well... the kernel is special. %global __spec_install_pre %{___build_pre} -%define anolis_release .0.1 # At the time of this writing (2019-03), RHEL8 packages use w2.xzdio # compression for rpms (xz, level 2). @@ -39,10 +38,10 @@ # define buildid .local %define specversion 4.18.0 -%define pkgrelease 553.62.1.el8_10 +%define pkgrelease 553.63.1.el8_10 # allow pkg_release to have configurable %%{?dist} tag -%define specrelease 553.62.1%{anolis_release}%{?dist} +%define specrelease 553.63.1%{?dist} %define pkg_release %{specrelease}%{?buildid} @@ -523,6 +522,11 @@ Source211: Module.kabi_dup_ppc64le Source212: Module.kabi_dup_s390x Source213: Module.kabi_dup_x86_64 +Source221: standalone-aarch64.c +Source222: standalone-ppc64le.c +Source223: standalone-s390x.c +Source224: standalone-x86_64.c + Source300: kernel-abi-stablelists-%{specversion}-%{distro_build}.tar.bz2 Source301: kernel-kabi-dw-%{specversion}-%{distro_build}.tar.bz2 %endif @@ -545,7 +549,6 @@ Source4001: rpminspect.yaml # empty final patch to facilitate testing of kernel patches Patch999999: linux-kernel-test.patch -Patch1000: repair-dwarves-causes-kernel-compilation-to-fail.patch # END OF PATCH DEFINITIONS @@ -1103,7 +1106,6 @@ mv linux-%{specversion}-%{pkgrelease} linux-%{KVERREL} cd linux-%{KVERREL} ApplyOptionalPatch linux-kernel-test.patch -%patch1000 -p0 -b .repair-dwarves-causes-kernel-compilation-to-fail # END OF PATCH APPLICATIONS @@ -1432,6 +1434,10 @@ BuildKernel() { else echo "**** NOTE: Cannot find reference Module.kabi file. ****" fi + + if [ -e $RPM_SOURCE_DIR/standalone-%{_target_cpu}$Flavour.c ]; then + gcc -I./include/ -c $RPM_SOURCE_DIR/standalone-%{_target_cpu}$Flavour.c + fi %endif %if %{with_kabidupchk} @@ -2699,8 +2705,16 @@ fi # # %changelog -* Thu Jul 17 2025 Xiaoping Liu - 4.18.0-553.62.1.0.1 -- kernel:repair dwarves causes kernel compilation to fail +* Thu Jul 17 2025 Denys Vlasenko [4.18.0-553.63.1.el8_10] +- tcp/dccp: Don't use timer_pending() in reqsk_queue_unlink(). (Guillaume Nault) [RHEL-66324] {CVE-2024-50154} +- net: ch9200: fix uninitialised access during mii_nway_restart (CKI Backport Bot) [RHEL-101200] {CVE-2025-38086} +- mm/swapfile: add cond_resched() in get_swap_pages() (Nico Pache) [RHEL-80401] {CVE-2023-52932} +- dlm: fix possible lkb_resource null dereference (Alexander Aring) [RHEL-64452] +- fs: dlm: handle -EINVAL as log_error() (Alexander Aring) [RHEL-64452] +- redhat/configs: enable CONFIG_RH_KABI_STABLE_ASM_OFFSETS (Čestmír Kalina) [RHEL-90099] +- kabi: freeze stablelist and stackprotector-related constants (Čestmír Kalina) [RHEL-90099] +- kabi: add redhat/kabi/asm-offsets (Čestmír Kalina) [RHEL-90099] +- kabi: add RH_KABI_ASSERT_EQ_CONST{,EXPR} (Čestmír Kalina) [RHEL-90099] * Thu Jul 10 2025 Denys Vlasenko [4.18.0-553.62.1.el8_10] - s390/virtio_ccw: Don't allocate/assign airqs for non-existing queues (David Hildenbrand) [RHEL-87557] diff --git a/repair-dwarves-causes-kernel-compilation-to-fail.patch b/repair-dwarves-causes-kernel-compilation-to-fail.patch deleted file mode 100644 index 74f4020..0000000 --- a/repair-dwarves-causes-kernel-compilation-to-fail.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- Makefile.orig 2022-10-07 22:45:37.000000000 +0800 -+++ Makefile 2023-02-22 15:37:33.069118145 +0800 -@@ -378,7 +378,7 @@ - STRIP = $(CROSS_COMPILE)strip - OBJCOPY = $(CROSS_COMPILE)objcopy - OBJDUMP = $(CROSS_COMPILE)objdump --PAHOLE = pahole -+PAHOLE = pahole --skip_encoding_btf_enum64 - RESOLVE_BTFIDS = $(objtree)/tools/bpf/resolve_btfids/resolve_btfids - LEX = flex - YACC = bison diff --git a/standalone-aarch64.c b/standalone-aarch64.c new file mode 100644 index 0000000..854a0bf --- /dev/null +++ b/standalone-aarch64.c @@ -0,0 +1,41 @@ +#include +#include +#include +int main(void) +{ + RH_KABI_ASSERT_EQ_CONST(728, MM_CONTEXT_ID); /* offsetof(struct mm_struct, context.id.counter) */ + RH_KABI_ASSERT_EQ_CONST(320, S_FRAME_SIZE); /* sizeof(struct pt_regs) */ + RH_KABI_ASSERT_EQ_CONST(240, S_LR); /* offsetof(struct pt_regs, regs[30]) */ + RH_KABI_ASSERT_EQ_CONST(288, S_ORIG_ADDR_LIMIT); /* offsetof(struct pt_regs, orig_addr_limit) */ + RH_KABI_ASSERT_EQ_CONST(256, S_PC); /* offsetof(struct pt_regs, pc) */ + RH_KABI_ASSERT_EQ_CONST(296, S_PMR_SAVE); /* offsetof(struct pt_regs, pmr_save) */ + RH_KABI_ASSERT_EQ_CONST(264, S_PSTATE); /* offsetof(struct pt_regs, pstate) */ + RH_KABI_ASSERT_EQ_CONST(248, S_SP); /* offsetof(struct pt_regs, sp) */ + RH_KABI_ASSERT_EQ_CONST(304, S_STACKFRAME); /* offsetof(struct pt_regs, stackframe) */ + RH_KABI_ASSERT_EQ_CONST(280, S_SYSCALLNO); /* offsetof(struct pt_regs, syscallno) */ + RH_KABI_ASSERT_EQ_CONST(0, S_X0); /* offsetof(struct pt_regs, regs[0]) */ + RH_KABI_ASSERT_EQ_CONST(80, S_X10); /* offsetof(struct pt_regs, regs[10]) */ + RH_KABI_ASSERT_EQ_CONST(96, S_X12); /* offsetof(struct pt_regs, regs[12]) */ + RH_KABI_ASSERT_EQ_CONST(112, S_X14); /* offsetof(struct pt_regs, regs[14]) */ + RH_KABI_ASSERT_EQ_CONST(128, S_X16); /* offsetof(struct pt_regs, regs[16]) */ + RH_KABI_ASSERT_EQ_CONST(144, S_X18); /* offsetof(struct pt_regs, regs[18]) */ + RH_KABI_ASSERT_EQ_CONST(160, S_X20); /* offsetof(struct pt_regs, regs[20]) */ + RH_KABI_ASSERT_EQ_CONST(16, S_X2); /* offsetof(struct pt_regs, regs[2]) */ + RH_KABI_ASSERT_EQ_CONST(176, S_X22); /* offsetof(struct pt_regs, regs[22]) */ + RH_KABI_ASSERT_EQ_CONST(192, S_X24); /* offsetof(struct pt_regs, regs[24]) */ + RH_KABI_ASSERT_EQ_CONST(208, S_X26); /* offsetof(struct pt_regs, regs[26]) */ + RH_KABI_ASSERT_EQ_CONST(224, S_X28); /* offsetof(struct pt_regs, regs[28]) */ + RH_KABI_ASSERT_EQ_CONST(32, S_X4); /* offsetof(struct pt_regs, regs[4]) */ + RH_KABI_ASSERT_EQ_CONST(48, S_X6); /* offsetof(struct pt_regs, regs[6]) */ + RH_KABI_ASSERT_EQ_CONST(64, S_X8); /* offsetof(struct pt_regs, regs[8]) */ + RH_KABI_ASSERT_EQ_CONST(3344, THREAD_CPU_CONTEXT); /* offsetof(struct task_struct, thread.cpu_context) */ + RH_KABI_ASSERT_EQ_CONST(1688, TSK_ACTIVE_MM); /* offsetof(struct task_struct, active_mm) */ + RH_KABI_ASSERT_EQ_CONST(32, TSK_STACK); /* offsetof(struct task_struct, stack) */ + RH_KABI_ASSERT_EQ_CONST(1864, TSK_STACK_CANARY); /* offsetof(struct task_struct, stack_canary) */ + RH_KABI_ASSERT_EQ_CONST(8, TSK_TI_ADDR_LIMIT); /* offsetof(struct task_struct, thread_info.addr_limit) */ + RH_KABI_ASSERT_EQ_CONST(0, TSK_TI_FLAGS); /* offsetof(struct task_struct, thread_info.flags) */ + RH_KABI_ASSERT_EQ_CONST(16, TSK_TI_PREEMPT); /* offsetof(struct task_struct, thread_info.preempt_count) */ + RH_KABI_ASSERT_EQ_CONST(80, VMA_VM_FLAGS); /* offsetof(struct vm_area_struct, vm_flags) */ + RH_KABI_ASSERT_EQ_CONST(64, VMA_VM_MM); /* offsetof(struct vm_area_struct, vm_mm) */ + return 0; +} diff --git a/standalone-ppc64le.c b/standalone-ppc64le.c new file mode 100644 index 0000000..f8a25fd --- /dev/null +++ b/standalone-ppc64le.c @@ -0,0 +1,79 @@ +#include +#include +#include +int main(void) +{ + RH_KABI_ASSERT_EQ_CONST(24, BUG_ENTRY_SIZE); /* sizeof(struct bug_entry) */ + RH_KABI_ASSERT_EQ_CONST(416, _CCR); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, ccr) */ + RH_KABI_ASSERT_EQ_CONST(392, _CTR); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, ctr) */ + RH_KABI_ASSERT_EQ_CONST(440, _DAR); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, dar) */ + RH_KABI_ASSERT_EQ_CONST(448, _DSISR); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, dsisr) */ + RH_KABI_ASSERT_EQ_CONST(512, FPSTATE_FPSCR); /* offsetof(struct thread_fp_state, fpscr) */ + RH_KABI_ASSERT_EQ_CONST(112, GPR0); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[0]) */ + RH_KABI_ASSERT_EQ_CONST(192, GPR10); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[10]) */ + RH_KABI_ASSERT_EQ_CONST(200, GPR11); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[11]) */ + RH_KABI_ASSERT_EQ_CONST(120, GPR1); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[1]) */ + RH_KABI_ASSERT_EQ_CONST(208, GPR12); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[12]) */ + RH_KABI_ASSERT_EQ_CONST(216, GPR13); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[13]) */ + RH_KABI_ASSERT_EQ_CONST(128, GPR2); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[2]) */ + RH_KABI_ASSERT_EQ_CONST(136, GPR3); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[3]) */ + RH_KABI_ASSERT_EQ_CONST(144, GPR4); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[4]) */ + RH_KABI_ASSERT_EQ_CONST(152, GPR5); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[5]) */ + RH_KABI_ASSERT_EQ_CONST(160, GPR6); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[6]) */ + RH_KABI_ASSERT_EQ_CONST(168, GPR7); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[7]) */ + RH_KABI_ASSERT_EQ_CONST(176, GPR8); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[8]) */ + RH_KABI_ASSERT_EQ_CONST(184, GPR9); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, gpr[9]) */ + RH_KABI_ASSERT_EQ_CONST(0, KSP); /* offsetof(struct thread_struct, ksp) */ + RH_KABI_ASSERT_EQ_CONST(8, KSP_VSID); /* offsetof(struct thread_struct, ksp_vsid) */ + RH_KABI_ASSERT_EQ_CONST(400, _LINK); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, link) */ + RH_KABI_ASSERT_EQ_CONST(1488, MM); /* offsetof(struct task_struct, mm) */ + RH_KABI_ASSERT_EQ_CONST(920, MMCONTEXTID); /* offsetof(struct mm_struct, context.id) */ + RH_KABI_ASSERT_EQ_CONST(376, _MSR); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, msr) */ + RH_KABI_ASSERT_EQ_CONST(368, _NIP); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, nip) */ + RH_KABI_ASSERT_EQ_CONST(384, ORIG_GPR3); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, orig_gpr3) */ + RH_KABI_ASSERT_EQ_CONST(3328, PACA_CANARY); /* offsetof(struct paca_struct, canary) */ + RH_KABI_ASSERT_EQ_CONST(464, _PPR); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, ppr) */ + RH_KABI_ASSERT_EQ_CONST(1240, PT_CKPT_REGS); /* offsetof(struct thread_struct, ckpt_regs) */ + RH_KABI_ASSERT_EQ_CONST(16, PT_REGS); /* offsetof(struct thread_struct, regs) */ + RH_KABI_ASSERT_EQ_CONST(456, RESULT); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, result) */ + RH_KABI_ASSERT_EQ_CONST(424, SOFTE); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, softe) */ + RH_KABI_ASSERT_EQ_CONST(480, SWITCH_FRAME_SIZE); /* STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) */ + RH_KABI_ASSERT_EQ_CONST(1768, TASK_CANARY); /* offsetof(struct task_struct, stack_canary) */ + RH_KABI_ASSERT_EQ_CONST(3168, THREAD); /* offsetof(struct task_struct, thread) */ + RH_KABI_ASSERT_EQ_CONST(1632, THREAD_CKFPSTATE); /* offsetof(struct thread_struct, ckfp_state.fpr) */ + RH_KABI_ASSERT_EQ_CONST(2688, THREAD_CKVRSAVE); /* offsetof(struct thread_struct, ckvrsave) */ + RH_KABI_ASSERT_EQ_CONST(2160, THREAD_CKVRSTATE); /* offsetof(struct thread_struct, ckvr_state.vr) */ + RH_KABI_ASSERT_EQ_CONST(568, THREAD_FPEXC_MODE); /* offsetof(struct thread_struct, fpexc_mode) */ + RH_KABI_ASSERT_EQ_CONST(560, THREAD_FPSAVEAREA); /* offsetof(struct thread_struct, fp_save_area) */ + RH_KABI_ASSERT_EQ_CONST(32, THREAD_FPSTATE); /* offsetof(struct thread_struct, fp_state.fpr) */ + RH_KABI_ASSERT_EQ_CONST(648, THREAD_LOAD_FP); /* offsetof(struct thread_struct, load_fp) */ + RH_KABI_ASSERT_EQ_CONST(649, THREAD_LOAD_VEC); /* offsetof(struct thread_struct, load_vec) */ + RH_KABI_ASSERT_EQ_CONST(1624, THREAD_TM_DSCR); /* offsetof(struct thread_struct, tm_dscr) */ + RH_KABI_ASSERT_EQ_CONST(1616, THREAD_TM_PPR); /* offsetof(struct thread_struct, tm_ppr) */ + RH_KABI_ASSERT_EQ_CONST(1608, THREAD_TM_TAR); /* offsetof(struct thread_struct, tm_tar) */ + RH_KABI_ASSERT_EQ_CONST(1224, THREAD_TM_TEXASR); /* offsetof(struct thread_struct, tm_texasr) */ + RH_KABI_ASSERT_EQ_CONST(1216, THREAD_TM_TFHAR); /* offsetof(struct thread_struct, tm_tfhar) */ + RH_KABI_ASSERT_EQ_CONST(1232, THREAD_TM_TFIAR); /* offsetof(struct thread_struct, tm_tfiar) */ + RH_KABI_ASSERT_EQ_CONST(1200, THREAD_USED_VR); /* offsetof(struct thread_struct, used_vr) */ + RH_KABI_ASSERT_EQ_CONST(1204, THREAD_USED_VSR); /* offsetof(struct thread_struct, used_vsr) */ + RH_KABI_ASSERT_EQ_CONST(1192, THREAD_VRSAVE); /* offsetof(struct thread_struct, vrsave) */ + RH_KABI_ASSERT_EQ_CONST(1184, THREAD_VRSAVEAREA); /* offsetof(struct thread_struct, vr_save_area) */ + RH_KABI_ASSERT_EQ_CONST(656, THREAD_VRSTATE); /* offsetof(struct thread_struct, vr_state.vr) */ + RH_KABI_ASSERT_EQ_CONST(8, TI_CPU); /* offsetof(struct thread_info, cpu) */ + RH_KABI_ASSERT_EQ_CONST(128, TI_FLAGS); /* offsetof(struct thread_info, flags) */ + RH_KABI_ASSERT_EQ_CONST(24, TI_livepatch_sp); /* offsetof(struct thread_info, livepatch_sp) */ + RH_KABI_ASSERT_EQ_CONST(16, TI_LOCAL_FLAGS); /* offsetof(struct thread_info, local_flags) */ + RH_KABI_ASSERT_EQ_CONST(12, TI_PREEMPT); /* offsetof(struct thread_info, preempt_count) */ + RH_KABI_ASSERT_EQ_CONST(0, TI_TASK); /* offsetof(struct thread_info, task) */ + RH_KABI_ASSERT_EQ_CONST(496, TM_FRAME_SIZE); /* STACK_FRAME_OVERHEAD + sizeof(struct pt_regs) + 16 */ + RH_KABI_ASSERT_EQ_CONST(432, _TRAP); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, trap) */ + RH_KABI_ASSERT_EQ_CONST(4, TSPC32_TV_NSEC); /* offsetof(struct compat_timespec, tv_nsec) */ + RH_KABI_ASSERT_EQ_CONST(0, TSPC32_TV_SEC); /* offsetof(struct compat_timespec, tv_sec) */ + RH_KABI_ASSERT_EQ_CONST(8, TSPC64_TV_NSEC); /* offsetof(struct timespec, tv_nsec) */ + RH_KABI_ASSERT_EQ_CONST(0, TSPC64_TV_SEC); /* offsetof(struct timespec, tv_sec) */ + RH_KABI_ASSERT_EQ_CONST(0, TVAL64_TV_SEC); /* offsetof(struct timeval, tv_sec) */ + RH_KABI_ASSERT_EQ_CONST(8, TVAL64_TV_USEC); /* offsetof(struct timeval, tv_usec) */ + RH_KABI_ASSERT_EQ_CONST(512, VRSTATE_VSCR); /* offsetof(struct thread_vr_state, vscr) */ + RH_KABI_ASSERT_EQ_CONST(408, _XER); /* STACK_FRAME_OVERHEAD + offsetof(struct pt_regs, xer) */ + return 0; +} diff --git a/standalone-s390x.c b/standalone-s390x.c new file mode 100644 index 0000000..ec52009 --- /dev/null +++ b/standalone-s390x.c @@ -0,0 +1,29 @@ +#include +#include +#include +int main(void) +{ + RH_KABI_ASSERT_EQ_CONST(0, __PT_ARGS); /* offsetof(struct pt_regs, args) */ + RH_KABI_ASSERT_EQ_CONST(176, __PT_FLAGS); /* offsetof(struct pt_regs, flags) */ + RH_KABI_ASSERT_EQ_CONST(24, __PT_GPRS); /* offsetof(struct pt_regs, gprs) */ + RH_KABI_ASSERT_EQ_CONST(160, __PT_INT_CODE); /* offsetof(struct pt_regs, int_code) */ + RH_KABI_ASSERT_EQ_CONST(164, __PT_INT_PARM); /* offsetof(struct pt_regs, int_parm) */ + RH_KABI_ASSERT_EQ_CONST(168, __PT_INT_PARM_LONG); /* offsetof(struct pt_regs, int_parm_long) */ + RH_KABI_ASSERT_EQ_CONST(152, __PT_ORIG_GPR2); /* offsetof(struct pt_regs, orig_gpr2) */ + RH_KABI_ASSERT_EQ_CONST(8, __PT_PSW); /* offsetof(struct pt_regs, psw) */ + RH_KABI_ASSERT_EQ_CONST(184, __PT_SIZE); /* sizeof(struct pt_regs) */ + RH_KABI_ASSERT_EQ_CONST(1984, __TASK_pid); /* offsetof(struct task_struct, pid) */ + RH_KABI_ASSERT_EQ_CONST(16, __TASK_stack); /* offsetof(struct task_struct, stack) */ + RH_KABI_ASSERT_EQ_CONST(3256, __TASK_thread); /* offsetof(struct task_struct, thread) */ + RH_KABI_ASSERT_EQ_CONST(560, __THREAD_FPU_fpc); /* offsetof(struct thread_struct, fpu.fpc) */ + RH_KABI_ASSERT_EQ_CONST(568, __THREAD_FPU_regs); /* offsetof(struct thread_struct, fpu.regs) */ + RH_KABI_ASSERT_EQ_CONST(64, __THREAD_ksp); /* offsetof(struct thread_struct, ksp) */ + RH_KABI_ASSERT_EQ_CONST(216, __THREAD_last_break); /* offsetof(struct thread_struct, last_break) */ + RH_KABI_ASSERT_EQ_CONST(184, __THREAD_per_address); /* offsetof(struct thread_struct, per_event.address) */ + RH_KABI_ASSERT_EQ_CONST(176, __THREAD_per_cause); /* offsetof(struct thread_struct, per_event.cause) */ + RH_KABI_ASSERT_EQ_CONST(192, __THREAD_per_paid); /* offsetof(struct thread_struct, per_event.paid) */ + RH_KABI_ASSERT_EQ_CONST(112, __THREAD_sysc_table); /* offsetof(struct thread_struct, sys_call_table) */ + RH_KABI_ASSERT_EQ_CONST(272, __THREAD_trap_tdb); /* offsetof(struct thread_struct, trap_tdb) */ + RH_KABI_ASSERT_EQ_CONST(0, __TI_flags); /* offsetof(struct task_struct, thread_info.flags) */ + return 0; +} diff --git a/standalone-x86_64.c b/standalone-x86_64.c new file mode 100644 index 0000000..f709524 --- /dev/null +++ b/standalone-x86_64.c @@ -0,0 +1,37 @@ +#include +#include +#include +int main(void) +{ + RH_KABI_ASSERT_EQ_CONST(64, crypto_tfm_ctx_offset); /* offsetof(struct crypto_tfm, __crt_ctx) */ + RH_KABI_ASSERT_EQ_CONST(24, PARAVIRT_PATCH_pv_cpu_ops); /* offsetof(struct paravirt_patch_template, pv_cpu_ops) */ + RH_KABI_ASSERT_EQ_CONST(296, PARAVIRT_PATCH_pv_irq_ops); /* offsetof(struct paravirt_patch_template, pv_irq_ops) */ + RH_KABI_ASSERT_EQ_CONST(32, pt_regs_bp); /* offsetof(struct pt_regs, bp) */ + RH_KABI_ASSERT_EQ_CONST(40, pt_regs_bx); /* offsetof(struct pt_regs, bx) */ + RH_KABI_ASSERT_EQ_CONST(88, pt_regs_cx); /* offsetof(struct pt_regs, cx) */ + RH_KABI_ASSERT_EQ_CONST(112, pt_regs_di); /* offsetof(struct pt_regs, di) */ + RH_KABI_ASSERT_EQ_CONST(96, pt_regs_dx); /* offsetof(struct pt_regs, dx) */ + RH_KABI_ASSERT_EQ_CONST(144, pt_regs_flags); /* offsetof(struct pt_regs, flags) */ + RH_KABI_ASSERT_EQ_CONST(56, pt_regs_r10); /* offsetof(struct pt_regs, r10) */ + RH_KABI_ASSERT_EQ_CONST(48, pt_regs_r11); /* offsetof(struct pt_regs, r11) */ + RH_KABI_ASSERT_EQ_CONST(24, pt_regs_r12); /* offsetof(struct pt_regs, r12) */ + RH_KABI_ASSERT_EQ_CONST(16, pt_regs_r13); /* offsetof(struct pt_regs, r13) */ + RH_KABI_ASSERT_EQ_CONST(8, pt_regs_r14); /* offsetof(struct pt_regs, r14) */ + RH_KABI_ASSERT_EQ_CONST(0, pt_regs_r15); /* offsetof(struct pt_regs, r15) */ + RH_KABI_ASSERT_EQ_CONST(72, pt_regs_r8); /* offsetof(struct pt_regs, r8) */ + RH_KABI_ASSERT_EQ_CONST(64, pt_regs_r9); /* offsetof(struct pt_regs, r9) */ + RH_KABI_ASSERT_EQ_CONST(104, pt_regs_si); /* offsetof(struct pt_regs, si) */ + RH_KABI_ASSERT_EQ_CONST(168, PTREGS_SIZE); /* sizeof(struct pt_regs) */ + RH_KABI_ASSERT_EQ_CONST(152, pt_regs_sp); /* offsetof(struct pt_regs, sp) */ + RH_KABI_ASSERT_EQ_CONST(240, PV_CPU_iret); /* offsetof(struct pv_cpu_ops, iret) */ + RH_KABI_ASSERT_EQ_CONST(248, PV_CPU_swapgs); /* offsetof(struct pv_cpu_ops, swapgs) */ + RH_KABI_ASSERT_EQ_CONST(232, PV_CPU_usergs_sysret64); /* offsetof(struct pv_cpu_ops, usergs_sysret64) */ + RH_KABI_ASSERT_EQ_CONST(16, PV_IRQ_irq_disable); /* offsetof(struct pv_irq_ops, irq_disable) */ + RH_KABI_ASSERT_EQ_CONST(24, PV_IRQ_irq_enable); /* offsetof(struct pv_irq_ops, irq_enable) */ + RH_KABI_ASSERT_EQ_CONST(0, PV_MMU_read_cr2); /* offsetof(struct pv_mmu_ops, read_cr2) */ + RH_KABI_ASSERT_EQ_CONST(5144, TASK_addr_limit); /* offsetof(struct task_struct, thread.addr_limit) */ + RH_KABI_ASSERT_EQ_CONST(2312, TASK_stack_canary); /* offsetof(struct task_struct, stack_canary) */ + RH_KABI_ASSERT_EQ_CONST(5016, TASK_threadsp); /* offsetof(struct task_struct, thread.sp) */ + RH_KABI_ASSERT_EQ_CONST(0, TASK_TI_flags); /* offsetof(struct task_struct, thread_info.flags) */ + return 0; +} -- Gitee From f57e2c49f590a2b4415d49d9a41a281bd4177a1f Mon Sep 17 00:00:00 2001 From: liuxiaoping Date: Wed, 22 Feb 2023 15:53:19 +0800 Subject: [PATCH 2/2] kernel:repair dwarves causes kernel compilation to fail --- kernel.spec | 8 +++++++- ...ir-dwarves-causes-kernel-compilation-to-fail.patch | 11 +++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 repair-dwarves-causes-kernel-compilation-to-fail.patch diff --git a/kernel.spec b/kernel.spec index acadd8e..568d555 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1,5 +1,6 @@ # We have to override the new %%install behavior because, well... the kernel is special. %global __spec_install_pre %{___build_pre} +%define anolis_release .0.1 # At the time of this writing (2019-03), RHEL8 packages use w2.xzdio # compression for rpms (xz, level 2). @@ -41,7 +42,7 @@ %define pkgrelease 553.63.1.el8_10 # allow pkg_release to have configurable %%{?dist} tag -%define specrelease 553.63.1%{?dist} +%define specrelease 553.63.1%{anolis_release}%{?dist} %define pkg_release %{specrelease}%{?buildid} @@ -549,6 +550,7 @@ Source4001: rpminspect.yaml # empty final patch to facilitate testing of kernel patches Patch999999: linux-kernel-test.patch +Patch1000: repair-dwarves-causes-kernel-compilation-to-fail.patch # END OF PATCH DEFINITIONS @@ -1106,6 +1108,7 @@ mv linux-%{specversion}-%{pkgrelease} linux-%{KVERREL} cd linux-%{KVERREL} ApplyOptionalPatch linux-kernel-test.patch +%patch1000 -p0 -b .repair-dwarves-causes-kernel-compilation-to-fail # END OF PATCH APPLICATIONS @@ -2705,6 +2708,9 @@ fi # # %changelog +* Thu Jul 24 2025 Xiaoping Liu - 4.18.0-553.63.1.0.1 +- kernel:repair dwarves causes kernel compilation to fail + * Thu Jul 17 2025 Denys Vlasenko [4.18.0-553.63.1.el8_10] - tcp/dccp: Don't use timer_pending() in reqsk_queue_unlink(). (Guillaume Nault) [RHEL-66324] {CVE-2024-50154} - net: ch9200: fix uninitialised access during mii_nway_restart (CKI Backport Bot) [RHEL-101200] {CVE-2025-38086} diff --git a/repair-dwarves-causes-kernel-compilation-to-fail.patch b/repair-dwarves-causes-kernel-compilation-to-fail.patch new file mode 100644 index 0000000..74f4020 --- /dev/null +++ b/repair-dwarves-causes-kernel-compilation-to-fail.patch @@ -0,0 +1,11 @@ +--- Makefile.orig 2022-10-07 22:45:37.000000000 +0800 ++++ Makefile 2023-02-22 15:37:33.069118145 +0800 +@@ -378,7 +378,7 @@ + STRIP = $(CROSS_COMPILE)strip + OBJCOPY = $(CROSS_COMPILE)objcopy + OBJDUMP = $(CROSS_COMPILE)objdump +-PAHOLE = pahole ++PAHOLE = pahole --skip_encoding_btf_enum64 + RESOLVE_BTFIDS = $(objtree)/tools/bpf/resolve_btfids/resolve_btfids + LEX = flex + YACC = bison -- Gitee