Skip to content

Commit

Permalink
kpatch-syscall: update for s390x RHEL-9.6 backports
Browse files Browse the repository at this point in the history
RHEL-9.6 backported the upstream v6.3 s390x syscall updates, so add a
distro-specific kernel version check around the correct definitions.

Signed-off-by: Joe Lawrence <[email protected]>
  • Loading branch information
joe-lawrence committed Dec 9, 2024
1 parent cbf2bc9 commit 2b76244
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions kmod/patch/kpatch-syscall.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,23 @@

#elif defined(CONFIG_S390)

/* arch/s390/include/asm/syscall_wrapper.h versions */
# if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 3, 0)
# define KPATCH_SYSCALL_WRAPPERS_V2
# else
# define KPATCH_SYSCALL_WRAPPERS_V1
# endif

# if defined(RHEL_RELEASE_CODE)
# if RHEL_RELEASE_CODE >= RHEL_RELEASE_VERSION(9, 6)
# define KPATCH_SYSCALL_WRAPPERS_V2
# else
# define KPATCH_SYSCALL_WRAPPERS_V1
# endif
# endif


/* arch/s390/include/asm/syscall_wrapper.h versions */
#if defined(KPATCH_SYSCALL_WRAPPERS_V2)

#define __KPATCH_S390_SYS_STUBx(x, name, ...) \
long __s390_sys##name(struct pt_regs *regs); \
Expand Down Expand Up @@ -157,7 +172,7 @@
__diag_pop(); \
static inline long __kpatch_do_sys##name(__MAP(x,__SC_DECL,__VA_ARGS__))

#endif /* LINUX_VERSION_CODE */
#endif /* KPATCH_SYSCALL_WRAPPERS_V2 */

#elif defined(CONFIG_PPC64)

Expand Down

0 comments on commit 2b76244

Please sign in to comment.