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] [thread-next>] [day] [month] [year] [list]
Message-ID: <aHdsQYvKN-dLQG2O@pc636>
Date: Wed, 16 Jul 2025 11:09:21 +0200
From: Uladzislau Rezki <urezki@...il.com>
To: Byungchul Park <byungchul@...com>, Yeo Reum Yun <YeoReum.Yun@....com>,
	Andrey Konovalov <andreyknvl@...il.com>
Cc: Yeo Reum Yun <YeoReum.Yun@....com>,
	Andrey Konovalov <andreyknvl@...il.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"glider@...gle.com" <glider@...gle.com>,
	"dvyukov@...gle.com" <dvyukov@...gle.com>,
	Vincenzo Frascino <Vincenzo.Frascino@....com>,
	"bigeasy@...utronix.de" <bigeasy@...utronix.de>,
	"clrkwllms@...nel.org" <clrkwllms@...nel.org>,
	"rostedt@...dmis.org" <rostedt@...dmis.org>,
	"max.byungchul.park@...il.com" <max.byungchul.park@...il.com>,
	"ysk@...lloc.com" <ysk@...lloc.com>,
	"kasan-dev@...glegroups.com" <kasan-dev@...glegroups.com>,
	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-rt-devel@...ts.linux.dev" <linux-rt-devel@...ts.linux.dev>,
	"kernel_team@...ynix.com" <kernel_team@...ynix.com>,
	"urezki@...il.com" <urezki@...il.com>
Subject: Re: [PATCH v2] kasan: remove kasan_find_vm_area() to prevent
 possible deadlock

On Mon, Jul 14, 2025 at 08:27:40AM +0900, Byungchul Park wrote:
> On Sat, Jul 12, 2025 at 03:46:10PM +0000, Yeo Reum Yun wrote:
> > Hi ByungChul,
> > 
> > [...]
> > > I checked the critical section by &vn->busy.lock in find_vm_area().  The
> > > time complextity looks O(log N).  I don't think an irq disabled section
> > > of O(log N) is harmful.  I still think using
> > > spin_lock_irqsave(&vn->busy.lock) can resolve this issue with no worry
> > > of significant irq delay.  Am I missing something?
> > 
> > I don't agree for this.
> > since in PREEMPT_RT case, it has the same problem.
> > 
> > In case of PREEMPT_RT, spin_lock_irqsave() becomes rt_spin_lock() which is sleepable.
> > But, KASAN calls "rt_spin_lock()" holding raw_spin_lock_irqsave() which is definitely wrong.
> 
> It's another issue than irq handling latency, but it's about lock usage
> correctness.  You are right.
> 
There is vmalloc_dump_obj() function which should be used IMO:

<snip>
pr_err("The buggy address %px belongs to a vmalloc virtual mapping, dump it...\n", addr);
vmalloc_dump_obj(addr);
<snip>

we use trylock there to eliminate an issue if invoked from the IRQ
context.

--
Uladzislau Rezki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ