From cbd6d6d9d8397efcfb7bf0ab428020065d0ff10b Mon Sep 17 00:00:00 2001 From: bmax Date: Wed, 1 May 2024 09:09:18 +0800 Subject: [PATCH] maintain pt_regs offset --- kernel/patch/common/utils.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kernel/patch/common/utils.c b/kernel/patch/common/utils.c index 33779e50..beff9dde 100644 --- a/kernel/patch/common/utils.c +++ b/kernel/patch/common/utils.c @@ -124,11 +124,11 @@ struct pt_regs *_task_pt_reg(struct task_struct *task) #ifndef ANDROID if (kver < VERSION(4, 4, 19)) { addr -= sizeof(struct pt_regs_lt4419); + } else if (kver < VERSION(4, 14, 0)) { + addr -= sizeof(struct pt_regs_lt4140); } else #endif - if (kver < VERSION(4, 14, 0)) { - addr -= sizeof(struct pt_regs_lt4140); - } else if (kver < VERSION(5, 10, 0)) { + if (kver < VERSION(5, 10, 0)) { addr -= sizeof(struct pt_regs_lt5100); } else { addr -= sizeof(struct pt_regs);