Re: [PATCH v2] riscv: VMAP_STACK overflow detection thread-safe

From: Deepak Gupta
Date: Fri Nov 25 2022 - 15:13:58 EST


On Thu, Nov 24, 2022 at 05:53:45PM +0800, Guo Ren wrote:
On Thu, Nov 24, 2022 at 5:48 PM Deepak Gupta <debug@xxxxxxxxxxxx> wrote:

index df9444397908..a7da051159cf 100644
--- a/arch/riscv/kernel/asm-offsets.c
+++ b/arch/riscv/kernel/asm-offsets.c
@@ -38,6 +38,7 @@ void asm_offsets(void)
OFFSET(TASK_TI_KERNEL_SP, task_struct, thread_info.kernel_sp);
OFFSET(TASK_TI_USER_SP, task_struct, thread_info.user_sp);

+ OFFSET(TASK_TI_CPU_NUM, task_struct, thread_info.cpu);
Why not TASK_TI_CPU ?
No specific reason.

OFFSET(TASK_THREAD_F0, task_struct, thread.fstate.f[0]);
OFFSET(TASK_THREAD_F1, task_struct, thread.fstate.f[1]);
OFFSET(TASK_THREAD_F2, task_struct, thread.fstate.f[2]);