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=-9.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 E62C6C433E1 for ; Thu, 27 Aug 2020 10:49:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AE0C8207F7 for ; Thu, 27 Aug 2020 10:49:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uIg6GgM3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AE0C8207F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject: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=qg8M3WlVKLetqssfT70ZRHXtcIc7FPVySCV0lTofg3Y=; b=uIg6GgM3wqjpo9dtrfJl4nKd1 bXetNSZUcMN30dq1VPvP1+uml/i0kYkdGi0t36qdlOYVh0Ot6LyBg9DPz3hY7lFhy7guRDWt5Ex5N nhnCQo9hAd45vVPTQPC7RrxsJnLJYZlkW6sCDmDX8GBFrJOLWcjiWv7NIdIIretSDFkcSfT/Fr6D1 PqDoJn5njN7OJ0c7F/GAqt6Bo2XLPWwgxmsd75CfiNDgeq/xOz7gECV8W33seXWxMFRnnANnBkGya 7D5zlNcgz7awkFQv8t/PA15N2GYJ8BlSdKGGuVcRCHJKkUy9b0H0vuitUJ2FxrsbY7PIpjRUl/hh9 0LEsSQOsA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBFSD-0001IM-O1; Thu, 27 Aug 2020 10:48:25 +0000 Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kBFSA-0001H3-8d for linux-arm-kernel@lists.infradead.org; Thu, 27 Aug 2020 10:48:23 +0000 Received: from gaia (unknown [46.69.195.127]) (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 445F3207F7; Thu, 27 Aug 2020 10:48:19 +0000 (UTC) Date: Thu, 27 Aug 2020 11:48:16 +0100 From: Catalin Marinas To: Andrey Konovalov Subject: Re: [PATCH 32/35] kasan, arm64: print report from tag fault handler Message-ID: <20200827104816.GI29264@gaia> References: <4691d6019ef00c11007787f5190841b47ba576c4.1597425745.git.andreyknvl@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4691d6019ef00c11007787f5190841b47ba576c4.1597425745.git.andreyknvl@google.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-20200827_064822_400816_FE63E48C X-CRM114-Status: GOOD ( 16.08 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arm-kernel@lists.infradead.org, Marco Elver , Elena Petrova , Kevin Brodsky , Will Deacon , Branislav Rankov , kasan-dev@googlegroups.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Alexander Potapenko , Evgenii Stepanov , Andrey Ryabinin , Andrew Morton , Vincenzo Frascino , Dmitry Vyukov 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 Fri, Aug 14, 2020 at 07:27:14PM +0200, Andrey Konovalov wrote: > diff --git a/arch/arm64/mm/fault.c b/arch/arm64/mm/fault.c > index c62c8ba85c0e..cf00b3942564 100644 > --- a/arch/arm64/mm/fault.c > +++ b/arch/arm64/mm/fault.c > @@ -14,6 +14,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -314,11 +315,19 @@ static void report_tag_fault(unsigned long addr, unsigned int esr, > { > bool is_write = ((esr & ESR_ELx_WNR) >> ESR_ELx_WNR_SHIFT) != 0; > > +#ifdef CONFIG_KASAN_HW_TAGS > + /* > + * SAS bits aren't set for all faults reported in EL1, so we can't > + * find out access size. > + */ > + kasan_report(addr, 0, is_write, regs->pc); > +#else > pr_alert("Memory Tagging Extension Fault in %pS\n", (void *)regs->pc); > pr_alert(" %s at address %lx\n", is_write ? "Write" : "Read", addr); > pr_alert(" Pointer tag: [%02x], memory tag: [%02x]\n", > mte_get_ptr_tag(addr), > mte_get_mem_tag((void *)addr)); > +#endif > } More dead code. So what's the point of keeping the pr_alert() introduced earlier? CONFIG_KASAN_HW_TAGS is always on for in-kernel MTE. If MTE is disabled, this function isn't called anyway. -- Catalin _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel