On Sat, Jan 28, 2023 at 4:31 AM Conor Dooley <conor@xxxxxxxxxx> wrote: > grepping for code that does this (with your series applied), you are > the only one who is using PT_SIZE rather than PT_SIZE_ON_STACK: Yes, you are right. It should be PT_SIZE_ON_STACK, which considers alignment of the stack top. The task_pt_regs() counter parts, which is the macro that operates on it, also aligns to STACK_ALIGN. So , we should use PT_SIZE_ON_STACK instead of PT_SIZE here. #define task_pt_regs(tsk) \ ((struct pt_regs *)(task_stack_page(tsk) + THREAD_SIZE \ - ALIGN(sizeof(struct pt_regs), STACK_ALIGN))) Thanks, Andy