* [PATCH 0/8] LoongArch: Add livepatch build (KLP) support
@ 2026-06-04 6:53 George Guo
2026-06-04 6:53 ` [PATCH 1/8] " George Guo
` (8 more replies)
0 siblings, 9 replies; 15+ messages in thread
From: George Guo @ 2026-06-04 6:53 UTC (permalink / raw)
To: chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, xry111, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
From: George Guo <guodongtai@kylinos.cn>
This series adds LoongArch support for the klp-build livepatch tooling,
enabling automated livepatch module generation using objtool on
LoongArch.
It is based on Josh Poimboeuf's klp-build series [1] (see base-commit
below) and extends it with the LoongArch-specific objtool and build
pieces, plus a few LoongArch toolchain/relocation fixes required to make
livepatch modules load and run correctly.
Overview:
- Patch 1 wires up LoongArch klp-build (objtool-based livepatch module
generation).
- Patches 2-3 add the objtool bits LoongArch needs: arch_adjusted_addend()
and the special section entry sizes (.altinstructions, __ex_table,
__bug_table, __jump_table) so objtool can process livepatch modules.
- Patches 4-5 fix kernel panics seen when loading livepatch modules,
caused by LoongArch code-generation/relocation assumptions:
* disable -mdirect-extern-access for klp builds (the module loader
relies on GOT entries for external symbol references),
* force -fPIC so same-compilation-unit symbol references relocate
correctly.
- Patch 6 fix EFI linking when building with -fdata-sections.
- Patch 7 implements arch_jump_opcode_bytes() so klp checksums for
jump/call instructions are position-independent, mirroring x86/arm64.
- Patch 8 adds KLP_SYSCALL_DEFINEx() support for LoongArch.
Testing:
- objtool builds cleanly for LoongArch.
- Livepatch modules were generated and loaded on a LoongArch machine;
the panics addressed by patches 4-5 no longer reproduce.
[1] https://git.kernel.org/pub/scm/linux/kernel/git/jpoimboe/linux.git/log/?h=klp-build-arm64
George Guo (8):
LoongArch: Add livepatch build (KLP) support
objtool/LoongArch: Add arch_adjusted_addend() for KLP support
LoongArch: Add special section entry sizes for KLP support
livepatch/klp-build: disable direct-extern-access for LoongArch to fix
kernel panic
LoongArch: fix kernel panic with -fPIC for same-compilation-unit
symbol references
LoongArch: Fix EFI linking with -fdata-sections
objtool/klp: Add LoongArch jump opcode bytes support
klp-build: Add LoongArch syscall patching macro
arch/loongarch/Kconfig | 1 +
arch/loongarch/include/asm/alternative-asm.h | 5 ++-
arch/loongarch/include/asm/alternative.h | 6 ++-
arch/loongarch/include/asm/asm-extable.h | 10 ++++-
arch/loongarch/include/asm/bug.h | 15 ++++++-
arch/loongarch/include/asm/jump_label.h | 9 +++-
arch/loongarch/kernel/asm-offsets.c | 36 +++++++++++++++
arch/loongarch/kernel/head.S | 1 +
arch/loongarch/kernel/vmlinux.lds.S | 2 +-
include/linux/livepatch_helpers.h | 22 ++++++++++
scripts/livepatch/klp-build | 16 ++++++-
tools/objtool/Makefile | 3 +-
tools/objtool/arch/loongarch/decode.c | 46 ++++++++++++++++++++
13 files changed, 161 insertions(+), 11 deletions(-)
base-commit: 85afaba140a4b9f20fe8c8a64b24fc85f022d981
--
2.25.1
^ permalink raw reply [flat|nested] 15+ messages in thread
* [PATCH 1/8] LoongArch: Add livepatch build (KLP) support
2026-06-04 6:53 [PATCH 0/8] LoongArch: Add livepatch build (KLP) support George Guo
@ 2026-06-04 6:53 ` George Guo
2026-06-04 6:53 ` [PATCH 2/8] objtool/LoongArch: Add arch_adjusted_addend() for KLP support George Guo
` (7 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: George Guo @ 2026-06-04 6:53 UTC (permalink / raw)
To: chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, xry111, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
From: George Guo <guodongtai@kylinos.cn>
This allows automated livepatch module generation using objtool.
Co-developed-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
arch/loongarch/Kconfig | 1 +
tools/objtool/Makefile | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/loongarch/Kconfig b/arch/loongarch/Kconfig
index 3b042dbb2c41..1dbf51ba9d6a 100644
--- a/arch/loongarch/Kconfig
+++ b/arch/loongarch/Kconfig
@@ -159,6 +159,7 @@ config LOONGARCH
select HAVE_IOREMAP_PROT
select HAVE_IRQ_EXIT_ON_IRQ_STACK
select HAVE_IRQ_TIME_ACCOUNTING
+ select HAVE_KLP_BUILD
select HAVE_KPROBES
select HAVE_KPROBES_ON_FTRACE
select HAVE_KRETPROBES
diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile
index 94aabeee9736..83d645675ed9 100644
--- a/tools/objtool/Makefile
+++ b/tools/objtool/Makefile
@@ -8,7 +8,8 @@ ifeq ($(SRCARCH),x86)
endif
ifeq ($(SRCARCH),loongarch)
- BUILD_ORC := y
+ BUILD_ORC := y
+ ARCH_HAS_KLP := y
endif
ifeq ($(SRCARCH),arm64)
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 2/8] objtool/LoongArch: Add arch_adjusted_addend() for KLP support
2026-06-04 6:53 [PATCH 0/8] LoongArch: Add livepatch build (KLP) support George Guo
2026-06-04 6:53 ` [PATCH 1/8] " George Guo
@ 2026-06-04 6:53 ` George Guo
2026-06-04 6:53 ` [PATCH 3/8] LoongArch: Add special section entry sizes " George Guo
` (6 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: George Guo @ 2026-06-04 6:53 UTC (permalink / raw)
To: chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, xry111, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
From: George Guo <guodongtai@kylinos.cn>
Implement arch_adjusted_addend() to return the relocation addend value.
Co-developed-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
tools/objtool/arch/loongarch/decode.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/tools/objtool/arch/loongarch/decode.c b/tools/objtool/arch/loongarch/decode.c
index 6cd288150f49..674e4efd138f 100644
--- a/tools/objtool/arch/loongarch/decode.c
+++ b/tools/objtool/arch/loongarch/decode.c
@@ -34,6 +34,11 @@ s64 arch_insn_adjusted_addend(struct instruction *insn, struct reloc *reloc)
return reloc_addend(reloc);
}
+u64 arch_adjusted_addend(struct reloc *reloc)
+{
+ return reloc_addend(reloc);
+}
+
bool arch_pc_relative_reloc(struct reloc *reloc)
{
return false;
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 3/8] LoongArch: Add special section entry sizes for KLP support
2026-06-04 6:53 [PATCH 0/8] LoongArch: Add livepatch build (KLP) support George Guo
2026-06-04 6:53 ` [PATCH 1/8] " George Guo
2026-06-04 6:53 ` [PATCH 2/8] objtool/LoongArch: Add arch_adjusted_addend() for KLP support George Guo
@ 2026-06-04 6:53 ` George Guo
2026-06-05 8:38 ` WangYuli
2026-06-04 6:53 ` [PATCH 4/8] livepatch/klp-build: disable direct-extern-access for LoongArch to fix kernel panic George Guo
` (5 subsequent siblings)
8 siblings, 1 reply; 15+ messages in thread
From: George Guo @ 2026-06-04 6:53 UTC (permalink / raw)
To: chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, xry111, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
From: George Guo <guodongtai@kylinos.cn>
Define entry sizes for .altinstructions, __ex_table, __bug_table, and
__jump_table sections to enable objtool to process livepatch modules
on LoongArch.
Co-developed-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
arch/loongarch/include/asm/alternative-asm.h | 5 +--
arch/loongarch/include/asm/alternative.h | 6 ++--
arch/loongarch/include/asm/asm-extable.h | 10 ++++--
arch/loongarch/include/asm/bug.h | 15 +++++++-
arch/loongarch/include/asm/jump_label.h | 9 ++++-
arch/loongarch/kernel/asm-offsets.c | 36 ++++++++++++++++++++
arch/loongarch/kernel/head.S | 1 +
7 files changed, 74 insertions(+), 8 deletions(-)
diff --git a/arch/loongarch/include/asm/alternative-asm.h b/arch/loongarch/include/asm/alternative-asm.h
index 7dc29bd9b2f0..d940d9d2c0e1 100644
--- a/arch/loongarch/include/asm/alternative-asm.h
+++ b/arch/loongarch/include/asm/alternative-asm.h
@@ -5,6 +5,7 @@
#ifdef __ASSEMBLER__
#include <asm/asm.h>
+#include <generated/asm-offsets.h>
/*
* Issue one struct alt_instr descriptor entry (need to put it into
@@ -33,7 +34,7 @@
.fill - (((144f-143f)-(141b-140b)) > 0) * ((144f-143f)-(141b-140b)) / 4, 4, 0x03400000
142 :
- .pushsection .altinstructions, "a"
+ .pushsection .altinstructions, "aM", @progbits, ALT_INSTR_SIZE
altinstruction_entry 140b, 143f, \feature, 142b-140b, 144f-143f
.popsection
@@ -63,7 +64,7 @@
(alt_max_short(new_len1, new_len2) - (old_len)) / 4, 4, 0x03400000
142 :
- .pushsection .altinstructions, "a"
+ .pushsection .altinstructions, "aM", @progbits, ALT_INSTR_SIZE
altinstruction_entry 140b, 143f, \feature1, 142b-140b, 144f-143f, 142b-141b
altinstruction_entry 140b, 144f, \feature2, 142b-140b, 145f-144f, 142b-141b
.popsection
diff --git a/arch/loongarch/include/asm/alternative.h b/arch/loongarch/include/asm/alternative.h
index b5bae21fb3c8..8f7712ed2f4e 100644
--- a/arch/loongarch/include/asm/alternative.h
+++ b/arch/loongarch/include/asm/alternative.h
@@ -70,7 +70,8 @@ extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
/* alternative assembly primitive: */
#define ALTERNATIVE(oldinstr, newinstr, feature) \
OLDINSTR(oldinstr, 1) \
- ".pushsection .altinstructions,\"a\"\n" \
+ ".pushsection .altinstructions, \"aM\", @progbits, " \
+ __stringify(ALT_INSTR_SIZE) "\n" \
ALTINSTR_ENTRY(feature, 1) \
".popsection\n" \
".subsection 1\n" \
@@ -79,7 +80,8 @@ extern void apply_alternatives(struct alt_instr *start, struct alt_instr *end);
#define ALTERNATIVE_2(oldinstr, newinstr1, feature1, newinstr2, feature2)\
OLDINSTR_2(oldinstr, 1, 2) \
- ".pushsection .altinstructions,\"a\"\n" \
+ ".pushsection .altinstructions, \"aM\", @progbits, " \
+ __stringify(ALT_INSTR_SIZE) "\n" \
ALTINSTR_ENTRY(feature1, 1) \
ALTINSTR_ENTRY(feature2, 2) \
".popsection\n" \
diff --git a/arch/loongarch/include/asm/asm-extable.h b/arch/loongarch/include/asm/asm-extable.h
index d60bdf2e6377..2d7eef7c0b39 100644
--- a/arch/loongarch/include/asm/asm-extable.h
+++ b/arch/loongarch/include/asm/asm-extable.h
@@ -7,10 +7,15 @@
#define EX_TYPE_UACCESS_ERR_ZERO 2
#define EX_TYPE_BPF 3
+#ifndef COMPILE_OFFSETS
+#include <asm/asm-offsets.h>
+#endif
+
#ifdef __ASSEMBLER__
#define __ASM_EXTABLE_RAW(insn, fixup, type, data) \
- .pushsection __ex_table, "a"; \
+ .pushsection __ex_table, "aM", @progbits, \
+ EXTABLE_SIZE; \
.balign 4; \
.long ((insn) - .); \
.long ((fixup) - .); \
@@ -29,7 +34,8 @@
#include <asm/gpr-num.h>
#define __ASM_EXTABLE_RAW(insn, fixup, type, data) \
- ".pushsection __ex_table, \"a\"\n" \
+ ".pushsection __ex_table, \"aM\", @progbits, "\
+ __stringify(EXTABLE_SIZE) "\n" \
".balign 4\n" \
".long ((" insn ") - .)\n" \
".long ((" fixup ") - .)\n" \
diff --git a/arch/loongarch/include/asm/bug.h b/arch/loongarch/include/asm/bug.h
index d090a5bec5eb..c067c858b918 100644
--- a/arch/loongarch/include/asm/bug.h
+++ b/arch/loongarch/include/asm/bug.h
@@ -22,8 +22,20 @@
#ifndef CONFIG_GENERIC_BUG
#define __BUG_ENTRY(cond_str, flags)
#else
+
+#ifdef COMPILE_OFFSETS
+#define __BUG_ENTRY(cond_str, flags) \
+ .pushsection __bug_table, "awM", @progbits, 0; \
+ .align 2; \
+ 10000: .long 10001f - .; \
+ _BUGVERBOSE_LOCATION(WARN_CONDITION_STR(cond_str) __FILE__, __LINE__) \
+ .short flags; \
+ .popsection; \
+ 10001:
+#else
+#include <generated/asm-offsets.h>
#define __BUG_ENTRY(cond_str, flags) \
- .pushsection __bug_table, "aw"; \
+ .pushsection __bug_table, "awM", @progbits, BUG_ENTRY_SIZE; \
.align 2; \
10000: .long 10001f - .; \
_BUGVERBOSE_LOCATION(WARN_CONDITION_STR(cond_str) __FILE__, __LINE__) \
@@ -31,6 +43,7 @@
.popsection; \
10001:
#endif
+#endif
#define ASM_BUG_FLAGS(cond_str, flags) \
__BUG_ENTRY(cond_str, flags) \
diff --git a/arch/loongarch/include/asm/jump_label.h b/arch/loongarch/include/asm/jump_label.h
index 7ef4ae3abf08..26ae644755ea 100644
--- a/arch/loongarch/include/asm/jump_label.h
+++ b/arch/loongarch/include/asm/jump_label.h
@@ -23,9 +23,16 @@
#define JUMP_LABEL_TYPE ".quad "
#endif
+#ifdef COMPILE_OFFSETS
+#define JUMP_ENTRY_SIZE 0
+#else
+#include <generated/asm-offsets.h>
+#endif
+
/* This macro is also expanded on the Rust side. */
#define JUMP_TABLE_ENTRY(key, label) \
- ".pushsection __jump_table, \"aw\" \n\t" \
+ ".pushsection __jump_table, \"awM\", @progbits, " \
+ __stringify(JUMP_ENTRY_SIZE) "\n\t" \
".align " __stringify(PTRLOG) " \n\t" \
".long 1b - ., " label " - . \n\t" \
JUMP_LABEL_TYPE key " - . \n\t" \
diff --git a/arch/loongarch/kernel/asm-offsets.c b/arch/loongarch/kernel/asm-offsets.c
index 2cc953f113ac..42f16e5da06d 100644
--- a/arch/loongarch/kernel/asm-offsets.c
+++ b/arch/loongarch/kernel/asm-offsets.c
@@ -18,6 +18,10 @@
#include <asm/ftrace.h>
#include <asm/sigframe.h>
#include <vdso/datapage.h>
+#include <asm/alternative.h>
+#include <asm/extable.h>
+#include <asm/bug.h>
+#include <asm/jump_label.h>
static void __used output_ptreg_defines(void)
{
@@ -323,3 +327,35 @@ static void __used output_vdso_defines(void)
DEFINE(__VDSO_PAGES, VDSO_NR_PAGES);
BLANK();
}
+
+static void __used output_extable_defines(void)
+{
+ COMMENT("LoongArch exception table entry offsets.");
+
+ DEFINE(EXTABLE_SIZE, sizeof(struct exception_table_entry));
+ BLANK();
+}
+
+static void __used output_alt_instr_defines(void)
+{
+ COMMENT("LoongArch alternative instructions offsets.");
+
+ DEFINE(ALT_INSTR_SIZE, sizeof(struct alt_instr));
+ BLANK();
+}
+
+static void __used output_bug_defines(void)
+{
+ COMMENT("LoongArch bug entry offsets.");
+
+ DEFINE(BUG_ENTRY_SIZE, sizeof(struct bug_entry));
+ BLANK();
+}
+
+static void __used output_jump_label_defines(void)
+{
+ COMMENT("LoongArch jump entry offsets.");
+
+ DEFINE(JUMP_ENTRY_SIZE, sizeof(struct jump_entry));
+ BLANK();
+}
diff --git a/arch/loongarch/kernel/head.S b/arch/loongarch/kernel/head.S
index 4eed7bc312a8..a8a2a98e0a5c 100644
--- a/arch/loongarch/kernel/head.S
+++ b/arch/loongarch/kernel/head.S
@@ -12,6 +12,7 @@
#include <asm/regdef.h>
#include <asm/loongarch.h>
#include <asm/stackframe.h>
+#include <generated/asm-offsets.h>
#ifdef CONFIG_EFI_STUB
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 4/8] livepatch/klp-build: disable direct-extern-access for LoongArch to fix kernel panic
2026-06-04 6:53 [PATCH 0/8] LoongArch: Add livepatch build (KLP) support George Guo
` (2 preceding siblings ...)
2026-06-04 6:53 ` [PATCH 3/8] LoongArch: Add special section entry sizes " George Guo
@ 2026-06-04 6:53 ` George Guo
2026-06-05 8:53 ` WangYuli
2026-06-04 6:53 ` [PATCH 5/8] LoongArch: fix kernel panic with -fPIC for same-compilation-unit symbol references George Guo
` (4 subsequent siblings)
8 siblings, 1 reply; 15+ messages in thread
From: George Guo @ 2026-06-04 6:53 UTC (permalink / raw)
To: chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, xry111, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
From: George Guo <guodongtai@kylinos.cn>
On LoongArch systems, livepatch modules containing references to
EXTERNAL global variables trigger kernel panics when the core kernel is
built with the -mdirect-extern-access optimization.
Root cause:
The -mdirect-extern-access optimization replaces GOT-based external
symbol access with direct addressing for improved performance. However,
this breaks the kernel module loading mechanism, which relies on GOT
entries for proper relocation of EXTERNAL symbol references. Direct
access to global variables from livepatch modules causes invalid memory
accesses and kernel panics.
Solution:
For LoongArch klp builds, conditionally disable direct-extern-access by
adding:
- -mno-direct-extern-access for GCC builds
- -fno-direct-access-external-data for Clang builds
See also commit 38b10b269d04 ("LoongArch: Tweak CFLAGS for Clang
compatibility"), which added -mdirect-extern-access to the kernel as a
nice-to-have optimization that reduces GOT accesses.
Co-developed-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
scripts/livepatch/klp-build | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build
index e83973567c87..529437d75346 100755
--- a/scripts/livepatch/klp-build
+++ b/scripts/livepatch/klp-build
@@ -542,6 +542,17 @@ fix_patches() {
clean_kernel() {
local cmd=()
+ local ARCH_KBUILD_CFLAGS_KERNEL=""
+
+ if [[ -v CONFIG_LOONGARCH && "$CONFIG_LOONGARCH" == "y" ]]; then
+ if [[ -n "$CONFIG_CC_IS_CLANG" ]]; then
+ ARCH_KBUILD_CFLAGS_KERNEL="-fno-direct-access-external-data"
+ else
+ ARCH_KBUILD_CFLAGS_KERNEL="-mno-direct-extern-access"
+ fi
+
+ status "LoongArch detected: adding $ARCH_KBUILD_CFLAGS_KERNEL to KBUILD_CFLAGS_KERNEL"
+ fi
cmd=("make")
cmd+=("--silent")
@@ -582,6 +593,7 @@ build_kernel() {
fi
cmd+=("-j$JOBS")
cmd+=("KCFLAGS=-ffunction-sections -fdata-sections")
+ cmd+=("KBUILD_CFLAGS_KERNEL=$ARCH_KBUILD_CFLAGS_KERNEL")
cmd+=("vmlinux")
cmd+=("modules")
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 5/8] LoongArch: fix kernel panic with -fPIC for same-compilation-unit symbol references
2026-06-04 6:53 [PATCH 0/8] LoongArch: Add livepatch build (KLP) support George Guo
` (3 preceding siblings ...)
2026-06-04 6:53 ` [PATCH 4/8] livepatch/klp-build: disable direct-extern-access for LoongArch to fix kernel panic George Guo
@ 2026-06-04 6:53 ` George Guo
2026-06-05 8:10 ` Xi Ruoyao
2026-06-04 6:53 ` [PATCH 6/8] LoongArch: Fix EFI linking with -fdata-sections George Guo
` (3 subsequent siblings)
8 siblings, 1 reply; 15+ messages in thread
From: George Guo @ 2026-06-04 6:53 UTC (permalink / raw)
To: chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, xry111, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
From: George Guo <guodongtai@kylinos.cn>
Add architecture-specific -fPIC compiler flag for LoongArch64 to prevent
kernel panics when applying livepatches containing references to symbols
defined in the same compilation unit.
Root cause:
In the KLP workflow, when a function is livepatched, it's extracted
from the original object file and compiled into a separate kernel
module. When the patched function references symbols defined in the
same compilation unit (like 'uts_sem' in kernel/sys.c), these
references break if not compiled as position-independent code.
On LoongArch64, without -fPIC, references to same-compilation-unit symbols
use absolute addressing that assumes fixed memory locations. When the
function is relocated into the livepatch module, these absolute addresses
become invalid, causing kernel panics.
Example failure case:
- SYSCALL_DEFINE1(newuname) references the same-compilation-unit
symbol 'uts_sem'
- When kpatch extracts this function into a module, the reference to
'uts_sem' must be properly relocated
- Without -fPIC, the absolute address reference causes invalid memory
access and kernel panic
Solution:
Force -fPIC compilation for all LoongArch64 KLP builds. This ensures
that references to same-compilation-unit symbols use position-independent
addressing, allowing proper relocation by the kernel module loader and
preventing kernel panics in livepatch scenarios.
Co-developed-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
scripts/livepatch/klp-build | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/livepatch/klp-build b/scripts/livepatch/klp-build
index 529437d75346..83a43e0df3b9 100755
--- a/scripts/livepatch/klp-build
+++ b/scripts/livepatch/klp-build
@@ -543,8 +543,10 @@ fix_patches() {
clean_kernel() {
local cmd=()
local ARCH_KBUILD_CFLAGS_KERNEL=""
+ local ARCH_KCFLAGS=""
if [[ -v CONFIG_LOONGARCH && "$CONFIG_LOONGARCH" == "y" ]]; then
+ ARCH_KCFLAGS="-fPIC"
if [[ -n "$CONFIG_CC_IS_CLANG" ]]; then
ARCH_KBUILD_CFLAGS_KERNEL="-fno-direct-access-external-data"
else
@@ -592,7 +594,7 @@ build_kernel() {
cmd+=("-s")
fi
cmd+=("-j$JOBS")
- cmd+=("KCFLAGS=-ffunction-sections -fdata-sections")
+ cmd+=("KCFLAGS=-ffunction-sections -fdata-sections $ARCH_KCFLAGS")
cmd+=("KBUILD_CFLAGS_KERNEL=$ARCH_KBUILD_CFLAGS_KERNEL")
cmd+=("vmlinux")
cmd+=("modules")
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 6/8] LoongArch: Fix EFI linking with -fdata-sections
2026-06-04 6:53 [PATCH 0/8] LoongArch: Add livepatch build (KLP) support George Guo
` (4 preceding siblings ...)
2026-06-04 6:53 ` [PATCH 5/8] LoongArch: fix kernel panic with -fPIC for same-compilation-unit symbol references George Guo
@ 2026-06-04 6:53 ` George Guo
2026-06-04 6:53 ` [PATCH 7/8] objtool/klp: Add LoongArch jump opcode bytes support George Guo
` (2 subsequent siblings)
8 siblings, 0 replies; 15+ messages in thread
From: George Guo @ 2026-06-04 6:53 UTC (permalink / raw)
To: chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, xry111, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
From: George Guo <guodongtai@kylinos.cn>
When building with func-fdata-sections, the .init.bss section gets split
up into a bunch of .init.bss.<var> sections. Make sure they get linked
into .init.data.
Co-developed-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
arch/loongarch/kernel/vmlinux.lds.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/loongarch/kernel/vmlinux.lds.S b/arch/loongarch/kernel/vmlinux.lds.S
index 840d944c2f73..dc5fa017db94 100644
--- a/arch/loongarch/kernel/vmlinux.lds.S
+++ b/arch/loongarch/kernel/vmlinux.lds.S
@@ -96,7 +96,7 @@ SECTIONS
#endif
.init.bss : {
- *(.init.bss)
+ *(.init.bss .init.bss.*)
}
. = ALIGN(PECOFF_SEGMENT_ALIGN);
__initdata_end = .;
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 7/8] objtool/klp: Add LoongArch jump opcode bytes support
2026-06-04 6:53 [PATCH 0/8] LoongArch: Add livepatch build (KLP) support George Guo
` (5 preceding siblings ...)
2026-06-04 6:53 ` [PATCH 6/8] LoongArch: Fix EFI linking with -fdata-sections George Guo
@ 2026-06-04 6:53 ` George Guo
2026-06-04 6:53 ` [PATCH 8/8] klp-build: Add LoongArch syscall patching macro George Guo
2026-06-05 7:57 ` [PATCH 0/8] LoongArch: Add livepatch build (KLP) support WangYuli
8 siblings, 0 replies; 15+ messages in thread
From: George Guo @ 2026-06-04 6:53 UTC (permalink / raw)
To: chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, xry111, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
From: George Guo <guodongtai@kylinos.cn>
Implement arch_jump_opcode_bytes() for LoongArch so that klp checksums
for jump/call instructions with non-relocated destination offsets are
position-independent, mirroring the x86 and arm64 implementations.
Mask out the embedded branch offset while preserving the opcode and the
register operands, which differ per instruction format:
- B/BL (reg0i26): no regs -> 0xfc000000
- BEQZ/BNEZ/BCEQZ/BCNEZ (reg1i21): keep rj/cj -> 0xfc0003e0
- JIRL/BEQ/BNE/.../BGEU (reg2i16): keep rj/rd -> 0xfc0003ff
Co-developed-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
tools/objtool/arch/loongarch/decode.c | 41 +++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/tools/objtool/arch/loongarch/decode.c b/tools/objtool/arch/loongarch/decode.c
index 674e4efd138f..12facd0cc8d1 100644
--- a/tools/objtool/arch/loongarch/decode.c
+++ b/tools/objtool/arch/loongarch/decode.c
@@ -432,6 +432,47 @@ unsigned long arch_jump_table_sym_offset(struct reloc *reloc, struct reloc *tabl
}
}
+size_t arch_jump_opcode_bytes(struct objtool_file *file, struct instruction *insn,
+ unsigned char *buf)
+{
+ union loongarch_instruction *code;
+ u32 insn_word;
+
+ insn_word = le32toh(*(u32 *)(insn->sec->data->d_buf + insn->offset));
+ code = (union loongarch_instruction *)&insn_word;
+
+ switch (code->reg0i26_format.opcode) {
+ case b_op:
+ case bl_op:
+ /* reg0i26: 26-bit offset, no register operands */
+ insn_word &= 0xfc000000;
+ break;
+ case beqz_op:
+ case bnez_op:
+ case bceqz_op: /* == bcnez_op */
+ /* reg1i21: keep opcode + rj/cj at bits[9:5] */
+ insn_word &= 0xfc0003e0;
+ break;
+ case jirl_op:
+ case beq_op:
+ case bne_op:
+ case blt_op:
+ case bge_op:
+ case bltu_op:
+ case bgeu_op:
+ /* reg2i16: keep opcode + rj/rd at bits[9:0] */
+ insn_word &= 0xfc0003ff;
+ break;
+ default:
+ break;
+ }
+
+ insn_word = htole32(insn_word);
+ memcpy(buf, &insn_word, sizeof(insn_word));
+
+ return LOONGARCH_INSN_SIZE;
+}
+
#ifdef DISAS
int arch_disas_info_init(struct disassemble_info *dinfo)
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [PATCH 8/8] klp-build: Add LoongArch syscall patching macro
2026-06-04 6:53 [PATCH 0/8] LoongArch: Add livepatch build (KLP) support George Guo
` (6 preceding siblings ...)
2026-06-04 6:53 ` [PATCH 7/8] objtool/klp: Add LoongArch jump opcode bytes support George Guo
@ 2026-06-04 6:53 ` George Guo
2026-06-05 7:57 ` [PATCH 0/8] LoongArch: Add livepatch build (KLP) support WangYuli
8 siblings, 0 replies; 15+ messages in thread
From: George Guo @ 2026-06-04 6:53 UTC (permalink / raw)
To: chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, xry111, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
From: George Guo <guodongtai@kylinos.cn>
Add LoongArch support for KLP_SYSCALL_DEFINEx(), mirroring the generic
__SYSCALL_DEFINEx() pattern from include/linux/syscalls.h.
Co-developed-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: Kexin Liu <liukexin@kylinos.cn>
Signed-off-by: George Guo <guodongtai@kylinos.cn>
---
include/linux/livepatch_helpers.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/include/linux/livepatch_helpers.h b/include/linux/livepatch_helpers.h
index 4b647b83865f..a8aad067177b 100644
--- a/include/linux/livepatch_helpers.h
+++ b/include/linux/livepatch_helpers.h
@@ -91,6 +91,28 @@
} \
static inline long __klp_do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
+#elif defined(CONFIG_LOONGARCH)
+
+#define __KLP_SYSCALL_DEFINEx(x, name, ...) \
+ __diag_push(); \
+ __diag_ignore(GCC, 8, "-Wattribute-alias", \
+ "Type aliasing is used to sanitize syscall arguments");\
+ asmlinkage long sys##name(__MAP(x,__SC_DECL,__VA_ARGS__)) \
+ __attribute__((alias(__stringify(__se_sys##name)))); \
+ ALLOW_ERROR_INJECTION(sys##name, ERRNO); \
+ static inline long __klp_do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__));\
+ asmlinkage long __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)); \
+ asmlinkage long __attribute__((optimize("-fno-optimize-sibling-calls")))\
+ __se_sys##name(__MAP(x,__SC_LONG,__VA_ARGS__)) \
+ { \
+ long ret = __klp_do_sys##name(__MAP(x,__SC_CAST,__VA_ARGS__));\
+ __MAP(x,__SC_TEST,__VA_ARGS__); \
+ __PROTECT(x, ret,__MAP(x,__SC_ARGS,__VA_ARGS__)); \
+ return ret; \
+ } \
+ __diag_pop(); \
+ static inline long __klp_do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))
+
#endif
#endif /* _LINUX_LIVEPATCH_HELPERS_H */
--
2.25.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* Re: [PATCH 0/8] LoongArch: Add livepatch build (KLP) support
2026-06-04 6:53 [PATCH 0/8] LoongArch: Add livepatch build (KLP) support George Guo
` (7 preceding siblings ...)
2026-06-04 6:53 ` [PATCH 8/8] klp-build: Add LoongArch syscall patching macro George Guo
@ 2026-06-05 7:57 ` WangYuli
8 siblings, 0 replies; 15+ messages in thread
From: WangYuli @ 2026-06-05 7:57 UTC (permalink / raw)
To: dongtai.guo
Cc: ardb, chenhuacai, guodongtai, jiaxun.yang, jikos, joe.lawrence,
jpoimboe, kernel, linux-kernel, liukexin, live-patching, llvm,
loongarch, mbenes, nathan, nick.desaulniers+lkml, peterz, pmladek,
rostedt, xry111, yangtiezhu
Hi Dongtai,
Patches 1 and 2 should be merged into a single patch and placed at the end of
your patch series rather than at the beginning.
Alternatively, you could simply use patch [1] to replace these two patches, which
might make more sense chronologically.
[1]. https://lore.kernel.org/all/20251203091039.125259-1-wangyuli@aosc.io/
Thanks,
---
WangYuli
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/8] LoongArch: fix kernel panic with -fPIC for same-compilation-unit symbol references
2026-06-04 6:53 ` [PATCH 5/8] LoongArch: fix kernel panic with -fPIC for same-compilation-unit symbol references George Guo
@ 2026-06-05 8:10 ` Xi Ruoyao
2026-06-08 10:23 ` George Guo
0 siblings, 1 reply; 15+ messages in thread
From: Xi Ruoyao @ 2026-06-05 8:10 UTC (permalink / raw)
To: George Guo, chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
On Thu, 2026-06-04 at 14:53 +0800, George Guo wrote:
> From: George Guo <guodongtai@kylinos.cn>
>
> Add architecture-specific -fPIC compiler flag for LoongArch64 to prevent
> kernel panics when applying livepatches containing references to symbols
> defined in the same compilation unit.
>
> Root cause:
> In the KLP workflow, when a function is livepatched, it's extracted
> from the original object file and compiled into a separate kernel
> module. When the patched function references symbols defined in the
> same compilation unit (like 'uts_sem' in kernel/sys.c), these
> references break if not compiled as position-independent code.
>
> On LoongArch64, without -fPIC, references to same-compilation-unit symbols
> use absolute addressing that assumes fixed memory locations. When the
> function is relocated into the livepatch module, these absolute addresses
> become invalid, causing kernel panics.
This is incorrect.
With GCC and Clang, -fPIC does not mean generating position independent
code. It means generating position independent code *suitable for SVR4-
style shared objects*.
The kernel has nothing to do with SVR4-style shared objects. The kernel
modules are not SVR4 shared objects but relocatable ELF object files.
If you only need position independent code (without the shared object
stuff) you should use -fPIE instead. The kernel is already built with -
fPIE if CONFIG_RELOCATABLE=y.
Thus if you only need position independent code you should make live
patching depend on CONFIG_RELOCATABLE. On the contrary if you really
need to use/abuse something mechanism designed for SVR4 shared object
you 'd at least need to fix the description above.
--
Xi Ruoyao <xry111@xry111.site>
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/8] LoongArch: Add special section entry sizes for KLP support
2026-06-04 6:53 ` [PATCH 3/8] LoongArch: Add special section entry sizes " George Guo
@ 2026-06-05 8:38 ` WangYuli
2026-06-08 10:33 ` George Guo
0 siblings, 1 reply; 15+ messages in thread
From: WangYuli @ 2026-06-05 8:38 UTC (permalink / raw)
To: dongtai.guo
Cc: ardb, chenhuacai, guodongtai, jiaxun.yang, jikos, joe.lawrence,
jpoimboe, kernel, linux-kernel, liukexin, live-patching, llvm,
loongarch, mbenes, nathan, nick.desaulniers+lkml, peterz, pmladek,
rostedt, xry111, yangtiezhu
Hi Dongtai,
Have you actually tested your changes with LLVM?
For example:
asm volatile(
".pushsection .altinstructions, \"aM\", @progbits, "
__stringify(ALT_INSTR_SIZE) "\n\t"
".long 0\n\t"
".popsection\n\t"
);
BTW, "awM" is dangerous, pls see how did x86 do.
And head.S doesn't need to include asm-offsets.h, it seems
stackframe.h has included it.
Thanks,
---
WangYuli
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 4/8] livepatch/klp-build: disable direct-extern-access for LoongArch to fix kernel panic
2026-06-04 6:53 ` [PATCH 4/8] livepatch/klp-build: disable direct-extern-access for LoongArch to fix kernel panic George Guo
@ 2026-06-05 8:53 ` WangYuli
0 siblings, 0 replies; 15+ messages in thread
From: WangYuli @ 2026-06-05 8:53 UTC (permalink / raw)
To: dongtai.guo
Cc: ardb, chenhuacai, guodongtai, jiaxun.yang, jikos, joe.lawrence,
jpoimboe, kernel, linux-kernel, liukexin, live-patching, llvm,
loongarch, mbenes, nathan, nick.desaulniers+lkml, peterz, pmladek,
rostedt, xry111, yangtiezhu
Hi Dongtai,
Just set other issues aside for a moment — you define a variable inside one
function and only use it in another function?...
Thanks,
---
WangYuli
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 5/8] LoongArch: fix kernel panic with -fPIC for same-compilation-unit symbol references
2026-06-05 8:10 ` Xi Ruoyao
@ 2026-06-08 10:23 ` George Guo
0 siblings, 0 replies; 15+ messages in thread
From: George Guo @ 2026-06-08 10:23 UTC (permalink / raw)
To: Xi Ruoyao, chenhuacai, jpoimboe, peterz, jikos, mbenes, pmladek
Cc: kernel, joe.lawrence, rostedt, ardb, nathan,
nick.desaulniers+lkml, yangtiezhu, jiaxun.yang, liukexin,
loongarch, live-patching, llvm, linux-kernel, George Guo
On Fri, 2026-06-05 at 16:10 +0800, Xi Ruoyao wrote:
> This is incorrect.
>
> With GCC and Clang, -fPIC does not mean generating position independent
> code. It means generating position independent code *suitable for
> SVR4-style shared objects*.
>
> The kernel has nothing to do with SVR4-style shared objects. The
> kernel modules are not SVR4 shared objects but relocatable ELF object
> files.
You are right, and thank you for the correction. The commit message was
wrong: with CONFIG_RELOCATABLE=y the kernel is already built with -fPIE,
so the reference is not "absolute addressing" as I claimed. I will fix
the description in v2.
> If you only need position independent code (without the shared object
> stuff) you should use -fPIE instead. The kernel is already built with
> -fPIE if CONFIG_RELOCATABLE=y.
>
> Thus if you only need position independent code you should make live
> patching depend on CONFIG_RELOCATABLE.
This is the part I should have explained better. CONFIG_RELOCATABLE=y is
already set in my config, so the kernel is already -fPIE, and the panic
still happens. I also tried building the KLP objects with -fPIE
explicitly and it does not help -- only -fPIC fixes it.
The reason is not "position independence" but GOT indirection, which is
exactly the SVR4-shared-object behaviour you mention. A minimal
'return uts_sem;' (uts_sem defined in the same TU) compiles like this on
loongarch64 -- same conclusion under both gcc 14.2.1 and clang 19.1.6:
-fPIE:
pcalau12i $a0, ... R_LARCH_PCALA_HI20 uts_sem
addi.d $a0, $a0, ... R_LARCH_PCALA_LO12 uts_sem
ld.w $a0, $a0, 0
-fPIC:
pcalau12i $a0, ... R_LARCH_GOT_PC_HI20 uts_sem
ld.d $a0, $a0, ... R_LARCH_GOT_PC_LO12 uts_sem
ld.w $a0, $a0, 0
So under -fPIE the access is direct (no GOT); under -fPIC it goes through
the GOT. (As an aside, gcc additionally collapses the -fPIE reference
onto a local anchor .LANCHOR0, leaving no named 'uts_sem' relocation at
all; clang keeps the name but still emits the direct, non-GOT form.)
klp-build extracts the patched function out of its original object file
and links it into a separate livepatch module, while the referenced
symbol (e.g. 'uts_sem') stays in the core kernel. The klp relocation
machinery resolves such cross-object references through GOT entries it
creates in the patch module. The direct R_LARCH_PCALA reference emitted
under -fPIE has no GOT slot for it to fix up, so once the function is
moved into the module its target is wrong and it faults.
So this is one of the cases where the KLP machinery genuinely relies on
the GOT-indirect ("shared object style") access that -fPIC provides and
-fPIE deliberately optimizes away. In v2 I will keep -fPIC but rewrite
the commit message to explain this GOT-vs-direct-PCALA reason instead of
the incorrect "absolute addressing" wording.
I can also include the readelf -r / objdump diff (R_LARCH_PCALA_* under
-fPIE vs R_LARCH_GOT_PC_* under -fPIC) in the v2 commit message if that
is useful.
Thanks again for the review.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PATCH 3/8] LoongArch: Add special section entry sizes for KLP support
2026-06-05 8:38 ` WangYuli
@ 2026-06-08 10:33 ` George Guo
0 siblings, 0 replies; 15+ messages in thread
From: George Guo @ 2026-06-08 10:33 UTC (permalink / raw)
To: WangYuli
Cc: ardb, chenhuacai, guodongtai, jiaxun.yang, jikos, joe.lawrence,
jpoimboe, kernel, linux-kernel, liukexin, live-patching, llvm,
loongarch, mbenes, nathan, nick.desaulniers+lkml, peterz, pmladek,
rostedt, xry111, yangtiezhu
Hi WangYuli,
Thanks for the review -- all three points are addressed in v2:
https://lore.kernel.org/all/20260608100406.322598-1-dongtai.guo@linux.dev/
> Have you actually tested your changes with LLVM?
Yes, now confirmed: the affected files build cleanly with
'make LLVM=1' (clang). You were right that this had not been properly
exercised before -- the writable special sections were the real problem.
> BTW, "awM" is dangerous, pls see how did x86 do.
Fixed. __bug_table and __jump_table are writable, and SHF_MERGE cannot be
combined with SHF_WRITE (Clang rejects it). v2 drops "awM"/entsize on
those two and marks each entry with ANNOTATE_DATA_SPECIAL instead, just
as x86 and arm64 do; SHF_MERGE is kept only for the read-only
.altinstructions/__ex_table.
> And head.S doesn't need to include asm-offsets.h, it seems
> stackframe.h has included it.
Correct, removed -- head.S already pulls it in via <asm/stackframe.h>.
Thanks,
George
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2026-06-08 10:33 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-04 6:53 [PATCH 0/8] LoongArch: Add livepatch build (KLP) support George Guo
2026-06-04 6:53 ` [PATCH 1/8] " George Guo
2026-06-04 6:53 ` [PATCH 2/8] objtool/LoongArch: Add arch_adjusted_addend() for KLP support George Guo
2026-06-04 6:53 ` [PATCH 3/8] LoongArch: Add special section entry sizes " George Guo
2026-06-05 8:38 ` WangYuli
2026-06-08 10:33 ` George Guo
2026-06-04 6:53 ` [PATCH 4/8] livepatch/klp-build: disable direct-extern-access for LoongArch to fix kernel panic George Guo
2026-06-05 8:53 ` WangYuli
2026-06-04 6:53 ` [PATCH 5/8] LoongArch: fix kernel panic with -fPIC for same-compilation-unit symbol references George Guo
2026-06-05 8:10 ` Xi Ruoyao
2026-06-08 10:23 ` George Guo
2026-06-04 6:53 ` [PATCH 6/8] LoongArch: Fix EFI linking with -fdata-sections George Guo
2026-06-04 6:53 ` [PATCH 7/8] objtool/klp: Add LoongArch jump opcode bytes support George Guo
2026-06-04 6:53 ` [PATCH 8/8] klp-build: Add LoongArch syscall patching macro George Guo
2026-06-05 7:57 ` [PATCH 0/8] LoongArch: Add livepatch build (KLP) support WangYuli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox