From 1fa6b3d90de26abe510a198392c22c8ac0bf18c8 Mon Sep 17 00:00:00 2001 From: bmax Date: Tue, 9 Apr 2024 15:48:51 +0800 Subject: [PATCH] struct pt_regs: maintain 16-bytes align --- kernel/patch/ksyms/execv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/patch/ksyms/execv.c b/kernel/patch/ksyms/execv.c index b58dfec1..21660350 100644 --- a/kernel/patch/ksyms/execv.c +++ b/kernel/patch/ksyms/execv.c @@ -38,7 +38,7 @@ static void before_execve(hook_fargs3_t *args, void *udata) unsigned long stack = (unsigned long)get_stack(current); uintptr_t addr = (uintptr_t)(thread_size + stack); - for (uintptr_t i = addr - sizeof(struct pt_regs) - 0x40; i < addr - 31 * 8; i += 8) { + for (uintptr_t i = addr - sizeof(struct pt_regs) - 0x40; i < addr - 32 * 8; i += 0x10) { uintptr_t val0 = *(uintptr_t *)i; uintptr_t val1 = *(uintptr_t *)(i + 0x8); uintptr_t val2 = *(uintptr_t *)(i + 0x10);