From: Andrey Konovalov <andreyknvl@gmail.com>
To: Marco Elver <elver@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
Taras Madan <tarasmadan@google.com>,
Aleksandr Nogikh <nogikh@google.com>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
Jonathan Corbet <corbet@lwn.net>,
kasan-dev@googlegroups.com, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] kasan: add support for kasan.fault=panic_on_write
Date: Tue, 20 Jun 2023 12:57:39 +0200 [thread overview]
Message-ID: <CA+fCnZdy4TmMacvsPkoenCynUYsyKZ+kU1fx7cDpbh_6=cEPAQ@mail.gmail.com> (raw)
In-Reply-To: <20230614095158.1133673-1-elver@google.com>
On Wed, Jun 14, 2023 at 11:52 AM Marco Elver <elver@google.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!
next prev parent reply other threads:[~2023-06-20 10:57 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 9:51 Marco Elver
2023-06-14 10:06 ` Alexander Potapenko
2023-06-20 10:57 ` Andrey Konovalov [this message]
2023-06-20 11:32 ` Marco Elver
2023-06-20 11:45 ` Andrey Konovalov
2023-06-20 11:51 ` Marco Elver
2023-06-20 13:56 ` Andrey Konovalov
2023-06-20 14:48 ` Marco Elver
2023-06-20 16:27 ` Andrey Konovalov
2023-06-20 17:17 ` [PATCH] kasan, doc: note kasan.fault=panic_on_write behaviour for async modes Marco Elver
2023-06-20 17:19 ` Andrey Konovalov
2023-06-20 17:23 ` [PATCH] kasan: add support for kasan.fault=panic_on_write 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='CA+fCnZdy4TmMacvsPkoenCynUYsyKZ+kU1fx7cDpbh_6=cEPAQ@mail.gmail.com' \
--to=andreyknvl@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=corbet@lwn.net \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=nogikh@google.com \
--cc=ryabinin.a.a@gmail.com \
--cc=tarasmadan@google.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