Re: [PATCH for-5.15.y+] kasan: disable kasan_non_canonical_hook() for HW tags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 19, 2023 at 02:18:07PM +0530, Amit Pundir wrote:
> From: Arnd Bergmann <arnd@xxxxxxxx>
> 
> [ 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@xxxxxxxxxx
> Fixes: 12ec6a919b0f ("kasan: print the original fault addr when access invalid shadow")
> Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
> Cc: Alexander Potapenko <glider@xxxxxxxxxx>
> Cc: Andrey Konovalov <andreyknvl@xxxxxxxxx>
> Cc: Andrey Ryabinin <ryabinin.a.a@xxxxxxxxx>
> Cc: Dmitry Vyukov <dvyukov@xxxxxxxxxx>
> Cc: Haibo Li <haibo.li@xxxxxxxxxxxx>
> Cc: Kees Cook <keescook@xxxxxxxxxxxx>
> Cc: Vincenzo Frascino <vincenzo.frascino@xxxxxxx>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@xxxxxxxxxxxxx>
> Cc: Matthias Brugger <matthias.bgg@xxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Amit Pundir <amit.pundir@xxxxxxxxxx>
> ---
> Needed on v6.1.y as well.

Now queued up, thanks.

greg k-h




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux