From nobody Sun Apr 5 16:31:10 2026 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A0C283F9F40; Tue, 24 Mar 2026 13:27:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774358826; cv=none; b=auP8tM91owHclwWfCT/e6VzzBOlhfU5ZFmC6keKIlgx796LFSX+ocub69Ik7wmobfjJHa7v7Sv7wWz5mp5b76NwblHs6Yw6l8LchAZ3f0xOlSEt/KFo/Sg7bRg7/OoW+4ipZV8M4G1nMplVqKDutJpTrQXGxLbL+f/OWG0mMblQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774358826; c=relaxed/simple; bh=Ia2GTAN1c3MwIjU4lUJMwHz1mGgU70Racq0g1YjJE6o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IDhDS71cEfYt0G8zkwOmQTmphJW/FGypWrSQFUvy117nGg85zap/xLpqFFWxW5P20HcZekmPgCPnUC0fsvxlKN9+PUvS5udoIRHJuMgZYfuzgTPM1DuT4f23uiGpLQL58PEXlkeEFbvvgEkieZyhmeENUjvn+XFyjpFKAwsRX1A= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b=s5ZzseGR; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.b="s5ZzseGR" Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C0CD6153B; Tue, 24 Mar 2026 06:26:56 -0700 (PDT) Received: from e142334-100.cambridge.arm.com (e142334-100.cambridge.arm.com [10.1.194.63]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 581333FAF5; Tue, 24 Mar 2026 06:26:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=arm.com; s=foss; t=1774358822; bh=Ia2GTAN1c3MwIjU4lUJMwHz1mGgU70Racq0g1YjJE6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=s5ZzseGRA1gs8qALby0g1l4GKGjy1Qp7cx+PS3+ynQOJDMP10D/yyoQ1OHvTRzkxt kjq/61LFc3TC089l2AvWmSO+0nEW0teFeCijTyp1NWeEfoW/1oZeJ9bAuVR0e8ivXY 51xIw/Q8egDHqIZ4MzLOzo4KaZq5vaffyPNhtCrw= From: Muhammad Usama Anjum To: Arnd Bergmann , Ingo Molnar , Peter Zijlstra , Juri Lelli , Vincent Guittot , Dietmar Eggemann , Steven Rostedt , Ben Segall , Mel Gorman , Valentin Schneider , Kees Cook , Andrew Morton , David Hildenbrand , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Uladzislau Rezki , linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Andrey Konovalov , Marco Elver , Vincenzo Frascino , Peter Collingbourne , Catalin Marinas , Will Deacon , Ryan.Roberts@arm.com, david.hildenbrand@arm.com Cc: Muhammad Usama Anjum , Ryan Roberts Subject: [PATCH v2 3/3] mm: skip KASAN tagging for page-allocated page tables Date: Tue, 24 Mar 2026 13:26:29 +0000 Message-ID: <20260324132631.482520-4-usama.anjum@arm.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260324132631.482520-1-usama.anjum@arm.com> References: <20260324132631.482520-1-usama.anjum@arm.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Page tables are always accessed via the linear mapping with a match-all tag, so HW-tag KASAN never checks them. For page-allocated tables (PTEs and PGDs etc), avoid the tag setup and poisoning overhead by using __GFP_SKIP_KASAN. SLUB-backed page tables are unchanged for now. (They aren't widely used and require more SLUB related skip logic. Leave it later.) Reviewed-by: Ryan Roberts Signed-off-by: Muhammad Usama Anjum --- Changes since v1: - Update description to mention SLUB-backed page tables are unchanged --- include/asm-generic/pgalloc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-generic/pgalloc.h b/include/asm-generic/pgalloc.h index 57137d3ac1592..051aa1331051c 100644 --- a/include/asm-generic/pgalloc.h +++ b/include/asm-generic/pgalloc.h @@ -4,7 +4,7 @@ =20 #ifdef CONFIG_MMU =20 -#define GFP_PGTABLE_KERNEL (GFP_KERNEL | __GFP_ZERO) +#define GFP_PGTABLE_KERNEL (GFP_KERNEL | __GFP_ZERO | __GFP_SKIP_KASAN) #define GFP_PGTABLE_USER (GFP_PGTABLE_KERNEL | __GFP_ACCOUNT) =20 /** --=20 2.47.3