Re: [RFC PATCH 06/14] khwasan: enable top byte ignore for the kernel

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

 



On Mon, Mar 5, 2018 at 3:29 PM, Mark Rutland <mark.rutland@xxxxxxx> wrote:
> On Fri, Mar 02, 2018 at 08:44:25PM +0100, Andrey Konovalov wrote:
>> +#ifdef CONFIG_KASAN_TAGS
>> +#define TCR_TBI_FLAGS (TCR_TBI0 | TCR_TBI1)
>> +#else
>> +#define TCR_TBI_FLAGS TCR_TBI0
>> +#endif
>
> Rather than pulling TBI0 into this, I think it'd make more sense to
> have:
>
> #ifdef CONFIG_KASAN_TAGS
> #define KASAN_TCR_FLAGS TCR_TBI1
> #else
> #define KASAN_TCR_FLAGS
> #endif
>
>> +
>>  #define MAIR(attr, mt)       ((attr) << ((mt) * 8))
>>
>>  /*
>> @@ -432,7 +438,7 @@ ENTRY(__cpu_setup)
>>        * both user and kernel.
>>        */
>>       ldr     x10, =TCR_TxSZ(VA_BITS) | TCR_CACHE_FLAGS | TCR_SMP_FLAGS | \
>> -                     TCR_TG_FLAGS | TCR_ASID16 | TCR_TBI0 | TCR_A1
>> +                     TCR_TG_FLAGS | TCR_ASID16 | TCR_TBI_FLAGS | TCR_A1
>
> ... and just append KASAN_TCR_FLAGS to the flags here.
>
> That's roughtly what we do with ENDIAN_SET_EL1 for SCTLR_EL1.
>

OK, will do!




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux