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: <CA+fCnZeBuWMUk4n01z0tWf65dvyBvLghqohJYKA0WkQ5pMjdEw@mail.gmail.com>
Date: Mon, 17 Feb 2025 19:59:36 +0100
From: Andrey Konovalov <andreyknvl@...il.com>
To: Waiman Long <llong@...hat.com>
Cc: Andrey Ryabinin <ryabinin.a.a@...il.com>, Alexander Potapenko <glider@...gle.com>, 
	Dmitry Vyukov <dvyukov@...gle.com>, Vincenzo Frascino <vincenzo.frascino@....com>, 
	Andrew Morton <akpm@...ux-foundation.org>, 
	Sebastian Andrzej Siewior <bigeasy@...utronix.de>, Clark Williams <clrkwllms@...nel.org>, 
	Steven Rostedt <rostedt@...dmis.org>, kasan-dev@...glegroups.com, linux-mm@...ck.org, 
	linux-kernel@...r.kernel.org, linux-rt-devel@...ts.linux.dev, 
	Nico Pache <npache@...hat.com>
Subject: Re: [PATCH v3] kasan: Don't call find_vm_area() in RT kernel

On Mon, Feb 17, 2025 at 6:56 PM Waiman Long <llong@...hat.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ