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 7549DC433FE for ; Mon, 7 Nov 2022 15:20:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KyEKM21GF1fw63DGUg0JVQIdGJ6ixIf91Pu7eZ18ur4=; b=P+rluDp6L6UJJg U2OzOYgUABmfG8sBZ4/9LaXXE+c6E+O8pH+0jWOv+MJMWtnl5wtqir0Vbs6CQ4ijumTQWc2WRjyaI S1HppuQ0auAEjEGrKMvN73UDuKZpxtCIM1Dzi0ddGbGDsuoor+Uw8rNg8HUpgti5l2/t81GnNNwR1 ng9X9/MkTqyN8A+H2EwYnqk9vJ19yiuMfwmcl6HUPLy08ZaKDg3sdfdhn9yYGb+cSmYmaWkBy2MyQ ypDjqHZmEbV1frA2Vm3DrXBMMKPL9tzgSxRTDtj9OwjGnWUA4eX+p4sDWuQmu+NYUqduNdL8q6yZ2 CqqI3UbPunOCoV1YRtCA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1os3uX-00Fi25-4x; Mon, 07 Nov 2022 15:19:41 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1os3uT-00Fhwk-UW for linux-arm-kernel@lists.infradead.org; Mon, 07 Nov 2022 15:19:39 +0000 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 ams.source.kernel.org (Postfix) with ESMTPS id 77F91B812A2; Mon, 7 Nov 2022 15:19:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17879C433C1; Mon, 7 Nov 2022 15:19:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1667834375; bh=NwsEDPislMlr5qAw4s2tyK4jOd4n3+iAr26wewpmChY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=l2EcSwCDsuVTAF21jzZyyvSAOkaFo2MMZ5TLHFijd9fl6LuknY+iOwde6fi+KQ6pp 30S9w2uKaRIw+IKbP73hlj1GN1G4O/zc5iUjRXD+uIGf63P3FrKXRxEoN/4S1Iudx0 vE2xqStmHLj+C8661XlmeVcseCY/Ia7eCnDzH4i5rTylOLz4TJQb7Qaq6Jh7nu5V6u 6ZITmd3fjMR71u/h9G47VPO/w/4taBfbgFLQyIuO55G+NqJ/N0FpBPk//BtesCl/IR pI4EtvQ8qdjVHjts74YenVuI7SdFFO34UYRH8qZodZdP7b8SMHzK02Z4Zm+FUjoyja +QhX/QOq3YxBg== Date: Mon, 7 Nov 2022 15:19:30 +0000 From: Will Deacon To: Vincenzo Frascino Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, Catalin Marinas Subject: Re: [PATCH v2] mte: Initialize tag storage to KASAN_TAG_INVALID Message-ID: <20221107151929.GB21002@willie-the-truck> References: <20220907110015.11489-1-vincenzo.frascino@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220907110015.11489-1-vincenzo.frascino@arm.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221107_071938_152251_02FE3840 X-CRM114-Status: GOOD ( 21.33 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Sep 07, 2022 at 12:00:15PM +0100, Vincenzo Frascino wrote: > When the kernel is entered on aarch64, the MTE allocation tags are in an > UNKNOWN state. > > With MTE enabled, the tags are initialized: > - When a page is allocated and the user maps it with PROT_MTE. > - On allocation, with in-kernel MTE enabled (HW_TAGS KASAN). > > If the tag pool is zeroed by the hardware at reset, it makes it > difficult to track potential places where the initialization of the > tags was missed. > > This can be observed under QEMU for aarch64, which initializes the MTE > allocation tags to zero. > > Initialize to tag storage to KASAN_TAG_INVALID to catch potential > places where the initialization of the tags was missed. > > This is done introducing a new kernel command line parameter > "mte.tags_init" that enables the debug option. > > Note: The proposed solution should be considered a debug option because > it might have performance impact on large machines at boot. > > Cc: Catalin Marinas > Cc: Will Deacon > Signed-off-by: Vincenzo Frascino > --- > arch/arm64/kernel/mte.c | 47 +++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) I don't really see the point in this change -- who is going to use this option? Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel