[PATCH 25/48] klp-build: Reject patches to realmode

Josh Poimboeuf
2026-04-23T04:04:36Z

Realmode code is compiled as a separate 16-bit binary and embedded into
the kernel image via rmpiggy.S. It can't be livepatched.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
---
scripts/livepatch/klp-build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build
index deb1723b70de..48abbe43f1c9 100755
--- a/scripts/livepatch/klp-build
+++ b/scripts/livepatch/klp-build
@@ -357,7 +357,7 @@ check_unsupported_patches() {

for file in "${files[@]}"; do
case "$file" in
- lib/*|*/vdso/*|*.S)
+ lib/*|*/vdso/*|*/realmode/rm/*|*.S)
die "${patch}: unsupported patch to $file"
;;
esac
--
2.53.0