Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp780703ybj; Tue, 5 May 2020 07:27:47 -0700 (PDT) X-Google-Smtp-Source: APiQypLZJ+3x2ZrKGnBoCfI4tkmWDEl8jrq8cjdgf5rCLaLe+imERtekqxz64egDcegmWEsY10wS X-Received: by 2002:a05:6402:204b:: with SMTP id bc11mr2890515edb.114.1588688866956; Tue, 05 May 2020 07:27:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588688866; cv=none; d=google.com; s=arc-20160816; b=bLbQAYUgcF4lkeASiLSvBhFZzgZyYeMvd8hBc6+MoKE/ituvtgCp1z5ylzeI1Vpx5N K5i5eKEmjlKVOlCMSEAlH3+D0QvMrg6GwSW+dhy10XA2PEvBDmvCXvR/TKUz6PboLBYZ DiRVqpYdMkFzJGlcJjdHQB+E5k5AM0+b02U8TGVcagd7mGaAHG1XnECAC/dgYKBKQ5DY zSigYBMBEgIVDjoXuQxM8rQxD2uA4qyHbYOsbPhAdsrXZy2B9/9VNTUIVTyX3KcZIppa biwecxmzAp+XigvlJaOHLvKhd+M8Syu65I5GTqWpF63YGJplFA/3qPlp+kZFJ2KpCXot N2Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=CRnKmj8U1S7T6r05juIe9G9oiXWB+7xusgdsCeCTxPs=; b=VZmkJhByl72tVoeotEXDd5/aZMT7v2HyOr8nx3d6cHY1udr8TKVnyLissNhMtJV0Ab hMxb78B7Jjh7ndW6G2WVSq7uDT6MEfrHWDU5wSwj/N59y0OaoNcH0h8qdse3Gg3WZT59 9DBE5R3dnovBS2YrX4AXyreAy+KENqBjSAnh8sThbF1QTi8gRTmNK7EmYDIQWYWVnIY6 lTWjRcbk4i6bVeub0DufRTrfs7nFNwUAAEXBIB+i1troo+RwCzJdIhd7wgUdgc44dIVe 4+QIvjDg9vv100q/vupQKoTj7wVkpuUyyS10E7npRKYuYCPbuNNoirosRBMe83gCmpGV sxVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u3si1306697edy.541.2020.05.05.07.27.23; Tue, 05 May 2020 07:27:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729328AbgEEO0F (ORCPT + 99 others); Tue, 5 May 2020 10:26:05 -0400 Received: from foss.arm.com ([217.140.110.172]:41716 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729142AbgEEO0E (ORCPT ); Tue, 5 May 2020 10:26:04 -0400 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 CAEE01FB; Tue, 5 May 2020 07:26:03 -0700 (PDT) Received: from C02TD0UTHF1T.local (unknown [10.57.25.241]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 456BF3F68F; Tue, 5 May 2020 07:25:59 -0700 (PDT) Date: Tue, 5 May 2020 15:25:56 +0100 From: Mark Rutland To: Arnd Bergmann Cc: Catalin Marinas , Will Deacon , Torsten Duwe , Ard Biesheuvel , Amit Daniel Kachhap , Torsten Duwe , Ard Biesheuvel , AKASHI Takahiro , Josh Poimboeuf , Julien Thierry , Andrew Morton , Marc Zyngier , Kees Cook , Alexandre Ghiti , Kristina Martsenko , Ionela Voinescu , Steve Capper , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] arm64: disable patchable function entry on big-endian clang builds Message-ID: <20200505142556.GF82823@C02TD0UTHF1T.local> References: <20200505141257.707945-1-arnd@arndb.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200505141257.707945-1-arnd@arndb.de> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 05, 2020 at 04:12:36PM +0200, Arnd Bergmann wrote: > Clang only supports the patchable_function_entry attribute on > little-endian arm64 builds, but not on big-endian: > > include/linux/kasan-checks.h:16:8: error: unknown attribute 'patchable_function_entry' ignored [-Werror,-Wunknown-attributes] > > Disable that configuration with another dependency. Unfortunately > the existing check is not enough, as $(cc-option) at this point does > not pass the -mbig-endian flag. Well that's unfortunate. :( Do we know if this is deliberate and/or likely to change in future? This practically rules out a BE distro kernel with things like PAC, which isn't ideal. > Fixes: 3b23e4991fb6 ("arm64: implement ftrace with regs") > Signed-off-by: Arnd Bergmann This looks fine for now, and we can add a version check in future, so: Acked-by: Mark Rutland Mark. > --- > arch/arm64/Kconfig | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index 4b256fa6db7a..a33d6402b934 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -151,7 +151,7 @@ config ARM64 > select HAVE_DMA_CONTIGUOUS > select HAVE_DYNAMIC_FTRACE > select HAVE_DYNAMIC_FTRACE_WITH_REGS \ > - if $(cc-option,-fpatchable-function-entry=2) > + if $(cc-option,-fpatchable-function-entry=2) && !(CC_IS_CLANG && CPU_BIG_ENDIAN) > select HAVE_EFFICIENT_UNALIGNED_ACCESS > select HAVE_FAST_GUP > select HAVE_FTRACE_MCOUNT_RECORD > -- > 2.26.0 >