From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E6E78231827; Mon, 1 Sep 2025 16:54:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756745644; cv=none; b=gfGwhoJmMg7pKq53RKhNpsDyUkNJ9S5RBlUZOIKTRobSktB32LTtnrjKc0Q0qaofvFqtgcv3eNvlIeWAm8uPhfYI+unKxnfe3u2D86A5hM1qWN9xX6coU46EygZYf8lAy9n/wkgygdu+74ql1UP18bNOIUhJpZI7Km/S9PcwW+A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1756745644; c=relaxed/simple; bh=Q3LrO/82qmzLGAa+2UmFr9rs46cyemKu9OZyrzJ77d4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QfO8Tm7oKzEN4Q9pUScHzi75eJcAW0Tin3XbxCYgT8kpQFnhcgU4mxzeELEG+zM0sSTdWRn25RMRlvr6Z0bsgSfo9RhcJVjoL+1op8rC1kQVW+gj8Jofh4xxbAUosNRLZr9/1b4BotNUYqlPs2ycFoHsgeX+3z9EJ/wGKzBZlH0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 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> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250901104623.402172-2-yeoreum.yun@arm.com> 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