hulk inclusion category: bugfix bugzilla: https://atomgit.com/openeuler/kernel/issues/8883 -------------------------------- This reverts commit 3b5c43e23a8c43a202c7cf7357c363a160c33e7d. Tirui has already backported this commit (See !20507), so revert this to avoid redefined compilation error: arch/riscv/kernel/stacktrace.c:38: error: "READ_ONCE_TASK_STACK" redefined [-Werror] 38 | #define READ_ONCE_TASK_STACK(task, x) \ | arch/riscv/kernel/stacktrace.c:23: note: this is the location of the previous definition 23 | #define READ_ONCE_TASK_STACK(task, x) \ | cc1: all warnings being treated as errors. Fixes: 3b5c43e23a8c ("riscv: stacktrace: Disable KASAN checks for non-current tasks") Signed-off-by: Tengda Wu <wutengda2@huawei.com> --- arch/riscv/kernel/stacktrace.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/arch/riscv/kernel/stacktrace.c b/arch/riscv/kernel/stacktrace.c index 994cd6bfa468..246a2e095050 100644 --- a/arch/riscv/kernel/stacktrace.c +++ b/arch/riscv/kernel/stacktrace.c @@ -30,22 +30,6 @@ val; \ }) -/* - * This disables KASAN checking when reading a value from another task's stack, - * since the other task could be running on another CPU and could have poisoned - * the stack in the meantime. - */ -#define READ_ONCE_TASK_STACK(task, x) \ -({ \ - unsigned long val; \ - unsigned long addr = x; \ - if ((task) == current) \ - val = READ_ONCE(addr); \ - else \ - val = READ_ONCE_NOCHECK(addr); \ - val; \ -}) - extern asmlinkage void handle_exception(void); extern unsigned long ret_from_exception_end; -- 2.34.1