From: "Arnd Bergmann" <arnd@arndb.de>
To: "Zev Weiss" <zev@bewilderbeest.net>,
linux-arm-kernel@lists.infradead.org, kasan-dev@googlegroups.com
Cc: "Andrew Jeffery" <andrew@aj.id.au>,
"Anshuman Khandual" <anshuman.khandual@arm.com>,
"Dinh Nguyen" <dinguyen@kernel.org>,
"Russell King" <linux@armlinux.org.uk>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Stafford Horne" <shorne@gmail.com>,
linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org,
"Andrey Ryabinin" <ryabinin.a.a@gmail.com>,
"Alexander Potapenko" <glider@google.com>,
"Andrey Konovalov" <andreyknvl@gmail.com>,
"Dmitry Vyukov" <dvyukov@google.com>,
"Vincenzo Frascino" <vincenzo.frascino@arm.com>
Subject: Re: [PATCH] ARM: uaccess: Fix KASAN false-positives
Date: Wed, 15 Feb 2023 11:07:51 +0100 [thread overview]
Message-ID: <6a5e9a2b-46df-4717-8f4c-aac14d06d773@app.fastmail.com> (raw)
In-Reply-To: <20230215023706.19453-1-zev@bewilderbeest.net>
On Wed, Feb 15, 2023, at 03:37, Zev Weiss wrote:
> From: Andrew Jeffery <andrew@aj.id.au>
>
> __copy_to_user_memcpy() and __clear_user_memset() had been calling
> memcpy() and memset() respectively, leading to false-positive KASAN
> reports when starting userspace:
>
> [ 10.707901] Run /init as init process
> [ 10.731892] process '/bin/busybox' started with executable stack
> [ 10.745234]
> ==================================================================
> [ 10.745796] BUG: KASAN: user-memory-access in
> __clear_user_memset+0x258/0x3ac
> [ 10.747260] Write of size 2687 at addr 000de581 by task init/1
>
> Use __memcpy() and __memset() instead to allow userspace access, which
> is of course the intent of these functions.
>
> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
> Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Looks good to me. I've added it to my randconfig build tree to
see if there are any build time regressions in odd configurations.
If you don't hear back from me until tomorrow, please add this to
Russell's patch system at
https://www.arm.linux.org.uk/developer/patches/info.php
with my
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
prev parent reply other threads:[~2023-02-15 10:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-15 2:37 Zev Weiss
2023-02-15 10:07 ` Arnd Bergmann [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=6a5e9a2b-46df-4717-8f4c-aac14d06d773@app.fastmail.com \
--to=arnd@arndb.de \
--cc=andrew@aj.id.au \
--cc=andreyknvl@gmail.com \
--cc=anshuman.khandual@arm.com \
--cc=dinguyen@kernel.org \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=openbmc@lists.ozlabs.org \
--cc=ryabinin.a.a@gmail.com \
--cc=sam@ravnborg.org \
--cc=shorne@gmail.com \
--cc=vincenzo.frascino@arm.com \
--cc=zev@bewilderbeest.net \
/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
all inboxes | Powered by JetHome®