lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <3ee1aeb7-bd3a-4d6e-a446-2390de0ce561@huaweicloud.com>
Date: Fri, 29 Aug 2025 17:45:10 +0800
From: Tengda Wu <wutengda@...weicloud.com>
To: Josh Poimboeuf <jpoimboe@...nel.org>
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 2025/8/29 3:16, Josh Poimboeuf wrote:
> 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) {
> 		...
> 

Dave mentioned that there's an object_is_on_stack available, which is
essentially on_current_stack. I will try using it and send out v2.

Thanks,
Tengda


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ