Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f290393
create-diff-object: ignore _error_injection_whitelist section changes
qiruibd Jul 15, 2026
7ee9124
create-diff-object: fix .kpatch.ignore.sections string offset calcula…
qiruibd Jul 15, 2026
d96f091
kpatch: fall back to modinfo for module names
qiruibd Jul 29, 2026
481518c
integration: handle CONFIG_PRINTK_CALLER in dmesg marker matching
qiruibd Jul 29, 2026
08caff5
kpatch-build: fall back to unprefixed ld.lld
qiruibd Oct 5, 2026
37667a1
kpatch-build: add riscv64 architecture support
qiruibd Sep 22, 2026
759c92b
create-diff-object: add RISC-V ftrace callsite support
qiruibd Sep 22, 2026
2c96286
kpatch-elf: handle RISC-V mapping symbols and local labels
qiruibd Sep 22, 2026
2a31d18
create-diff-object: implement insn_is_load_immediate() for RISC-V
qiruibd Jul 10, 2026
e09083c
create-diff-object: add RISC-V special section handling
qiruibd Sep 21, 2026
bfe1a07
create-diff-object: add RISC-V .alternative handling
qiruibd Sep 22, 2026
b32ad07
create-diff-object: handle RISC-V __jump_table relocs
qiruibd Sep 22, 2026
051b155
create-diff-object: fix RISC-V special-section anchors
qiruibd Sep 22, 2026
ce43293
create-diff-object: add RISC-V intermediate relocation metadata
qiruibd Sep 24, 2026
1bd333c
create-klp-module: add RISC-V KLP relocation slots
qiruibd Sep 25, 2026
75582e5
create-klp-module: support RISC-V PC-relative loads
qiruibd Sep 25, 2026
cc56e2d
create-diff-object: skip relocs to sections without allocated data
qiruibd Sep 21, 2026
0d63d0f
create-diff-object: retain symbols used by debug relocs
qiruibd Sep 22, 2026
f63200d
kpatch-syscall: add RISC-V syscall wrapper macro support
qiruibd Jul 15, 2026
ecb4276
kpatch-build: add RISC-V skip-vmlinux final-link flow
qiruibd Sep 29, 2026
5731d66
kpatch-build: restrict RISC-V skip-link to vmlinux objects
qiruibd Sep 29, 2026
45da8d5
test: reject RISC-V skip-link module patches
qiruibd Sep 28, 2026
4f82a1c
test/unit: update objs submodule for RISC-V test objects
qiruibd Jul 15, 2026
43db961
test: add RISC-V test harness support
qiruibd Sep 22, 2026
e94c642
test: add Linux 6.12.95 integration tests
qiruibd Sep 21, 2026
e31c7a5
test: count functions by ELF symbol type
qiruibd Sep 30, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions kmod/patch/kpatch-syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,27 @@
} \
static inline long __kpatch_do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))

#elif defined(CONFIG_RISCV)

/* arch/riscv/include/asm/syscall_wrapper.h versions */

#define __KPATCH_SYSCALL_DEFINEx(x, name, ...) \
asmlinkage long __riscv_sys##name(const struct pt_regs *regs); \
ALLOW_ERROR_INJECTION(__riscv_sys##name, ERRNO); \
static inline long __kpatch_do_sys##name(__MAP(x, __SC_DECL, __VA_ARGS__));\
__SYSCALL_SE_DEFINEx(x, sys, name, __VA_ARGS__) \
{ \
long ret = __kpatch_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; \
} \
asmlinkage long __riscv_sys##name(const struct pt_regs *regs) \
{ \
return __se_sys##name(SC_RISCV_REGS_TO_ARGS(x, __VA_ARGS__)); \
} \
static inline long __kpatch_do_sys##name(__MAP(x, __SC_DECL, __VA_ARGS__))

#endif /* which arch */


Expand Down
2 changes: 1 addition & 1 deletion kpatch-build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ PLUGIN_CFLAGS := $(filter-out -std=gnu11 -Wconversion, $(CFLAGS))
PLUGIN_CFLAGS += -shared -I$(GCC_PLUGINS_DIR)/include \
-Igcc-plugins -fPIC -fno-rtti -O2 -Wall
endif
ifeq ($(filter $(ARCH),s390x x86_64 ppc64le aarch64 loongarch64),)
ifeq ($(filter $(ARCH),s390x x86_64 ppc64le aarch64 loongarch64 riscv64),)
$(error Unsupported architecture ${ARCH}, check https://github.com/dynup/kpatch/#supported-architectures)
endif

Expand Down
Loading