From patchwork Fri Mar 25 01:10:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 12791147 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 C7903C433FE for ; Fri, 25 Mar 2022 01:10:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 539B96B007D; Thu, 24 Mar 2022 21:10:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4E9B68D0008; Thu, 24 Mar 2022 21:10:58 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3B0BE8D0005; Thu, 24 Mar 2022 21:10:58 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 28AAC6B007D for ; Thu, 24 Mar 2022 21:10:58 -0400 (EDT) Received: from smtpin04.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id EE58924DB4 for ; Fri, 25 Mar 2022 01:10:57 +0000 (UTC) X-FDA: 79281129354.04.895B4DF Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf27.hostedemail.com (Postfix) with ESMTP id 6E32740037 for ; Fri, 25 Mar 2022 01:10:57 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DE2D76185F; Fri, 25 Mar 2022 01:10:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3A422C340EE; Fri, 25 Mar 2022 01:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1648170656; bh=u252vAnebGMmDM5cMhiK3nJT8pTYgegMraySfRKOMYg=; h=Date:To:From:In-Reply-To:Subject:From; b=ktpfYTH2XtoSTNqD4UEZDhY1kJxJJ1gpG9sbBduO98RZpicoZgVKFbacySZ5uDNiL CTVLieugjSbPRdpVCife4+/Gh723Pa3ydLOukUbS3NtYrZMCVD6HvVYTI+Vskd04C2 v2+uMjm1+WhA5w9Mj7Jh3/0tIdVs/RV2v9SH1EgA= Date: Thu, 24 Mar 2022 18:10:55 -0700 To: will@kernel.org,vincenzo.frascino@arm.com,ryabinin.a.a@gmail.com,pcc@google.com,mark.rutland@arm.com,glider@google.com,eugenis@google.com,elver@google.com,dvyukov@google.com,catalin.marinas@arm.com,andreyknvl@google.com,akpm@linux-foundation.org,patches@lists.linux.dev,linux-mm@kvack.org,mm-commits@vger.kernel.org,torvalds@linux-foundation.org,akpm@linux-foundation.org From: Andrew Morton In-Reply-To: <20220324180758.96b1ac7e17675d6bc474485e@linux-foundation.org> Subject: [patch 047/114] kasan, vmalloc: drop outdated VM_KASAN comment Message-Id: <20220325011056.3A422C340EE@smtp.kernel.org> X-Rspam-User: Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=ktpfYTH2; spf=pass (imf27.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org; dmarc=none X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 6E32740037 X-Stat-Signature: iihw5r5ctw3r99po5spws5tbm5a4c9ga X-HE-Tag: 1648170657-892046 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: From: Andrey Konovalov Subject: kasan, vmalloc: drop outdated VM_KASAN comment The comment about VM_KASAN in include/linux/vmalloc.c is outdated. VM_KASAN is currently only used to mark vm_areas allocated for kernel modules when CONFIG_KASAN_VMALLOC is disabled. Drop the comment. Link: https://lkml.kernel.org/r/780395afea83a147b3b5acc36cf2e38f7f8479f9.1643047180.git.andreyknvl@google.com Signed-off-by: Andrey Konovalov Reviewed-by: Alexander Potapenko Acked-by: Marco Elver Cc: Andrey Ryabinin Cc: Catalin Marinas Cc: Dmitry Vyukov Cc: Evgenii Stepanov Cc: Mark Rutland Cc: Peter Collingbourne Cc: Vincenzo Frascino Cc: Will Deacon Signed-off-by: Andrew Morton --- include/linux/vmalloc.h | 11 ----------- 1 file changed, 11 deletions(-) --- a/include/linux/vmalloc.h~kasan-vmalloc-drop-outdated-vm_kasan-comment +++ a/include/linux/vmalloc.h @@ -35,17 +35,6 @@ struct notifier_block; /* in notifier.h #define VM_DEFER_KMEMLEAK 0 #endif -/* - * VM_KASAN is used slightly differently depending on CONFIG_KASAN_VMALLOC. - * - * If IS_ENABLED(CONFIG_KASAN_VMALLOC), VM_KASAN is set on a vm_struct after - * shadow memory has been mapped. It's used to handle allocation errors so that - * we don't try to poison shadow on free if it was never allocated. - * - * Otherwise, VM_KASAN is set for kasan_module_alloc() allocations and used to - * determine which allocations need the module shadow freed. - */ - /* bits [20..32] reserved for arch specific ioremap internals */ /*