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 X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF280C4363D for ; Fri, 2 Oct 2020 14:11:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 92225206FA for ; Fri, 2 Oct 2020 14:11:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387999AbgJBOLA (ORCPT ); Fri, 2 Oct 2020 10:11:00 -0400 Received: from mail.kernel.org ([198.145.29.99]:50588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387777AbgJBOLA (ORCPT ); Fri, 2 Oct 2020 10:11:00 -0400 Received: from gaia (unknown [95.149.105.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7543C206DB; Fri, 2 Oct 2020 14:10:57 +0000 (UTC) Date: Fri, 2 Oct 2020 15:10:55 +0100 From: Catalin Marinas To: Andrey Konovalov Cc: Dmitry Vyukov , Vincenzo Frascino , kasan-dev@googlegroups.com, Andrey Ryabinin , Alexander Potapenko , Marco Elver , Evgenii Stepanov , Elena Petrova , Branislav Rankov , Kevin Brodsky , Will Deacon , Andrew Morton , linux-arm-kernel@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 30/39] arm64: kasan: Enable TBI EL1 Message-ID: <20201002141054.GH7034@gaia> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 02, 2020 at 01:10:31AM +0200, Andrey Konovalov wrote: > From: Vincenzo Frascino > > Hardware tag-based KASAN relies on Memory Tagging Extension (MTE) that is > built on top of the Top Byte Ignore (TBI) feature. > > Enable in-kernel TBI when CONFIG_KASAN_HW_TAGS is turned on by enabling > the TCR_TBI1 bit in proc.S. > > Signed-off-by: Vincenzo Frascino > Co-developed-by: Andrey Konovalov > Signed-off-by: Andrey Konovalov > --- > Change-Id: I91944903bc9c9c9044f0d50e74bcd6b9971d21ff > --- > arch/arm64/mm/proc.S | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/mm/proc.S b/arch/arm64/mm/proc.S > index 6c1a6621d769..7c3304fb15d9 100644 > --- a/arch/arm64/mm/proc.S > +++ b/arch/arm64/mm/proc.S > @@ -46,7 +46,7 @@ > #endif > > #ifdef CONFIG_KASAN_HW_TAGS > -#define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 > +#define TCR_KASAN_HW_FLAGS SYS_TCR_EL1_TCMA1 | TCR_TBI1 > #else > #define TCR_KASAN_HW_FLAGS 0 > #endif Please merge this patch with the one one introducing TCR_KASAN_HW_FLAGS, no need to have both around. You can add my Reviewed-by on that one. -- Catalin