[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+fCnZdy4TmMacvsPkoenCynUYsyKZ+kU1fx7cDpbh_6=cEPAQ@mail.gmail.com>
Date: Tue, 20 Jun 2023 12:57:39 +0200
From: Andrey Konovalov <andreyknvl@...il.com>
To: Marco Elver <elver@...gle.com>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Alexander Potapenko <glider@...gle.com>,
Dmitry Vyukov <dvyukov@...gle.com>,
Taras Madan <tarasmadan@...gle.com>,
Aleksandr Nogikh <nogikh@...gle.com>,
Andrey Ryabinin <ryabinin.a.a@...il.com>,
Vincenzo Frascino <vincenzo.frascino@....com>,
Jonathan Corbet <corbet@....net>, kasan-dev@...glegroups.com,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-mm@...ck.org
Subject: Re: [PATCH] kasan: add support for kasan.fault=panic_on_write
On Wed, Jun 14, 2023 at 11:52 AM Marco Elver <elver@...gle.com> wrote:
>
> @@ -597,7 +614,11 @@ void kasan_report_async(void)
> pr_err("Asynchronous fault: no details available\n");
> pr_err("\n");
> dump_stack_lvl(KERN_ERR);
> - end_report(&flags, NULL);
> + /*
> + * Conservatively set is_write=true, because no details are available.
> + * In this mode, kasan.fault=panic_on_write is like kasan.fault=panic.
> + */
> + end_report(&flags, NULL, true);
Hi Marco,
When asymm mode is enabled, kasan_report_async should only be called
for read accesses. I think we could check the mode and panic
accordingly.
Please also update the documentation to describe the flag behavior wrt
async/asymm modes.
On a related note, it looks like we have a typo in KASAN
documentation: it states that asymm mode detects reads synchronously,
and writes - asynchronously. Should be the reverse.
Thanks!
Powered by blists - more mailing lists