From: Greg KH <gregkh@linuxfoundation.org>
To: Amit Pundir <amit.pundir@linaro.org>
Cc: Stable <stable@vger.kernel.org>, Arnd Bergmann <arnd@arndb.de>,
Alexander Potapenko <glider@google.com>,
Andrey Konovalov <andreyknvl@gmail.com>,
Andrey Ryabinin <ryabinin.a.a@gmail.com>,
Dmitry Vyukov <dvyukov@google.com>,
Haibo Li <haibo.li@mediatek.com>,
Kees Cook <keescook@chromium.org>,
Vincenzo Frascino <vincenzo.frascino@arm.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Matthias Brugger <matthias.bgg@gmail.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH for-5.15.y+] kasan: disable kasan_non_canonical_hook() for HW tags
Date: Wed, 20 Dec 2023 17:07:11 +0100 [thread overview]
Message-ID: <2023122000-climatic-zesty-4d75@gregkh> (raw)
In-Reply-To: <20231219084807.963746-1-amit.pundir@linaro.org>
On Tue, Dec 19, 2023 at 02:18:07PM +0530, Amit Pundir wrote:
> From: Arnd Bergmann <arnd@arndb.de>
>
> [ Upstream commit 17c17567fe510857b18fe01b7a88027600e76ac6 ]
>
> On arm64, building with CONFIG_KASAN_HW_TAGS now causes a compile-time
> error:
>
> mm/kasan/report.c: In function 'kasan_non_canonical_hook':
> mm/kasan/report.c:637:20: error: 'KASAN_SHADOW_OFFSET' undeclared (first use in this function)
> 637 | if (addr < KASAN_SHADOW_OFFSET)
> | ^~~~~~~~~~~~~~~~~~~
> mm/kasan/report.c:637:20: note: each undeclared identifier is reported only once for each function it appears in
> mm/kasan/report.c:640:77: error: expected expression before ';' token
> 640 | orig_addr = (addr - KASAN_SHADOW_OFFSET) << KASAN_SHADOW_SCALE_SHIFT;
>
> This was caused by removing the dependency on CONFIG_KASAN_INLINE that
> used to prevent this from happening. Use the more specific dependency
> on KASAN_SW_TAGS || KASAN_GENERIC to only ignore the function for hwasan
> mode.
>
> Link: https://lkml.kernel.org/r/20231016200925.984439-1-arnd@kernel.org
> Fixes: 12ec6a919b0f ("kasan: print the original fault addr when access invalid shadow")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Cc: Alexander Potapenko <glider@google.com>
> Cc: Andrey Konovalov <andreyknvl@gmail.com>
> Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
> Cc: Dmitry Vyukov <dvyukov@google.com>
> Cc: Haibo Li <haibo.li@mediatek.com>
> Cc: Kees Cook <keescook@chromium.org>
> Cc: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
> ---
> Needed on v6.1.y as well.
Now queued up, thanks.
greg k-h
prev parent reply other threads:[~2023-12-20 16:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-19 8:48 [PATCH for-5.15.y+] kasan: disable kasan_non_canonical_hook() for HW tags Amit Pundir
2023-12-20 16:07 ` Greg KH [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=2023122000-climatic-zesty-4d75@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=amit.pundir@linaro.org \
--cc=andreyknvl@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arnd@arndb.de \
--cc=dvyukov@google.com \
--cc=glider@google.com \
--cc=haibo.li@mediatek.com \
--cc=keescook@chromium.org \
--cc=matthias.bgg@gmail.com \
--cc=ryabinin.a.a@gmail.com \
--cc=stable@vger.kernel.org \
--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