Received: by 2002:a05:6622:f08:0:0:0:0 with SMTP id l8csp4488443ivc; Tue, 3 Nov 2020 13:22:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJzD+AKYPpDZNpQ4+T2gDfkUrgIY9wRgZg+OFwyNA8M941dMlOVM5yasPruJHsvtzbdiUTPe X-Received: by 2002:aa7:d7ca:: with SMTP id e10mr23451867eds.269.1604438525294; Tue, 03 Nov 2020 13:22:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604438525; cv=none; d=google.com; s=arc-20160816; b=JfqFmECGTBZdNTlsVFV+ZYcmTSNy1nIF3JKdSciEhbpzBnzdfTb8iJ0SDFyz0otR7U 9HAdCtSx6ptgzo+LuH2mo7Z2Vvakr2fh7Kac4JupGBBq4fFF8lR/lwp9XONC+Knk1/v6 zW1hTau6UGXN+DG5lZ8Rxt2G5YJOS/s2VCWs0i7ZyiBmRDnX5dmvuhPrEjC5eP/TauuH 60DxwUE+g+8oqBclEN01ir2W6O867lv57WKhw+7P8Ot/IYAErMoCl3fCKZI0fWL8R5Td tvKcgrG/L6mWaxzzyBjIq6NLJ+3FlgOyVF8SgHyHJ4lNLFSRXrIVnHgPGTUIvXiP9EfI ahvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jXYoQ8mnWDfwHyIYRtmfO6A6Md+NSi5qzIMIt/pdlAg=; b=XKrfwwlj204ARK099KqLjIlYRTqJH+BG31koj6Yq86J8PJ9KCipqptZoRE2QgECCoO zCb+FFi087HbdfE+MftYslwtSdFzui6VxTnJWnzPVX9pfPUQ/K/RjwDiGuY53Snb5Ni2 +BJ+I5JO6qYklG/9O7eziIpPjcLnhpda8PZ2Im1eLtyjLXQiY6osNuHfxf1MS/EuE0Ti JnaFIV5G2Cl/WFPcMfqOl53iiyHg4XOSJnTckOauRapIEsLUbmLFOBtzWRwvgksnwHqi 8eZyC006q9T0pJCi7u09nZ+lOkobFaRIDyFOF47kJkvNNIc63c+oH4oflOz0NzM5I+vf BvMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=nAAAUrLA; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c14si10600269edr.82.2020.11.03.13.21.42; Tue, 03 Nov 2020 13:22:05 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=nAAAUrLA; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388472AbgKCVJY (ORCPT + 99 others); Tue, 3 Nov 2020 16:09:24 -0500 Received: from mail.kernel.org ([198.145.29.99]:49186 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388445AbgKCVJO (ORCPT ); Tue, 3 Nov 2020 16:09:14 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 596F921534; Tue, 3 Nov 2020 21:09:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437753; bh=dAckfZUvuQTzjuGDQr/NoLlGwNVuu2+sA3yLjksJmoA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nAAAUrLA/A5Zsvl6vIzjBFsI6KI7KjFDnexoRgPrFXUlLEM+xh5dkuWVGADoa9X0O A0nw+oDvjEMubU9WfrMWQQxujSMflm7KXXviSTMkxcUCQcgyj9zZ8oyDJ+tEboXzjs 0dVaNbfwDfY01KhRPEkbXPyJcyN8L4Bgsxm1AOlI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , Will Deacon Subject: [PATCH 4.14 002/125] arm64: link with -z norelro regardless of CONFIG_RELOCATABLE Date: Tue, 3 Nov 2020 21:36:19 +0100 Message-Id: <20201103203156.720946484@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203156.372184213@linuxfoundation.org> References: <20201103203156.372184213@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nick Desaulniers commit 3b92fa7485eba16b05166fddf38ab42f2ff6ab95 upstream. With CONFIG_EXPERT=y, CONFIG_KASAN=y, CONFIG_RANDOMIZE_BASE=n, CONFIG_RELOCATABLE=n, we observe the following failure when trying to link the kernel image with LD=ld.lld: error: section: .exit.data is not contiguous with other relro sections ld.lld defaults to -z relro while ld.bfd defaults to -z norelro. This was previously fixed, but only for CONFIG_RELOCATABLE=y. Fixes: 3bbd3db86470 ("arm64: relocatable: fix inconsistencies in linker script and options") Signed-off-by: Nick Desaulniers Cc: stable@vger.kernel.org Link: https://lore.kernel.org/r/20201016175339.2429280-1-ndesaulniers@google.com Signed-off-by: Will Deacon Signed-off-by: Greg Kroah-Hartman --- arch/arm64/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -10,7 +10,7 @@ # # Copyright (C) 1995-2001 by Russell King -LDFLAGS_vmlinux :=--no-undefined -X +LDFLAGS_vmlinux :=--no-undefined -X -z norelro CPPFLAGS_vmlinux.lds = -DTEXT_OFFSET=$(TEXT_OFFSET) GZFLAGS :=-9 @@ -18,7 +18,7 @@ ifeq ($(CONFIG_RELOCATABLE), y) # Pass --no-apply-dynamic-relocs to restore pre-binutils-2.27 behaviour # for relative relocs, since this leads to better Image compression # with the relocation offsets always being zero. -LDFLAGS_vmlinux += -shared -Bsymbolic -z notext -z norelro \ +LDFLAGS_vmlinux += -shared -Bsymbolic -z notext \ $(call ld-option, --no-apply-dynamic-relocs) endif