lkml.org 
[lkml]   [2020]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH mm v10 26/42] arm64: mte: Reset the page tag in page->flags
On Fri, Nov 13, 2020 at 11:15:54PM +0100, Andrey Konovalov wrote:
> From: Vincenzo Frascino <vincenzo.frascino@arm.com>
>
> The hardware tag-based KASAN for compatibility with the other modes
> stores the tag associated to a page in page->flags.
> Due to this the kernel faults on access when it allocates a page with an
> initial tag and the user changes the tags.
>
> Reset the tag associated by the kernel to a page in all the meaningful
> places to prevent kernel faults on access.
>
> Note: An alternative to this approach could be to modify page_to_virt().
> This though could end up being racy, in fact if a CPU checks the
> PG_mte_tagged bit and decides that the page is not tagged but another
> CPU maps the same with PROT_MTE and becomes tagged the subsequent kernel
> access would fail.
>
> Signed-off-by: Vincenzo Frascino <vincenzo.frascino@arm.com>
> Signed-off-by: Andrey Konovalov <andreyknvl@google.com>

Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>

\
 
 \ /
  Last update: 2020-11-14 13:46    [W:0.203 / U:2.880 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site