Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kpatch-syscall: Fix kpatch s390 error when CONFIG_COMPAT is disabled #1431

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions kmod/patch/kpatch-syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
/* arch/s390/include/asm/syscall_wrapper.h versions */
#if defined(KPATCH_SYSCALL_WRAPPERS_V1)

#if defined(CONFIG_COMPAT)
#define __KPATCH_S390_SYS_STUBx(x, name, ...) \
long __s390_sys##name(struct pt_regs *regs); \
ALLOW_ERROR_INJECTION(__s390_sys##name, ERRNO); \
Expand All @@ -119,6 +120,9 @@
__MAP(x,__SC_TEST,__VA_ARGS__); \
return ret; \
}
#else
#define __KPATCH_S390_SYS_STUBx(x, name, ...)
#endif /* CONFIG_COMPAT */

#define __KPATCH_SYSCALL_DEFINEx(x, name, ...) \
__diag_push(); \
Expand All @@ -142,6 +146,7 @@

# else /* KPATCH_SYSCALL_WRAPPERS_V2 */

#if defined(CONFIG_COMPAT)
#define __KPATCH_S390_SYS_STUBx(x, name, ...) \
long __s390_sys##name(struct pt_regs *regs); \
ALLOW_ERROR_INJECTION(__s390_sys##name, ERRNO); \
Expand All @@ -155,6 +160,9 @@
__MAP(x, __SC_TEST, __VA_ARGS__); \
return __kpatch_do_sys##name(__MAP(x, __SC_COMPAT_CAST, __VA_ARGS__)); \
}
#else
#define __KPATCH_S390_SYS_STUBx(x, name, ...)
#endif /* CONFIG_COMPAT */

#define __KPATCH_SYSCALL_DEFINEx(x, name, ...) \
long __s390x_sys##name(struct pt_regs *regs); \
Expand Down
Loading