Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp1985594pxx; Sat, 31 Oct 2020 04:53:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIH7lW9o0iRHVM4+gRmu7xQ22+HU2PNiwDFUoltH6KN4wivvdpm2c/b5zr/yc2NPiTEBGs X-Received: by 2002:a17:906:400f:: with SMTP id v15mr6682921ejj.378.1604145216803; Sat, 31 Oct 2020 04:53:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1604145216; cv=none; d=google.com; s=arc-20160816; b=dcaZS9fKBoT4q7OLy6BE15oZJOGdpC77XfjyHEnXkpR/T+ccv6WEB/8bcTmlzIrem7 qCSGtkshgVvxLdgRB4EMRt6XhJShM/yJp02mIzmuV1cpNfF5zDlQpebFYVI2fzL+qL2J WC9kfteNFrCHQ/y2skuB9zps3BO6GGDYF4O/RZe8hYemnx99+VM3eOK+rcn7JVMF59cE mgQEEFUukDu805QP9MIsoNUVSj+Wo5PThxNda8sCYT8WuIkyMHPRrHZQzxGoLBq8A7Pf /D3LAwkBeCZ+KJxgB7Z8FGiSqbT/x0UywdwnW8ylZPzwVuizQFPwf/BxP9jZYDaofIYc Y6ng== 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=rWUKVBt7tb9cQlliccX5MKgwxkZVu8gZUc8VJMZ+rtc=; b=nCosIW2m+TcYzRLM17hbl+yjI0MKkbz3OZQ1HGi7d50ime9ucxuuzFIt62hNgvyoLY ms3ypHWZcKVgZSgHw94MVp391iGUHGYjDx1ObCLh1u7HuLesP0a+ZNviEtdM3ZT950wU iGR6eFVUO1KYghXaOQsDjqfzYFmg9uTzrPbc+n0IrXdhJ8mcZxe6tZrKo6FariR3VxQu fNGDYeYQa/mzoaeSXKOI8jsQXkTvTxOFc6E/QO0jDwFV/qZOQ7Qy9qAH7akDWYGDoDrr Ma8SjFrta2LJz71oVP8d7tYFAdLMgl25XGTkRQqH7lXHip2uTD17eU6tk2Uh7ZxQ1wJk okxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Ct4yDcSW; 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 v20si6403760ejg.640.2020.10.31.04.53.14; Sat, 31 Oct 2020 04:53:36 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Ct4yDcSW; 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 S1727808AbgJaLto (ORCPT + 99 others); Sat, 31 Oct 2020 07:49:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:41554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727422AbgJaLmI (ORCPT ); Sat, 31 Oct 2020 07:42:08 -0400 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 3F9E720739; Sat, 31 Oct 2020 11:42:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604144527; bh=ow25wOT9xQi0ASWc0Mbvg770YA+wjWXgttwOe8o3log=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ct4yDcSWjvqv00deQNskDeRfJImRpnr5jWNbMuxMH2Vol+BU5irbaUR4RosE+8eP6 8C28L8DfuZm+lyWMMYn0zbrJH5BejSPS2mhuB/M+fyJfsZINslzSDaE3lNQYwKxdic VXMppKNW/G1KS20dKBoT7XAhEIuh7k40eLYkCp64= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nick Desaulniers , Will Deacon Subject: [PATCH 5.8 22/70] arm64: link with -z norelro regardless of CONFIG_RELOCATABLE Date: Sat, 31 Oct 2020 12:35:54 +0100 Message-Id: <20201031113500.566611292@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201031113459.481803250@linuxfoundation.org> References: <20201031113459.481803250@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,14 +10,14 @@ # # 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) 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