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 Fri, Mar 02, 2018 at 08:44:25PM +0100, Andrey Konovalov wrote:
> KHWASAN uses the Top Byte Ignore feature of arm64 CPUs to store a pointer
> tag in the top byte of each pointer. This commit enables the TCR_TBI1 bit,
> which enables Top Byte Ignore for the kernel, when KHWASAN is used.
> ---
>  arch/arm64/include/asm/pgtable-hwdef.h | 1 +
>  arch/arm64/mm/proc.S                   | 8 +++++++-
>  2 files changed, 8 insertions(+), 1 deletion(-)

Before it's safe to do this, I also think you'll need to fix up at
least:

* virt_to_phys()

* access_ok()

... and potentially others which assume that bits [63:56] of kernel
addresses are 0xff. For example, bits of the fault handling logic might
need fixups.

Thanks,
Mark.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[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