From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-24.8 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1,USER_IN_DEF_DKIM_WL autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6D2C7C43381 for ; Fri, 12 Mar 2021 15:09:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 16A3964FDC for ; Fri, 12 Mar 2021 15:09:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 16A3964FDC Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A831E6B0072; Fri, 12 Mar 2021 10:09:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A58F16B0073; Fri, 12 Mar 2021 10:09:57 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8FBAE6B0074; Fri, 12 Mar 2021 10:09:57 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0249.hostedemail.com [216.40.44.249]) by kanga.kvack.org (Postfix) with ESMTP id 73BE96B0072 for ; Fri, 12 Mar 2021 10:09:57 -0500 (EST) Received: from smtpin16.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 343118248D7C for ; Fri, 12 Mar 2021 15:09:57 +0000 (UTC) X-FDA: 77911557234.16.87CC3FD Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by imf27.hostedemail.com (Postfix) with ESMTP id 5DABE801A823 for ; Fri, 12 Mar 2021 15:09:44 +0000 (UTC) Received: by mail-wr1-f54.google.com with SMTP id v15so5004240wrx.4 for ; Fri, 12 Mar 2021 07:09:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=8Z7mWKRFjAgMHFPpQ+htbK5SeLG117LB/ZqDOLBkzko=; b=GN9pLSpi3YCNTpgANO+7rX766QSIhZiETPjIHdAcvhw2o3kkA0lkQByD9RxfwKGBYD JlysH6HcLqwf7YVC1tjBR3+rT41+pvKS/csFuswhwrLe95DRcbCO2iS7DSy6k9ULJKOP anA1AxHBgJc2RhS2a6bHqeCCqbuAaKf9E8TpserEPhaDO0QOmjUvDswQMS1CspoDzlmR HNp76MfvTanTS1gRVNnlTv7XzcwLLZmIZfEgGnyxkb4lssd1rrrWAvryfHGYFn4CW3nr ojAsOdkbYRI3noTd1byVW0gEgKy+Da8b30axgPTDlh3MftY14U2YGDOGihqEYT5G6KFn YXKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=8Z7mWKRFjAgMHFPpQ+htbK5SeLG117LB/ZqDOLBkzko=; b=BvQpf9d9MmvsF3J7q3ld+pnOehvCLkqJf38XAY/rOk0mGyvuxe0HnPvlAhk/QhToT7 E8Utrl/RkYmd/ECp7aKJr1B/4hC58C99vfKW1zZPbXTZqZjdpKOAg0Xih3pW/lgouQsX h5NNFYEMwD/roLp+iPl7WBvwA5/ESg8HcxpGaowj5axJoUjb/yhmlQpLDYMD7C5/ghgj 6TNPS9XG8HOQsPdnoPk6TnE1zy8lx8LXXe8zm75MG+x5cYf1pfNSYOsrr/vRRiimDWOy oyeRHjJkjr8mX1F0Gr6O9cogBpLeUSmX78vrFVcgsOhumtt94Ecjr/wP18Z7edrG5k/Y yYJg== X-Gm-Message-State: AOAM530W4N7rZ5TBKsfdS2Z813OAIr8nhiWdMsbGgkqNRZBl5jFYfrkZ TOe1KqO7FenHupGWET5+Y/nV1w== X-Google-Smtp-Source: ABdhPJwJjQjJst3vjmz6Ah0vBzklDd8fCYc12y27KinnLTgrEUUIYdqNTtTtdBhKe5YU8SrCqOqY0g== X-Received: by 2002:a5d:6049:: with SMTP id j9mr14291212wrt.117.1615561783490; Fri, 12 Mar 2021 07:09:43 -0800 (PST) Received: from elver.google.com ([2a00:79e0:15:13:d5de:d45f:f79c:cb62]) by smtp.gmail.com with ESMTPSA id e8sm2374802wme.14.2021.03.12.07.09.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Mar 2021 07:09:42 -0800 (PST) Date: Fri, 12 Mar 2021 16:09:37 +0100 From: Marco Elver To: Andrey Konovalov Cc: Andrew Morton , Alexander Potapenko , Andrey Ryabinin , Dmitry Vyukov , kasan-dev@googlegroups.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 08/11] kasan: docs: update HW_TAGS implementation details section Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) X-Stat-Signature: ig361ccr6oam4tryhs3pujcq1tih66h3 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 5DABE801A823 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf27; identity=mailfrom; envelope-from=""; helo=mail-wr1-f54.google.com; client-ip=209.85.221.54 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615561784-639189 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Fri, Mar 12, 2021 at 03:24PM +0100, Andrey Konovalov wrote: > Update the "Implementation details" section for HW_TAGS KASAN: > > - Punctuation, readability, and other minor clean-ups. > > Signed-off-by: Andrey Konovalov Reviewed-by: Marco Elver > --- > Documentation/dev-tools/kasan.rst | 26 +++++++++++++------------- > 1 file changed, 13 insertions(+), 13 deletions(-) > > diff --git a/Documentation/dev-tools/kasan.rst b/Documentation/dev-tools/kasan.rst > index 5873d80cc1fd..2744ae6347c6 100644 > --- a/Documentation/dev-tools/kasan.rst > +++ b/Documentation/dev-tools/kasan.rst > @@ -270,35 +270,35 @@ memory. > Hardware tag-based KASAN > ~~~~~~~~~~~~~~~~~~~~~~~~ > > -Hardware tag-based KASAN is similar to the software mode in concept, but uses > +Hardware tag-based KASAN is similar to the software mode in concept but uses > hardware memory tagging support instead of compiler instrumentation and > shadow memory. > > Hardware tag-based KASAN is currently only implemented for arm64 architecture > and based on both arm64 Memory Tagging Extension (MTE) introduced in ARMv8.5 > -Instruction Set Architecture, and Top Byte Ignore (TBI). > +Instruction Set Architecture and Top Byte Ignore (TBI). > > Special arm64 instructions are used to assign memory tags for each allocation. > Same tags are assigned to pointers to those allocations. On every memory > -access, hardware makes sure that tag of the memory that is being accessed is > -equal to tag of the pointer that is used to access this memory. In case of a > -tag mismatch a fault is generated and a report is printed. > +access, hardware makes sure that the tag of the memory that is being accessed is > +equal to the tag of the pointer that is used to access this memory. In case of a > +tag mismatch, a fault is generated, and a report is printed. > > Hardware tag-based KASAN uses 0xFF as a match-all pointer tag (accesses through > -pointers with 0xFF pointer tag aren't checked). The value 0xFE is currently > +pointers with the 0xFF pointer tag are not checked). The value 0xFE is currently > reserved to tag freed memory regions. > > -Hardware tag-based KASAN currently only supports tagging of > -kmem_cache_alloc/kmalloc and page_alloc memory. > +Hardware tag-based KASAN currently only supports tagging of slab and page_alloc > +memory. > > -If the hardware doesn't support MTE (pre ARMv8.5), hardware tag-based KASAN > -won't be enabled. In this case all boot parameters are ignored. > +If the hardware does not support MTE (pre ARMv8.5), hardware tag-based KASAN > +will not be enabled. In this case, all KASAN boot parameters are ignored. > > -Note, that enabling CONFIG_KASAN_HW_TAGS always results in in-kernel TBI being > -enabled. Even when kasan.mode=off is provided, or when the hardware doesn't > +Note that enabling CONFIG_KASAN_HW_TAGS always results in in-kernel TBI being > +enabled. Even when ``kasan.mode=off`` is provided or when the hardware does not > support MTE (but supports TBI). > > -Hardware tag-based KASAN only reports the first found bug. After that MTE tag > +Hardware tag-based KASAN only reports the first found bug. After that, MTE tag > checking gets disabled. > > Shadow memory > -- > 2.31.0.rc2.261.g7f71774620-goog >