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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D2CC6CA1007 for ; Mon, 1 Sep 2025 23:13:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=lx60aYNhHUxGjmY6Dd9VkBXb3EBDBQjnPwbyMtD9Gzo=; b=ipy7wKULFOaR7qjBiceD1hVZBq Oqu5bDXumxN3/PKYCOaonV6lg/N8GZca/Uv8+RivQdqSvm/47H5uArofVM0EsFS6p86mjPhCMeIPf LUz8YcMVThX/U6yd+rd691iqyFRRy++MRTJzsbtDXS8NUmmNb1sLuiPC6WGS39Bge8Sw5cyGWF0fX U8QokEU/CKttOIKWCh+g4hVrF1fPSJ04H2QKXUPIzGNr0oozXKq4/u5KqBCh19I+AixpptxrOV1UY ft8nnf5tZZr2fwzh209UFWkG+Q/p5S2u5FftZFueMRzvM+IwGqOhzc8qvWk4OFsCeKHKTDQE80/Uh jc+R0pWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1utDht-0000000EFHm-0ivh; Mon, 01 Sep 2025 23:13:01 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1ut7n9-0000000DMTJ-1gjJ for linux-arm-kernel@lists.infradead.org; Mon, 01 Sep 2025 16:54:03 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by tor.source.kernel.org (Postfix) with ESMTP id C9CB0601E2; Mon, 1 Sep 2025 16:54:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6DB8C4CEF0; Mon, 1 Sep 2025 16:53:57 +0000 (UTC) Date: Mon, 1 Sep 2025 17:53:55 +0100 From: Catalin Marinas To: Yeoreum Yun Cc: ryabinin.a.a@gmail.com, glider@google.com, andreyknvl@gmail.com, dvyukov@google.com, vincenzo.frascino@arm.com, corbet@lwn.net, will@kernel.org, akpm@linux-foundation.org, scott@os.amperecomputing.com, jhubbard@nvidia.com, pankaj.gupta@amd.com, leitao@debian.org, kaleshsingh@google.com, maz@kernel.org, broonie@kernel.org, oliver.upton@linux.dev, james.morse@arm.com, ardb@kernel.org, hardevsinh.palaniya@siliconsignals.io, david@redhat.com, yang@os.amperecomputing.com, kasan-dev@googlegroups.com, workflows@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org Subject: Re: [PATCH v6 1/2] kasan/hw-tags: introduce kasan.write_only option Message-ID: References: <20250901104623.402172-1-yeoreum.yun@arm.com> <20250901104623.402172-2-yeoreum.yun@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250901104623.402172-2-yeoreum.yun@arm.com> X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Sep 01, 2025 at 11:46:22AM +0100, Yeoreum Yun wrote: > Since Armv8.9, FEATURE_MTE_STORE_ONLY feature is introduced to restrict > raise of tag check fault on store operation only. > Introcude KASAN write only mode based on this feature. > > KASAN write only mode restricts KASAN checks operation for write only and > omits the checks for fetch/read operations when accessing memory. > So it might be used not only debugging enviroment but also normal > enviroment to check memory safty. > > This features can be controlled with "kasan.write_only" arguments. > When "kasan.write_only=on", KASAN checks write operation only otherwise > KASAN checks all operations. > > This changes the MTE_STORE_ONLY feature as BOOT_CPU_FEATURE like > ARM64_MTE_ASYMM so that makes it initialise in kasan_init_hw_tags() > with other function together. > > Signed-off-by: Yeoreum Yun > Reviewed-by: Andrey Konovalov Reviewed-by: Catalin Marinas