From: Andrey Konovalov <andreyknvl@gmail.com>
To: Waiman Long <llong@redhat.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Clark Williams <clrkwllms@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
kasan-dev@googlegroups.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, linux-rt-devel@lists.linux.dev,
Nico Pache <npache@redhat.com>
Subject: Re: [PATCH v3] kasan: Don't call find_vm_area() in RT kernel
Date: Mon, 17 Feb 2025 19:59:36 +0100 [thread overview]
Message-ID: <CA+fCnZeBuWMUk4n01z0tWf65dvyBvLghqohJYKA0WkQ5pMjdEw@mail.gmail.com> (raw)
In-Reply-To: <d9c96532-9598-426e-a469-dafd17d47a70@redhat.com>
On Mon, Feb 17, 2025 at 6:56 PM Waiman Long <llong@redhat.com> wrote:
>
> >> + */
> >> +static inline void print_vmalloc_info_set_page(void *addr, struct page **ppage)
> >> +{
> >> + if (!IS_ENABLED(CONFIG_PREEMPT_RT)) {
> >> + static DEFINE_WAIT_OVERRIDE_MAP(vmalloc_map, LD_WAIT_SLEEP);
> >> + struct vm_struct *va;
> >> +
> >> + lock_map_acquire_try(&vmalloc_map);
> >> + va = find_vm_area(addr);
> >> + if (va) {
> >> + pr_err("The buggy address belongs to the virtual mapping at\n"
> >> + " [%px, %px) created by:\n"
> >> + " %pS\n",
> >> + va->addr, va->addr + va->size, va->caller);
> >> + pr_err("\n");
> >> +
> >> + *ppage = vmalloc_to_page(addr);
> > Looking at the code again, I actually like the Andrey Ryabinin's
> > suggestion from the v1 thread: add a separate function that contains
> > an annotated call of find_vm_area(). And keep vmalloc_to_page()
> > outside of it, just as done in the upstream version now.
>
> I can make the change if it is what you want.
Yes, please, I think splitting out the call that requires an
annotation into a separate function makes sense.
prev parent reply other threads:[~2025-02-17 18:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 4:21 Waiman Long
2025-02-17 15:43 ` Sebastian Andrzej Siewior
2025-02-17 16:29 ` Andrey Konovalov
2025-02-17 16:28 ` Andrey Konovalov
2025-02-17 17:56 ` Waiman Long
2025-02-17 18:59 ` Andrey Konovalov [this message]
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=CA+fCnZeBuWMUk4n01z0tWf65dvyBvLghqohJYKA0WkQ5pMjdEw@mail.gmail.com \
--to=andreyknvl@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--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=llong@redhat.com \
--cc=npache@redhat.com \
--cc=rostedt@goodmis.org \
--cc=ryabinin.a.a@gmail.com \
--cc=vincenzo.frascino@arm.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