From: Yeoreum Yun <yeoreum.yun@arm.com>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Cc: glider@google.com, andreyknvl@gmail.com, dvyukov@google.com,
vincenzo.frascino@arm.com, akpm@linux-foundation.org,
clrkwllms@kernel.org, rostedt@goodmis.org, byungchul@sk.com,
max.byungchul.park@gmail.com, ysk@kzalloc.com,
kasan-dev@googlegroups.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev
Subject: Re: [PATCH v2] kasan: remove kasan_find_vm_area() to prevent possible deadlock
Date: Mon, 7 Jul 2025 14:49:05 +0100 [thread overview]
Message-ID: <aGvQUXfNcnRfU0jg@e129823.arm.com> (raw)
In-Reply-To: <20250707084440.9hrE23w0@linutronix.de>
Hi Sebastian,
> On 2025-07-07 09:33:54 [+0100], Yeoreum Yun wrote:
> > Hi Sebastian,
> Hi,
>
> > > what is DEPT?
> >
> > Please check the below patchset:
> > https://lore.kernel.org/all/20250519091826.19752-1-byungchul@sk.com/
>
> Thank you.
>
> Would lockdep see this if check_region_inline() would have something
> like (minus missing exports, just illustrate the idea)
>
> diff --git a/mm/kasan/generic.c b/mm/kasan/generic.c
> index d54e89f8c3e76..c74e8e0863723 100644
> --- a/mm/kasan/generic.c
> +++ b/mm/kasan/generic.c
> @@ -171,6 +171,11 @@ static __always_inline bool check_region_inline(const void *addr,
> if (unlikely(size == 0))
> return true;
>
> + {
> + struct vmap_node *vn = vn = &vmap_nodes[0];
> + might_lock(vn->busy.lock);
> + }
> +
> if (unlikely(addr + size < addr))
> return !kasan_report(addr, size, write, ret_ip);
>
>
> ? Just to understand if lockdep is missing something essential or if
> DEPT was simply enabled why this "bad" accessed occurred and was able to
> see the lock chain which otherwise stays invisible.
No. I think lockdep could print this error situation without this patch.
Since lockdep prints other cycle in test enviroment. I've attached the
DEPT report.
Thanks.
--
Sincerely,
Yeoreum Yun
next prev parent reply other threads:[~2025-07-07 13:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-03 18:10 Yeoreum Yun
2025-07-03 18:44 ` Andrey Konovalov
2025-07-03 18:55 ` Yeoreum Yun
2025-07-03 19:05 ` Andrey Konovalov
2025-07-03 19:13 ` Yeoreum Yun
2025-07-04 13:07 ` Andrey Ryabinin
2025-07-03 18:57 ` Yeo Reum Yun
2025-07-03 20:35 ` Andrew Morton
2025-07-04 12:40 ` Andrey Ryabinin
2025-07-07 8:30 ` Sebastian Andrzej Siewior
2025-07-07 8:33 ` Yeoreum Yun
2025-07-07 8:44 ` Sebastian Andrzej Siewior
2025-07-07 13:49 ` Yeoreum Yun [this message]
2025-07-10 12:43 ` Andrey Konovalov
2025-07-11 2:08 ` Byungchul Park
2025-07-11 2:11 ` Byungchul Park
2025-07-11 8:54 ` Uladzislau Rezki
2025-07-12 15:46 ` Yeo Reum Yun
2025-07-13 23:27 ` Byungchul Park
2025-07-16 9:09 ` Uladzislau Rezki
2025-07-16 15:28 ` Marco Elver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aGvQUXfNcnRfU0jg@e129823.arm.com \
--to=yeoreum.yun@arm.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=bigeasy@linutronix.de \
--cc=byungchul@sk.com \
--cc=clrkwllms@kernel.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rt-devel@lists.linux.dev \
--cc=max.byungchul.park@gmail.com \
--cc=rostedt@goodmis.org \
--cc=vincenzo.frascino@arm.com \
--cc=ysk@kzalloc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®