kernel: refactor PR_REAL_REGS
This commit is contained in:
@@ -542,11 +542,7 @@ int ksu_handle_setuid(struct cred *new, const struct cred *old)
|
||||
|
||||
static int handler_pre(struct kprobe *p, struct pt_regs *regs)
|
||||
{
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 16, 0)
|
||||
struct pt_regs *real_regs = (struct pt_regs *)PT_REGS_PARM1(regs);
|
||||
#else
|
||||
struct pt_regs *real_regs = regs;
|
||||
#endif
|
||||
struct pt_regs *real_regs = PT_REAL_REGS(regs);
|
||||
int option = (int)PT_REGS_PARM1(real_regs);
|
||||
unsigned long arg2 = (unsigned long)PT_REGS_PARM2(real_regs);
|
||||
unsigned long arg3 = (unsigned long)PT_REGS_PARM3(real_regs);
|
||||
|
||||
Reference in New Issue
Block a user