From: Andrey Konovalov <andreyknvl@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
Peter Collingbourne <pcc@google.com>
Cc: "袁帅(Shuai Yuan)" <yuanshuai@zeku.com>,
"Dmitry Vyukov" <dvyukov@google.com>,
"欧阳炜钊(Weizhao Ouyang)" <ouyangweizhao@zeku.com>,
"Andrey Ryabinin" <ryabinin.a.a@gmail.com>,
"Alexander Potapenko" <glider@google.com>,
"Vincenzo Frascino" <vincenzo.frascino@arm.com>,
"Andrew Morton" <akpm@linux-foundation.org>,
"kasan-dev@googlegroups.com" <kasan-dev@googlegroups.com>,
"linux-mm@kvack.org" <linux-mm@kvack.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Weizhao Ouyang" <o451686892@gmail.com>,
"任立鹏(Peng Ren)" <renlipeng@zeku.com>
Subject: Re: [PATCH v2] kasan: fix deadlock in start_report()
Date: Sat, 11 Mar 2023 00:42:20 +0100 [thread overview]
Message-ID: <CA+fCnZdFZ0w33GcUWRfWhNmYkhszQ0gwVKGeY0uSOzBEJJe27A@mail.gmail.com> (raw)
In-Reply-To: <Y/+Ei5boQh+TFj7Q@arm.com>
On Wed, Mar 1, 2023 at 6:00 PM Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> Yes. I'm including Vincenzo's patch below (part of fixing some potential
> strscpy() faults with its unaligned accesses eager reading; we'll get to
> posting that eventually). You can add some arch_kasan_enable/disable()
> macros on top and feel free to include the patch below.
Ah, perfect! I'll send a patchset soon. Thanks!
> Now, I wonder whether we should link those into kasan_disable_current().
> These functions only deal with the depth for KASAN_SW_TAGS but it would
> make sense for KASAN_HW_TAGS to enable tag-check-override so that we
> don't need to bother with a match-all tags on pointer dereferencing.
Using these TCO routines requires having (at least) migration disabled, right?
It's not a problem for KASAN reporting code, as it already disables
preemption anyway.
The question is with the other kasan_disable/enable_current() call
sites. But as within all of them, the code does either a single access
or a memcpy or something similar, I think we can disable preemption
for that duration.
On a related note, I recalled that we also have a bug about using
supporting no_sanitize_address for HW_TAGS KASAN. And Peter suggested
using TCO entry/exit instrumentation to resolve it [2]. However, we
will also need to disable preemption for the duration of
no_sanitize_address-annotated functions, and I'm not sure if it's a
good idea to do that via compiler instrumentation.
Any thoughts?
In the mean time, I'll send a simpler patchset without converting all
kasan_disable/enable_current().
[1] https://bugzilla.kernel.org/show_bug.cgi?id=212513
[2] https://bugzilla.kernel.org/show_bug.cgi?id=212513#c2
next prev parent reply other threads:[~2023-03-10 23:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230209031159.2337445-1-ouyangweizhao@zeku.com>
2023-02-09 8:55 ` Dmitry Vyukov
[not found] ` <93b94f59016145adbb1e01311a1103f8@zeku.com>
2023-02-09 10:44 ` Dmitry Vyukov
2023-02-09 22:54 ` Andrey Konovalov
[not found] ` <b058a424e46d4f94a1f2fdc61292606b@zeku.com>
2023-02-15 13:22 ` 袁帅(Shuai Yuan)
2023-02-27 2:13 ` Andrey Konovalov
2023-02-28 16:09 ` Catalin Marinas
2023-02-28 21:50 ` Andrey Konovalov
2023-03-01 16:59 ` Catalin Marinas
2023-03-10 23:42 ` Andrey Konovalov [this message]
2023-03-15 16:14 ` Catalin Marinas
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+fCnZdFZ0w33GcUWRfWhNmYkhszQ0gwVKGeY0uSOzBEJJe27A@mail.gmail.com \
--to=andreyknvl@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--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=o451686892@gmail.com \
--cc=ouyangweizhao@zeku.com \
--cc=pcc@google.com \
--cc=renlipeng@zeku.com \
--cc=ryabinin.a.a@gmail.com \
--cc=vincenzo.frascino@arm.com \
--cc=yuanshuai@zeku.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