From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Rutland <mark.rutland@arm.com>
Cc: will@kernel.org, linux-arm-kernel@lists.infradead.org,
Alexander Potapenko <glider@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>,
Marco Elver <elver@google.com>,
Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH] arm64: fix strlen() with CONFIG_KASAN_HW_TAGS
Date: Mon, 12 Jul 2021 12:38:31 +0100 [thread overview]
Message-ID: <20210712113830.GB1992@arm.com> (raw)
In-Reply-To: <20210712090043.20847-1-mark.rutland@arm.com>
On Mon, Jul 12, 2021 at 10:00:43AM +0100, Mark Rutland wrote:
> diff --git a/arch/arm64/lib/strlen.S b/arch/arm64/lib/strlen.S
> index 35fbdb7d6e1a..1648790e91b3 100644
> --- a/arch/arm64/lib/strlen.S
> +++ b/arch/arm64/lib/strlen.S
> @@ -8,6 +8,7 @@
>
> #include <linux/linkage.h>
> #include <asm/assembler.h>
> +#include <asm/mte-def.h>
>
> /* Assumptions:
> *
> @@ -42,7 +43,16 @@
> #define REP8_7f 0x7f7f7f7f7f7f7f7f
> #define REP8_80 0x8080808080808080
>
> +/*
> + * When KASAN_HW_TAGS is in use, memory is checked at MTE_GRANULE_SIZE
> + * (16-byte) granularity, and we must ensure that no access straddles this
> + * alignment boundary.
> + */
> +#ifdef CONFIG_KASAN_HW_TAGS
> +#define MIN_PAGE_SIZE MTE_GRANULE_SIZE
> +#else
> #define MIN_PAGE_SIZE 4096
> +#endif
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-07-12 11:40 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-12 9:00 [PATCH] arm64: fix strlen() with CONFIG_KASAN_HW_TAGS Mark Rutland
2021-07-12 9:24 ` Marco Elver
2021-07-12 11:19 ` Catalin Marinas
2021-07-12 14:03 ` Mark Rutland
2021-07-12 14:23 ` Robin Murphy
2021-07-12 11:38 ` Catalin Marinas [this message]
2021-07-12 12:27 ` Robin Murphy
2021-07-12 12:50 ` Will Deacon
2021-07-13 18:04 ` Andrey Konovalov
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=20210712113830.GB1992@arm.com \
--to=catalin.marinas@arm.com \
--cc=andreyknvl@gmail.com \
--cc=dvyukov@google.com \
--cc=elver@google.com \
--cc=glider@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=robin.murphy@arm.com \
--cc=ryabinin.a.a@gmail.com \
--cc=will@kernel.org \
/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