[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<GV1PR08MB1052126BB553BD36DA768C998FB4AA@GV1PR08MB10521.eurprd08.prod.outlook.com>
Date: Sat, 12 Jul 2025 15:46:10 +0000
From: Yeo Reum Yun <YeoReum.Yun@....com>
To: Byungchul Park <byungchul@...com>, Andrey Konovalov <andreyknvl@...il.com>
CC: "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
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.
But as Uladzislau said, without reference count manage, UAF can always happen.
IOW, If KASAN to dump vm information, I think we need:
1. manage reference for vmap_area.
2. find_vm_area() with rcu version.
Thanks.
--
Sincerely,
Yeoreum Yun
Powered by blists - more mailing lists