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=-8.4 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=unavailable 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 77E15C43331 for ; Mon, 30 Mar 2020 11:43:56 +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 4E81C20774 for ; Mon, 30 Mar 2020 11:43:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="D0RRmtNG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4E81C20774 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+infradead-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.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=f3dnI6EZQ4V62V4MPhIRxKSzP8lORDW8Rnt3EDoZWUM=; b=D0RRmtNGaUtFu/JDuTCdUr6T+ A3Izh7c5CnjPUYfevloQbUt7I7H6rVCsxMUAfXWh73wYFKHIR3wReDpphokkuunWNCYWPpP42PDcZ 81zRC70UFtgwAQBvGRnPafg3IzTNDBaHFZOgN8jnLR/P7P362BiMhvCz9I1PxxbgucfWRlh6HpjS2 sa+mxgfPRYmQD9wtwQxUl5Mz2laG5DCkf3apzdXi9pqsejPXI0VbnMe0m8OwK+rLSqGvrtkQeBcto lkOZTTEJYCIi+pNaL4KcZb0CVOcNtg9TdTC4TcM31uXu4ABT6XTwbT2Ze4ut0VtBxyOK3/5AiztTd VijfDi0tw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIspd-00057F-Fs; Mon, 30 Mar 2020 11:43:53 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jIspa-00056i-GU for linux-arm-kernel@lists.infradead.org; Mon, 30 Mar 2020 11:43:51 +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 E58C931B; Mon, 30 Mar 2020 04:43:49 -0700 (PDT) Received: from [10.57.27.249] (unknown [10.57.27.249]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4CC943F52E; Mon, 30 Mar 2020 04:43:48 -0700 (PDT) Subject: Re: [PATCH 2/2] arm64: Kconfig: ptrauth: Add binutils version check to fix mismatch To: Catalin Marinas References: <1585236720-21819-1-git-send-email-amit.kachhap@arm.com> <1585236720-21819-2-git-send-email-amit.kachhap@arm.com> <20200327125522.GB18117@mbp> From: Amit Kachhap Message-ID: <497d96a1-0532-ca18-8eaa-79fbcfd0b87d@arm.com> Date: Mon, 30 Mar 2020 17:13:44 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20200327125522.GB18117@mbp> Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200330_044350_595573_1FD0BD03 X-CRM114-Status: GOOD ( 20.46 ) 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: Vincenzo Frascino , Will Deacon , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 3/27/20 6:25 PM, Catalin Marinas wrote: > On Thu, Mar 26, 2020 at 09:02:00PM +0530, Amit Daniel Kachhap wrote: >> Recent addition of ARM64_PTR_AUTH exposed a mismatch issue with binutils. >> 9.1+ versions of gcc inserts a section note .note.gnu.property but this >> can be used properly by binutils version greater than 2.33.1. If older >> binutils are used then the following warnings are generated, >> >> aarch64-linux-ld: warning: arch/arm64/kernel/vdso/vgettimeofday.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0000000 >> aarch64-linux-objdump: warning: arch/arm64/lib/csum.o: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0000000 >> aarch64-linux-nm: warning: .tmp_vmlinux1: unsupported GNU_PROPERTY_TYPE (5) type: 0xc0000000 >> >> This patch enables ARM64_PTR_AUTH when gcc and binutils versions are >> compatible with each other. Older gcc which do not insert such section >> continue to work as before. >> >> This scenario may not occur with clang as a recent commit 3b446c7d27ddd06 >> ("arm64: Kconfig: verify binutils support for ARM64_PTR_AUTH") masks >> binutils version lesser then 2.34. >> >> Reported-by: kbuild test robot >> Suggested-by: Vincenzo Frascino >> Signed-off-by: Amit Daniel Kachhap >> --- >> arch/arm64/Kconfig | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig >> index e6712b6..73135da 100644 >> --- a/arch/arm64/Kconfig >> +++ b/arch/arm64/Kconfig >> @@ -1503,7 +1503,7 @@ config ARM64_PTR_AUTH >> default y >> depends on !KVM || ARM64_VHE >> depends on (CC_HAS_SIGN_RETURN_ADDRESS || CC_HAS_BRANCH_PROT_PAC_RET) && AS_HAS_PAC >> - depends on CC_IS_GCC || (CC_IS_CLANG && AS_HAS_CFI_NEGATE_RA_STATE) >> + depends on (CC_IS_GCC && (GCC_VERSION < 90100 || LD_VERSION >= 233010000)) || (CC_IS_CLANG && AS_HAS_CFI_NEGATE_RA_STATE) > > We should add some of the comments in the commit log to the Kconfig > entry. I would also split this in two (equivalent to CC_IS_ implies): > > depends on !CC_IS_GCC || GCC_VERSION < 90100 || LD_VERSION >= 233010000 > depends on !CC_IS_CLANG || AS_HAS_CFI_NEGATE_RA_STATE > > and add a comment above the gcc/ld version checking. > > (not entirely identical to the original if CC is neither of them but I > don't think we have this problem) Re-posted v2 as per the suggestions. Thanks, Amit > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel