[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <r3gkmgetikfsuggva42qnfxzx3pdiy3vtl25fepfvvacvrzyjz@xmgcvxuquary>
Date: Thu, 28 Aug 2025 12:16:17 -0700
From: Josh Poimboeuf <jpoimboe@...nel.org>
To: Tengda Wu <wutengda@...weicloud.com>
Cc: Andrey Ryabinin <ryabinin.a.a@...il.com>, x86@...nel.org,
Thomas Gleixner <tglx@...utronix.de>, Alexander Potapenko <glider@...gle.com>,
Andrey Konovalov <andreyknvl@...il.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, Dmitry Vyukov <dvyukov@...gle.com>,
Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
Peter Zijlstra <peterz@...radead.org>
Subject: Re: [PATCH -next] x86: Prevent KASAN false positive warnings in
__show_regs()
On Thu, Aug 28, 2025 at 08:06:17PM +0800, Tengda Wu wrote:
> +++ b/arch/x86/kernel/dumpstack.c
> @@ -189,9 +189,15 @@ static void show_trace_log_lvl(struct task_struct *task, struct pt_regs *regs,
> unsigned long visit_mask = 0;
> int graph_idx = 0;
> bool partial = false;
> + bool kasan_disabled = false;
>
> printk("%sCall Trace:\n", log_lvl);
>
> + if (task != current) {
> + kasan_disable_current();
> + kasan_disabled = true;
> + }
Looks reasonable to me, though note that some callers pass a NULL @task
to indicate 'current'.
(No idea why, that subtlety should probably be removed...)
So this might need to be
if (task && task != current) {
...
--
Josh
Powered by blists - more mailing lists