From: Will Deacon <will.deacon@arm.com>
To: Andrey Ryabinin <aryabinin@virtuozzo.com>, akpm@linux-foundation.org
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Kyeongdon Kim <kyeongdon.kim@lge.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Alexander Potapenko <glider@google.com>,
Dmitry Vyukov <dvyukov@google.com>,
"kasan-dev@googlegroups.com" <kasan-dev@googlegroups.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH v2 2/3] arm64: lib: use C string functions with KASAN enabled.
Date: Mon, 29 Oct 2018 11:20:35 +0000 [thread overview]
Message-ID: <20181029112034.GE14127@arm.com> (raw)
In-Reply-To: <9cf4a5ff-b68d-5703-720a-bce05409428a@virtuozzo.com>
Hi Andrey, Andrew,
On Mon, Oct 29, 2018 at 11:16:15AM +0000, Andrey Ryabinin wrote:
> On 10/29/2018 01:29 PM, Will Deacon wrote:
> > On Thu, Sep 20, 2018 at 04:56:30PM +0300, Andrey Ryabinin wrote:
> >> ARM64 has asm implementation of memchr(), memcmp(), str[r]chr(),
> >> str[n]cmp(), str[n]len(). KASAN don't see memory accesses in asm
> >> code, thus it can potentially miss many bugs.
> >>
> >> Ifdef out __HAVE_ARCH_* defines of these functions when KASAN is
> >> enabled, so the generic implementations from lib/string.c will be used.
> >>
> >> We can't just remove the asm functions because efistub uses them.
> >> And we can't have two non-weak functions either, so declare the asm
> >> functions as weak.
> >>
> >> Reported-by: Kyeongdon Kim <kyeongdon.kim@lge.com>
> >> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
> >> ---
> >> Changes since v1:
> >> - Use WEAK() instead of .weak
> >>
> >> arch/arm64/include/asm/string.h | 14 ++++++++------
> >> arch/arm64/kernel/arm64ksyms.c | 7 +++++--
> >> arch/arm64/lib/memchr.S | 2 +-
> >> arch/arm64/lib/memcmp.S | 2 +-
> >> arch/arm64/lib/strchr.S | 2 +-
> >> arch/arm64/lib/strcmp.S | 2 +-
> >> arch/arm64/lib/strlen.S | 2 +-
> >> arch/arm64/lib/strncmp.S | 2 +-
> >> arch/arm64/lib/strnlen.S | 2 +-
> >> arch/arm64/lib/strrchr.S | 2 +-
> >> 10 files changed, 21 insertions(+), 16 deletions(-)
> >
> > Acked-by: Will Deacon <will.deacon@arm.com>
> >
> > Please post these again after the merge window and we'll figure out how to
> > get them queued.
>
> Andrew sent these patches to Linus couple days ago, so they are in tree
> already.
Oh, good thing I was happy with them in the end, then!
> Something went wrong with mail notification though. I didn't even realize
> that they were in -mm tree, because I didn't receive the usual 'the patch
> has been added to -mm tree' email. But I did receive email that was sent
> to Linus.
Yeah, strange. I usually see the notifications from Andrew.
> Also there was no you or Catalin in Cc tags in 2,3 patches, and in the
> first patch, the Cc tags were corrupted:
:/
Andrew -- have we broken your scripts somehow, or is this just a one-off
for these patches?
Thanks,
Will
> From: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Subject: include/linux/linkage.h: align weak symbols
>
> Since WEAK() supposed to be used instead of ENTRY() to define weak
> symbols, but unlike ENTRY() it doesn't have ALIGN directive. It seems
> there is no actual reason to not have, so let's add ALIGN to WEAK() too.
>
> Link: http://lkml.kernel.org/r/20180920135631.23833-1-aryabinin@virtuozzo.com
> Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
> Will Deacon <will.deacon@arm.com>, Catalin Marinas <catalin.marinas@arm.com>
> Cc: Kyeongdon Kim <kyeongdon.kim@lge.com>
> Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> Cc: Alexander Potapenko <glider@google.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Mark Rutland <mark.rutland@arm.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
next prev parent reply other threads:[~2018-10-29 11:30 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 17:05 [PATCH] arm64: lib: use C string functions with KASAN enabled Andrey Ryabinin
2018-09-06 17:05 ` [PATCH] lib/test_kasan: Add tests for several string/memory API functions Andrey Ryabinin
2018-09-07 14:56 ` [PATCH] arm64: lib: use C string functions with KASAN enabled Will Deacon
2018-09-07 15:48 ` Andrey Ryabinin
2018-09-10 11:33 ` Mark Rutland
2018-09-10 12:53 ` Mark Rutland
2018-09-10 13:06 ` Will Deacon
2018-09-11 13:01 ` Andrey Ryabinin
2018-09-14 15:28 ` Will Deacon
2018-09-20 13:56 ` [PATCH v2 1/3] linkage.h: Align weak symbols Andrey Ryabinin
2018-09-20 13:56 ` [PATCH v2 2/3] arm64: lib: use C string functions with KASAN enabled Andrey Ryabinin
2018-10-29 10:29 ` Will Deacon
2018-10-29 11:16 ` Andrey Ryabinin
2018-10-29 11:20 ` Will Deacon [this message]
2018-09-20 13:56 ` [PATCH v2 3/3] lib/test_kasan: Add tests for several string/memory API functions Andrey Ryabinin
2018-10-29 10:29 ` [PATCH v2 1/3] linkage.h: Align weak symbols Will Deacon
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=20181029112034.GE14127@arm.com \
--to=will.deacon@arm.com \
--cc=akpm@linux-foundation.org \
--cc=ard.biesheuvel@linaro.org \
--cc=aryabinin@virtuozzo.com \
--cc=catalin.marinas@arm.com \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=kasan-dev@googlegroups.com \
--cc=kyeongdon.kim@lge.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@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;
as well as URLs for NNTP newsgroup(s).