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=-17.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, USER_AGENT_GIT 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 30128C433ED for ; Wed, 19 May 2021 13:11:24 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 EEDA760FF1 for ; Wed, 19 May 2021 13:11:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EEDA760FF1 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6xGomSbuY51VHvVfHY+SHO9Y9QnIin9Q4m98yQPswIk=; b=jFK1BNfTpvAIDD2TsjWAj072Ok 10zxVyPmqKErzAxG0FGYwtQ2I2he21+QPW3x4sXgI0mQz26bUtd2okZGxF1tDjgyPJ3hkR/F7lnn1 32WNTPWaKFe+Az4MaFPvmOf8lbL00gusGaxhElFNKR6Pz+WvnR8nwDzpSkxIQcyC4XqOVYoREiRcS OGDz+uFijq0m/p+1eO9F6VhblX2UvlYua48h6kD22aj11nqEdPWp81VhAa4twkKdsFUvie3gH4yCv 3XB4WgWzj8mpTJmZFh72ExKB4zJjJkACUr5Rsw5hq/92Vr6JZeXRmrHW2J/Ujn0BPnz2Er240VygQ Ux2878dQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljLx4-0042pS-7o; Wed, 19 May 2021 13:09:30 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1ljLW5-003wXs-TO for linux-arm-kernel@desiato.infradead.org; Wed, 19 May 2021 12:41:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description; bh=y0tf9TLbVJd+uzETnUJD5cT03iC6TJvB8i/0U0zEfdY=; b=cCPbht/y/9LTOc4f5vi31IbSwN jEiOaUTs1h1bStKHIQ4ZtM7oWcj9ZXfC1l3NbutZ1slJPtHqqZwtDA18rT3WNJS41F6l75BtbrMK7 wjKSwaF5RI9v6x91EJ+sh7TlLG2mfnghzzU42JrOPnZ+EFXiFcM8/iTcCQA9vkSRY3sc5fcQ5hwBK H1sZ+KPsbxIIycng+QtVmxKOgjnZzYFrCStR7PvqTY/OJWu8RdMzZ+rMJD08MWFPPpiRIylSklud9 oFabYJ3DqzV+upFUs0x+vjZ2F0kAffZdL6xU3rS+tItnVTbrAILhEixphWj6XERLhFEvDf+f34TwJ DhITUuzw==; Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1ljLW3-00FSqM-4v for linux-arm-kernel@lists.infradead.org; Wed, 19 May 2021 12:41:36 +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 C1CB911B3; Wed, 19 May 2021 05:41:34 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B7C993F73B; Wed, 19 May 2021 05:41:33 -0700 (PDT) From: Mark Rutland To: linux-arm-kernel@lists.infradead.org Cc: catalin.marinas@arm.com, james.morse@arm.com, mark.rutland@arm.com, maz@kernel.org, will@kernel.org, joey.gouly@arm.com Subject: [PATCH v2 18/19] arm64: entry: don't instrument entry code with KCOV Date: Wed, 19 May 2021 13:39:01 +0100 Message-Id: <20210519123902.2452-19-mark.rutland@arm.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20210519123902.2452-1-mark.rutland@arm.com> References: <20210519123902.2452-1-mark.rutland@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210519_054135_250678_DCCBB15B X-CRM114-Status: GOOD ( 10.65 ) 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: , MIME-Version: 1.0 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 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 +KCOV_INSTRUMENT_entry.o := n + # Object file lists. obj-y := debug-monitors.o entry.o irq.o fpsimd.o \ entry-common.o entry-fpsimd.o process.o ptrace.o \ -- 2.11.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel