Re: [PATCH v3 10/14] x86: Update the KASAN non-canonical hook
From: Dave Hansen
Date: Wed Apr 09 2025 - 14:29:46 EST
On 4/9/25 07:34, Maciej Wieczor-Retman wrote:
> Yes, I like it more than just generating the addresses in the parenthesis. What
> do you think about this naming? KASAN prefix and [k/u]addr since it's not really
> the lowest/highest address in the whole LA, just in this KASAN compiler scheme.
> And I changed 1<<56 to 2<<56 so it generates 0xFE00000000000000 instead of
> 0xFF00000000000000.
>
> #define KASAN_HIGHEST_KADDR (void *)0xFFFFFFFFFFFFFFFF
> #define KASAN_LOWEST_KADDR (void *)(KASAN_HIGHEST_KADDR - \
> (2<<56) + 1)
> #define KASAN_HIGHEST_UADDR (void *)0x7FFFFFFFFFFFFFFF
> #define KASAN_LOWEST_UADDR (void *)(KASAN_HIGHEST_UADDR - \
> (2<<56) + 1)
Yes, that is much better.