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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 86E9CC64EC7 for ; Wed, 1 Mar 2023 00:36:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1E1096B0078; Tue, 28 Feb 2023 19:36:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 191A26B007B; Tue, 28 Feb 2023 19:36:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 059696B007E; Tue, 28 Feb 2023 19:36:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id EBB796B0078 for ; Tue, 28 Feb 2023 19:36:17 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id A37C9AB2D7 for ; Wed, 1 Mar 2023 00:36:17 +0000 (UTC) X-FDA: 80518462794.07.0B4A7C2 Received: from mail-wr1-f42.google.com (mail-wr1-f42.google.com [209.85.221.42]) by imf21.hostedemail.com (Postfix) with ESMTP id BE46C1C0016 for ; Wed, 1 Mar 2023 00:36:15 +0000 (UTC) Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=kYq0xtp1; spf=pass (imf21.hostedemail.com: domain of pcc@google.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=pcc@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1677630975; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=a+LHz6oHstuW8LVb7HnzFGpbNVne+AJV/ef0qI77F2g=; b=DCp0co0pJJ2fRtWileUIdPZJkMjHtpgDL5uTlFh++2bNH6cOGe4oKvQZ722CashCakm2J0 EFkGJ9FYinbGCNTFQ0YjYSKVHOj6mFUrdra749/talkp79umeLHRIkod6eB50D8ypQxtNx rOHE3hSh/Hu8KOoS2obldGxGKNRdG4s= ARC-Authentication-Results: i=1; imf21.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=kYq0xtp1; spf=pass (imf21.hostedemail.com: domain of pcc@google.com designates 209.85.221.42 as permitted sender) smtp.mailfrom=pcc@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1677630975; a=rsa-sha256; cv=none; b=uP2lr6D+8YQuxdotq085ma0NBnV6EQfDLgutqZCOMkPA1PH2EEANnCP9qUtsZysm8TZKvN wtWz/MBzCdkU67WDuycU6A5eAuzA47yYeOp858ezfuCk7CnvfP0GJLqRLtA8C5dgi+z7Y0 sjk+Zo1jylJ7/VJ/eklvrcQATz97lsQ= Received: by mail-wr1-f42.google.com with SMTP id bt28so11574073wrb.8 for ; Tue, 28 Feb 2023 16:36:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; t=1677630974; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=a+LHz6oHstuW8LVb7HnzFGpbNVne+AJV/ef0qI77F2g=; b=kYq0xtp1RfSwXAX/buIf2VC/8T5S45C1A0BdbPY1RUo4aad1gr13qVfuPFC2ZLYToD d0DCGIsa8DBNHLIt5P3kx0964htnjaOtpBlsYG7PALfvHKNYomCsNkusAuqhSYgCd+vp TxCJ1hTgwHJu7ZeZyIbKW5QASw6YUC6Fz/pzvDgqvptPpi+MQ2OuE2G9S+k384Gqa+f9 /BgSYuAdLWwd8yTMU+pM65itLe5JGxWgRs0nAJkkb9sn9WzB6Ww/6rq7H1DFt/F1bkma pEAdEnRMTC+jtNpWZ3T/cwb1HqN5u9pBRl6wa5l4X2WsKBmb3KONCGgs14sgfSe84Tj/ rdSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677630974; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a+LHz6oHstuW8LVb7HnzFGpbNVne+AJV/ef0qI77F2g=; b=SKDtOPz++LmsQuSripxUFHxfYqaB9P3I/H141MB9MqgsVAJ3W2OYRVY44E+5d83eCb g/dJed+QyRS4DQGWgaAUA94JK3r63yOmhvpl7krmyxYtocf5PKZlpM2lQOfh4UNOs2WI msk+MOqMvVlwpJCtaABSh5hpadJX95Q6D06fEG0eW1i4D12pQzlt5eYF8/UjzSUvmQRD eNGwtU3k/i/5RDLQsuAYweP8RIWDKRsFesFUeYePYXH0rCWCNQQFNdAtTkuGEaOg0o6R JS/yzZun3Rcnx8VABs2kc5PWwGRf+Y8Xrg6+d6rCjeFzro822CRQVn1VcilK7FvgK1Pp QuWg== X-Gm-Message-State: AO0yUKVLqdaTKcffqOrn+N5LU8T3LuhWws6XN6SbqEFVqKZMYbdPD+A6 1byD9uE00wG2jtR5EyeJPq55KkTS0lCMd1z+rhsTkg== X-Google-Smtp-Source: AK7set+bQsCzy7/XTqs76n6hsSHnmpz/CNpu+B3RBdr+nY38t27MMq9xl861CNOHLdemFMPoOHF00UzrFCEauF7fHXw= X-Received: by 2002:a5d:42d2:0:b0:2cd:bc79:542c with SMTP id t18-20020a5d42d2000000b002cdbc79542cmr9043wrr.2.1677630973834; Tue, 28 Feb 2023 16:36:13 -0800 (PST) MIME-Version: 1.0 References: <20230228063240.3613139-1-pcc@google.com> <20230228063240.3613139-3-pcc@google.com> In-Reply-To: From: Peter Collingbourne Date: Tue, 28 Feb 2023 16:36:01 -0800 Message-ID: Subject: Re: [PATCH v2 2/2] kasan: remove PG_skip_kasan_poison flag To: Andrey Konovalov Cc: catalin.marinas@arm.com, linux-mm@kvack.org, kasan-dev@googlegroups.com, ryabinin.a.a@gmail.com, linux-arm-kernel@lists.infradead.org, vincenzo.frascino@arm.com, will@kernel.org, eugenis@google.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspam-User: X-Rspamd-Server: rspam03 X-Stat-Signature: estews6c8dj8nqw14w3c777i3pr947wh X-Rspamd-Queue-Id: BE46C1C0016 X-HE-Tag: 1677630975-725 X-HE-Meta: U2FsdGVkX19tg3XJmq7B564CIA9h/F/QhmknQvqKD4drggoCpaveJRauL7M9LMEOe0b2gzIB/TzifWbJIg4T+9liW/TGhAwDOaH/EQf9k4nCo2B7y4dG6MNYk/rmYrHmKwyIJ0mrvMmoCy/SJq+8TzEVYbfLPumts7DZFi51SwACDogd5SBsfDxLum0TPo7rPcgBoyM34u46TVOHEVXaOOuchaygQH+1lG9ZpYH3ag4lNdMLIguLwLBnzyumh53d9Npi1wAO0zqpR56awwCnIkeH2WoR8fN25kiRRKxN+e1uZ/F3timJkaZpsM9PrOnjWD3CDk1agiRS9L959LYgzsdqQW29jnGDuLKtx3wWwaNEX6mujL2DYSwckdruuSnvAducC8reuzzUYPSD4qWWsNrYaujGo3ZxX8htZ7ek7lC2rrM8qkmpUN4D1PAwunpYWSVuepf17hvMXEaB8DeMyPrgxMf+gxi8FbUOreqLSSbKzsnTO7S4mDZqPKDHvyRlpcqAcidxFfsOh4hfy4vjQfpiG7fQLsDbdTlc6HOeWtcvhL502xbPZpDHcWiBwnYjOkpGsbtxcRDLlBkxB630OL8l/7plrlpqlK5cdZzTdKKPSYSlEypIZYS0M3FLvoZC7LNHX5V6cgS+ESga7jA+ZoSyeV0BToMVXByIVvL+68Lztqsx/9474dWO8k7m2FrpO4KjL/5P9vchnceVuFoShGnWSXn5T9fr/xEk+/wa8n6bzVk9TLtnLEiZWwPI8i3PGFdkGflsRMXMWoxthJClkZm78HA4wPnwEuK8EjRIUcXJYvqGvFyqtgD/RopoWkSU90FfSKjw1lUooCFAk2t4ASrIhpyPWbarRYag67p5xcziigmTC6/ZJtRlJ7ioDSidy/k7eTaP6t3zt7QQTsnFlDlefEK9C9jF21NGWvtNRSQgB6Vw9x+eLSv/3TlVjVbHOpwCJVt0S1EUOEpZmPL Y8UDJl36 ooi5tnog/mTaHxTuc7+bmPizSREM/gAKcOeB1URGSEd1kvTqdVmLoXDLqybCNi8OAGHqHMsYMB5ix50HTC7+Bui7dNh0hbmqZQOUheCLfE8eLVKJSSWYkLhNTgTnGHKVAZ3W7fJDg8ZK4QrVE+7F0Dz46kJKoVIBktV1hJjBTNazwPBNS1VAemjYWOEyZtC5rdVg98bzyVkPM263OP2q71J30H5SAPh8sAQee2ircwxAW6xKa3nfDRYnDT7qJxtl/IKjn5DZjLumoum8ogmT2fRH67QLcAO56GRR/CGJ1tVGkmSu4CXd4vyBJQ1Qmw07etkSoLG+sitcvSfLbh14eP2TCZ8qOoEYr6EMTcL2qwZloaHM7uGnKWDUU3PEnO7KpL/QMcOgI3DrziFpIqvyuBfHiO9E7wvRV0yVEC3TdXUnwWAOByO0b4Fh5KdVtJI2UJqc7u8uwOKqaMuub4KmSgyyezw== 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 Tue, Feb 28, 2023 at 12:48=E2=80=AFPM Andrey Konovalov wrote: > > On Tue, Feb 28, 2023 at 7:32=E2=80=AFAM Peter Collingbourne wrote: > > > > Code inspection reveals that PG_skip_kasan_poison is redundant with > > kasantag, because the former is intended to be set iff the latter is > > the match-all tag. It can also be observed that it's basically pointles= s > > to poison pages which have kasantag=3D0, because any pages with this ta= g > > would have been pointed to by pointers with match-all tags, so poisonin= g > > the pages would have little to no effect in terms of bug detection. > > Therefore, change the condition in should_skip_kasan_poison() to check > > kasantag instead, and remove PG_skip_kasan_poison and associated flags. > > > > Signed-off-by: Peter Collingbourne > > Link: https://linux-review.googlesource.com/id/I57f825f2eaeaf7e8389d6cf= 4597c8a5821359838 > > --- > > v2: > > - also remove GFP_SKIP_KASAN_POISON and FPI_SKIP_KASAN_POISON > > - rename GFP_SKIP_KASAN_UNPOISON to GFP_SKIP_KASAN > > - update comments > > - simplify control flow by removing reset_tags > > > > include/linux/gfp_types.h | 28 +++++------- > > include/linux/page-flags.h | 9 ---- > > include/trace/events/mmflags.h | 12 +----- > > mm/kasan/hw_tags.c | 2 +- > > mm/page_alloc.c | 79 +++++++++++++--------------------- > > mm/vmalloc.c | 2 +- > > 6 files changed, 44 insertions(+), 88 deletions(-) > > > > diff --git a/include/linux/gfp_types.h b/include/linux/gfp_types.h > > index 5088637fe5c2..9bd45cdd19ac 100644 > > --- a/include/linux/gfp_types.h > > +++ b/include/linux/gfp_types.h > > @@ -47,16 +47,14 @@ typedef unsigned int __bitwise gfp_t; > > #define ___GFP_ACCOUNT 0x400000u > > #define ___GFP_ZEROTAGS 0x800000u > > #ifdef CONFIG_KASAN_HW_TAGS > > -#define ___GFP_SKIP_ZERO 0x1000000u > > -#define ___GFP_SKIP_KASAN_UNPOISON 0x2000000u > > -#define ___GFP_SKIP_KASAN_POISON 0x4000000u > > +#define ___GFP_SKIP_ZERO 0x1000000u > > +#define ___GFP_SKIP_KASAN 0x2000000u > > #else > > -#define ___GFP_SKIP_ZERO 0 > > -#define ___GFP_SKIP_KASAN_UNPOISON 0 > > -#define ___GFP_SKIP_KASAN_POISON 0 > > +#define ___GFP_SKIP_ZERO 0 > > +#define ___GFP_SKIP_KASAN 0 > > #endif > > #ifdef CONFIG_LOCKDEP > > -#define ___GFP_NOLOCKDEP 0x8000000u > > +#define ___GFP_NOLOCKDEP 0x4000000u > > #else > > #define ___GFP_NOLOCKDEP 0 > > #endif > > @@ -234,25 +232,22 @@ typedef unsigned int __bitwise gfp_t; > > * memory tags at the same time as zeroing memory has minimal addition= al > > * performace impact. > > * > > - * %__GFP_SKIP_KASAN_UNPOISON makes KASAN skip unpoisoning on page all= ocation. > > - * Only effective in HW_TAGS mode. > > - * > > - * %__GFP_SKIP_KASAN_POISON makes KASAN skip poisoning on page dealloc= ation. > > - * Typically, used for userspace pages. Only effective in HW_TAGS mode= . > > + * %__GFP_SKIP_KASAN makes KASAN skip unpoisoning on page allocation a= nd > > + * poisoning on page deallocation. Typically used for userspace and vm= alloc > > + * pages. Only effective in HW_TAGS mode. > > This is not entirely correct: for vmalloc pages, this flag doesn't > result in poisoning being skipped, as the memory is unpoisoned and > page tags are assigned by kasan_unpoison_vmalloc. I see. I somehow missed that vmalloc was setting the tag itself. > How about something like this: > > %__GFP_SKIP_KASAN makes KASAN skip unpoisoning on page allocation. > Used for userspace and vmalloc pages; the latter are unpoisoned by > kasan_unpoison_vmalloc instead. For userspace pages, results in > poisoning being skipped as well, see should_skip_kasan_poison for > details. Only effective in HW_TAGS mode. Yes, that sounds reasonable. Done in v3. > > */ > > #define __GFP_NOWARN ((__force gfp_t)___GFP_NOWARN) > > #define __GFP_COMP ((__force gfp_t)___GFP_COMP) > > #define __GFP_ZERO ((__force gfp_t)___GFP_ZERO) > > #define __GFP_ZEROTAGS ((__force gfp_t)___GFP_ZEROTAGS) > > #define __GFP_SKIP_ZERO ((__force gfp_t)___GFP_SKIP_ZERO) > > -#define __GFP_SKIP_KASAN_UNPOISON ((__force gfp_t)___GFP_SKIP_KASAN_UN= POISON) > > -#define __GFP_SKIP_KASAN_POISON ((__force gfp_t)___GFP_SKIP_KASAN_PO= ISON) > > +#define __GFP_SKIP_KASAN ((__force gfp_t)___GFP_SKIP_KASAN) > > > > /* Disable lockdep for GFP context tracking */ > > #define __GFP_NOLOCKDEP ((__force gfp_t)___GFP_NOLOCKDEP) > > > > /* Room for N __GFP_FOO bits */ > > -#define __GFP_BITS_SHIFT (27 + IS_ENABLED(CONFIG_LOCKDEP)) > > +#define __GFP_BITS_SHIFT (26 + IS_ENABLED(CONFIG_LOCKDEP)) > > #define __GFP_BITS_MASK ((__force gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) > > > > /** > > @@ -335,8 +330,7 @@ typedef unsigned int __bitwise gfp_t; > > #define GFP_DMA __GFP_DMA > > #define GFP_DMA32 __GFP_DMA32 > > #define GFP_HIGHUSER (GFP_USER | __GFP_HIGHMEM) > > -#define GFP_HIGHUSER_MOVABLE (GFP_HIGHUSER | __GFP_MOVABLE | \ > > - __GFP_SKIP_KASAN_POISON | __GFP_SKIP_KASAN_UNP= OISON) > > +#define GFP_HIGHUSER_MOVABLE (GFP_HIGHUSER | __GFP_MOVABLE | __GFP_S= KIP_KASAN) > > #define GFP_TRANSHUGE_LIGHT ((GFP_HIGHUSER_MOVABLE | __GFP_COMP | \ > > __GFP_NOMEMALLOC | __GFP_NOWARN) & ~__GFP_RECL= AIM) > > #define GFP_TRANSHUGE (GFP_TRANSHUGE_LIGHT | __GFP_DIRECT_RECLAIM) > > diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h > > index a7e3a3405520..74f81a52e7e1 100644 > > --- a/include/linux/page-flags.h > > +++ b/include/linux/page-flags.h > > @@ -135,9 +135,6 @@ enum pageflags { > > #ifdef CONFIG_ARCH_USES_PG_ARCH_X > > PG_arch_2, > > PG_arch_3, > > -#endif > > -#ifdef CONFIG_KASAN_HW_TAGS > > - PG_skip_kasan_poison, > > #endif > > __NR_PAGEFLAGS, > > > > @@ -594,12 +591,6 @@ TESTCLEARFLAG(Young, young, PF_ANY) > > PAGEFLAG(Idle, idle, PF_ANY) > > #endif > > > > -#ifdef CONFIG_KASAN_HW_TAGS > > -PAGEFLAG(SkipKASanPoison, skip_kasan_poison, PF_HEAD) > > -#else > > -PAGEFLAG_FALSE(SkipKASanPoison, skip_kasan_poison) > > -#endif > > - > > /* > > * PageReported() is used to track reported free pages within the Budd= y > > * allocator. We can use the non-atomic version of the test and set > > diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmfl= ags.h > > index 9db52bc4ce19..232bc8efc98e 100644 > > --- a/include/trace/events/mmflags.h > > +++ b/include/trace/events/mmflags.h > > @@ -55,8 +55,7 @@ > > #ifdef CONFIG_KASAN_HW_TAGS > > #define __def_gfpflag_names_kasan , \ > > gfpflag_string(__GFP_SKIP_ZERO), \ > > - gfpflag_string(__GFP_SKIP_KASAN_POISON), \ > > - gfpflag_string(__GFP_SKIP_KASAN_UNPOISON) > > + gfpflag_string(__GFP_SKIP_KASAN) > > #else > > #define __def_gfpflag_names_kasan > > #endif > > @@ -96,12 +95,6 @@ > > #define IF_HAVE_PG_ARCH_X(flag,string) > > #endif > > > > -#ifdef CONFIG_KASAN_HW_TAGS > > -#define IF_HAVE_PG_SKIP_KASAN_POISON(flag,string) ,{1UL << flag, strin= g} > > -#else > > -#define IF_HAVE_PG_SKIP_KASAN_POISON(flag,string) > > -#endif > > - > > #define __def_pageflag_names = \ > > {1UL << PG_locked, "locked" }, = \ > > {1UL << PG_waiters, "waiters" }, = \ > > @@ -130,8 +123,7 @@ IF_HAVE_PG_HWPOISON(PG_hwpoison, "hwpoison" = ) \ > > IF_HAVE_PG_IDLE(PG_young, "young" ) = \ > > IF_HAVE_PG_IDLE(PG_idle, "idle" ) = \ > > IF_HAVE_PG_ARCH_X(PG_arch_2, "arch_2" ) = \ > > -IF_HAVE_PG_ARCH_X(PG_arch_3, "arch_3" ) = \ > > -IF_HAVE_PG_SKIP_KASAN_POISON(PG_skip_kasan_poison, "skip_kasan_poison"= ) > > +IF_HAVE_PG_ARCH_X(PG_arch_3, "arch_3" ) > > > > #define show_page_flags(flags) = \ > > (flags) ? __print_flags(flags, "|", = \ > > diff --git a/mm/kasan/hw_tags.c b/mm/kasan/hw_tags.c > > index d1bcb0205327..bb4f56e5bdec 100644 > > --- a/mm/kasan/hw_tags.c > > +++ b/mm/kasan/hw_tags.c > > @@ -318,7 +318,7 @@ void *__kasan_unpoison_vmalloc(const void *start, u= nsigned long size, > > * Thus, for VM_ALLOC mappings, hardware tag-based KASAN only t= ags > > * the first virtual mapping, which is created by vmalloc(). > > * Tagging the page_alloc memory backing that vmalloc() allocat= ion is > > - * skipped, see ___GFP_SKIP_KASAN_UNPOISON. > > + * skipped, see ___GFP_SKIP_KASAN. > > * > > * For non-VM_ALLOC allocations, page_alloc memory is tagged as= usual. > > */ > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c > > index 7136c36c5d01..960e0edd413d 100644 > > --- a/mm/page_alloc.c > > +++ b/mm/page_alloc.c > > @@ -112,17 +112,6 @@ typedef int __bitwise fpi_t; > > */ > > #define FPI_TO_TAIL ((__force fpi_t)BIT(1)) > > > > -/* > > - * Don't poison memory with KASAN (only for the tag-based modes). > > - * During boot, all non-reserved memblock memory is exposed to page_al= loc. > > - * Poisoning all that memory lengthens boot time, especially on system= s with > > - * large amount of RAM. This flag is used to skip that poisoning. > > - * This is only done for the tag-based KASAN modes, as those are able = to > > - * detect memory corruptions with the memory tags assigned by default. > > - * All memory allocated normally after boot gets poisoned as usual. > > - */ > > -#define FPI_SKIP_KASAN_POISON ((__force fpi_t)BIT(2)) > > - > > /* prevent >1 _updater_ of zone percpu pageset ->high and ->batch fiel= ds */ > > static DEFINE_MUTEX(pcp_batch_high_lock); > > #define MIN_PERCPU_PAGELIST_HIGH_FRACTION (8) > > @@ -1355,13 +1344,19 @@ static int free_tail_pages_check(struct page *h= ead_page, struct page *page) > > /* > > * Skip KASAN memory poisoning when either: > > * > > - * 1. Deferred memory initialization has not yet completed, > > - * see the explanation below. > > - * 2. Skipping poisoning is requested via FPI_SKIP_KASAN_POISON, > > - * see the comment next to it. > > - * 3. Skipping poisoning is requested via __GFP_SKIP_KASAN_POISON, > > + * 1. For generic KASAN: deferred memory initialization has not yet co= mpleted. > > + * Tag-based KASAN modes skip pages freed via deferred memory initi= alization > > + * using page tags instead (see below). > > + * 2. For tag-based KASAN: the page has a match-all KASAN tag, indicat= ing > > For tag-based KASAN modes: ... Done in v3. > > + * that error detection is disabled for accesses via the page addre= ss. > > + * > > + * Pages will have match-all tags in the following circumstances: > > + * > > + * 1. Skipping poisoning is requested via __GFP_SKIP_KASAN, > > * see the comment next to it. > > According to the vmalloc thing I mentioned above, let's reword this to: > > The allocation was not unpoisoned due to __GFP_SKIP_KASAN, with the > exception of pages unpoisoned by kasan_unpoison_vmalloc. Done in v3. > > - * 4. The allocation is excluded from being checked due to sampling, > > + * 2. Pages are being initialized for the first time, including during= deferred > > + * memory init; see the call to page_kasan_tag_reset in __init_sing= le_page. > > Let's put this item first in the list. > > > + * 3. The allocation is excluded from being checked due to sampling, Done in v3. > "is" -> "was" possibly sounds better with "was" in #1. Done in v3. Peter