From 3982b329bc8ca7b7fd94ab610a3be55848a69c3d Mon Sep 17 00:00:00 2001 From: Josh Poimboeuf Date: Tue, 14 Apr 2020 10:14:30 -0500 Subject: [PATCH] kpatch-build: drop support for old non-.klp.arch kernels There were a few kernels (4.7 and 4.8) which didn't have support for .klp.arch sections, but for which we still tried to use CONFIG_LIVEPATCH. Those are inherently buggy, so just drop CONFIG_LIVEPATCH support for them altogether. Signed-off-by: Josh Poimboeuf --- kpatch-build/kpatch-build | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kpatch-build/kpatch-build b/kpatch-build/kpatch-build index fdc8b4d..a08fd0f 100755 --- a/kpatch-build/kpatch-build +++ b/kpatch-build/kpatch-build @@ -746,15 +746,14 @@ CONFIG_PARAVIRT=0 CONFIG_UNWINDER_ORC=0 CONFIG_JUMP_LABEL=0 -if grep -q "CONFIG_LIVEPATCH=y" "$CONFIGFILE" && (kernel_is_rhel || kernel_version_gte 4.7.0); then +if grep -q "CONFIG_LIVEPATCH=y" "$CONFIGFILE" && (kernel_is_rhel || kernel_version_gte 4.9.0); then USE_KLP=1 - if kernel_is_rhel || kernel_version_gte 4.9.0; then + # TEMPORARY: always assume .klp.arch USE_KLP_ARCH=1 KPATCH_LDFLAGS="--unique=.parainstructions --unique=.altinstructions" CDO_FLAGS="--klp-arch" - fi else # No support for livepatch in the kernel. Kpatch core module is needed.