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=-14.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 092C2C4743C for ; Fri, 4 Jun 2021 17:51:42 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id C8C6961106 for ; Fri, 4 Jun 2021 17:51:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C8C6961106 Authentication-Results: mail.kernel.org; dmarc=fail (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=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=JP+MK6FIHj+IjxJRcsFLd9Y7H678L5LZ9+caTcbGxTI=; b=xsy6Luu8VCud1M V9Ajb95JdJRIWk2uzePFHhhC3Fos+gVaPJ+yOHdz3OQq3xh0rm5Gm2sF3tTC4MgkvfxtyJ6lcdr5Q acY9zWIwJCpQ9izz23vIs8y28hOkvbx3zq5FfapnFi3aYQ6SRVE6TtD/b0mJUpNDfxP8cq2ePJdOP wDcciCC9LN+T5VGHNYWf8/DOO/SF0k0d1GMfdCEtKtevjbCfb2jxtMIZ+Y81oRFuub39OXDTFYEc4 f/tQWo4/H7IyvUVAyVgKF7ka/5ZxJLc77Q75LUJb77sl4rGkYAyaIC9162Z7ji+vZUSpBg7A++lbT J542RKXPzDf4yf03B+zw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lpDxL-00El0I-PJ; Fri, 04 Jun 2021 17:50:03 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lpDxH-00Ekz8-H5 for linux-arm-kernel@lists.infradead.org; Fri, 04 Jun 2021 17:50:01 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 874B71063; Fri, 4 Jun 2021 10:49:53 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.6.137]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 5AD383F73D; Fri, 4 Jun 2021 10:49:52 -0700 (PDT) Date: Fri, 4 Jun 2021 18:49:50 +0100 From: Mark Rutland To: Will Deacon Cc: linux-arm-kernel@lists.infradead.org, catalin.marinas@arm.com, james.morse@arm.com, joey.gouly@arm.com, maz@kernel.org Subject: Re: [PATCH v3 19/20] arm64: entry: don't instrument entry code with KCOV Message-ID: <20210604174950.GD73426@C02TD0UTHF1T.local> References: <20210525183302.56293-1-mark.rutland@arm.com> <20210525183302.56293-20-mark.rutland@arm.com> <20210604171628.GE3416@willie-the-truck> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210604171628.GE3416@willie-the-truck> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210604_104959_679716_A10BAF3B X-CRM114-Status: GOOD ( 22.21 ) 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 Fri, Jun 04, 2021 at 06:16:28PM +0100, Will Deacon wrote: > On Tue, May 25, 2021 at 07:33:01PM +0100, Mark Rutland wrote: > > The code in entry-common.c runs at exception entry and return > > boundaries, where portions of the kernel environment aren't available. > > For example, RCU may not be watching, and lockdep state may be > > out-of-sync with the hardware. Due to this, it is not sound to > > instrument this code. > > > > We generally avoid instrumentation by marking the entry functions as > > `noinstr`, but currently this doesn't inhibit KCOV instrumentation. > > Prevent this by disabling KCOV for the entire compilation unit. > > > > Signed-off-by: Mark Rutland > > Cc: Catalin Marinas > > Cc: James Morse > > Cc: Marc Zyngier > > Cc: Will Deacon > > --- > > arch/arm64/kernel/Makefile | 2 ++ > > 1 file changed, 2 insertions(+) > > > > diff --git a/arch/arm64/kernel/Makefile b/arch/arm64/kernel/Makefile > > index 6cc97730790e..294063032428 100644 > > --- a/arch/arm64/kernel/Makefile > > +++ b/arch/arm64/kernel/Makefile > > @@ -14,6 +14,8 @@ CFLAGS_REMOVE_return_address.o = $(CC_FLAGS_FTRACE) > > CFLAGS_REMOVE_syscall.o = -fstack-protector -fstack-protector-strong > > CFLAGS_syscall.o += -fno-stack-protector > > Can you stick a comment here please? Just summarising what you have in the > commit message would be handy. Sure; I've added: # It's not safe to invoke KCOV when portions of the kernel environment aren't # available or are out-of-sync with HW state. Since `noinstr` doesn't always # inhibit KCOV instrumentation, disable it for the entire compilation unit. ... since that will also cover the idle.o case in the next patch. Thanks, Mark. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel