From 8e841bcd3664f92322096e3880a2a46718f6d782 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Kosti=C4=87?= Date: Tue, 1 Dec 2026 20:47:44 +0100 Subject: [PATCH] kpatch-syscall.h: don't redefine SC_ARM64_REGS_TO_ARGS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Upstream kernel commit 5a87e8c7f370 ("arm64: syscall: Pass 'orig_x0' as first argument to native system call") changed the kernel's SC_ARM64_REGS_TO_ARGS() macro. kpatch-syscall.h defines its own copy of the macro. Until now both copies were identical, so the second definition was harmless. Now that they differ, any file that includes kpatch-macros.h fails to build on arm64 kernels that have this change: kpatch-syscall.h:216:9: error: "SC_ARM64_REGS_TO_ARGS" redefined This fix removes the macro, since it's already defined elsewhere. All other arches do this in the first place anyways. Works on both kernels pre and post 5a87e8c7f370. Signed-off-by: Marko Kostić --- kmod/patch/kpatch-syscall.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/kmod/patch/kpatch-syscall.h b/kmod/patch/kpatch-syscall.h index 16c5a0de3..5b71d27aa 100644 --- a/kmod/patch/kpatch-syscall.h +++ b/kmod/patch/kpatch-syscall.h @@ -213,11 +213,6 @@ /* arm64/include/asm/syscall_wrapper.h versions */ -#define SC_ARM64_REGS_TO_ARGS(x, ...) \ - __MAP(x,__SC_ARGS \ - ,,regs->regs[0],,regs->regs[1],,regs->regs[2] \ - ,,regs->regs[3],,regs->regs[4],,regs->regs[5]) - #define __KPATCH_SYSCALL_DEFINEx(x, name, ...) \ asmlinkage long __arm64_sys##name(const struct pt_regs *regs); \ ALLOW_ERROR_INJECTION(__arm64_sys##name, ERRNO); \