Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1789973pxk; Tue, 1 Sep 2020 07:53:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxu37bbqy9SKuhnM4nb9sX24cTtDYEZxibKcV2bTowTQsuggooTOC8fEnTVsB7foe9pgHF X-Received: by 2002:aa7:c159:: with SMTP id r25mr2122312edp.317.1598972024987; Tue, 01 Sep 2020 07:53:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598972024; cv=none; d=google.com; s=arc-20160816; b=YrRvZw4hSUJCXVRX7Qv9pOEbXrp3hhpl6xH1zR8XPAl3QKqxF2zXrbLX1IvhVbQ5w1 AP9HRsStWgSj6a0zCNsWS+vO9rMU5Z+iG0HEaRhv4dnyl/LWOy2zwV6dNWfBuxwpGxI3 w9Ec56HtqE8o/1piVT3CB0vSrcoAM+G47dT812ex7S44rALjydcFuPAWTBwwK6SkQzSL qcSXNZ/ZnNcr9SlMch0H0WZY9aGpcm3b1Kz7tgm+k+xZfItylZ01mgXVWfxvcDVtR8c4 WEZ915yA+wucOfOAFm9HQBUtaE0CZ+KPvGX8RN/WQOV3XBj4y8/samDONoyhRsAYBlrF zmAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:dkim-signature :dkim-signature:date; bh=agpKXEn4IiVG0idalDrSysa9oc+oy3SJpMth1in+B6A=; b=0m/DnwbYM786mVVUTiYnbIwX5L56Hggq2/05RQduf1OQmJnsHFmXFhfNj/kHPZfKnk cdTF2F1hNPpf0O2RO3tin1dAMeaH62+e3usRkUppGcC/SbfncYm5Dmpyz/RUcNor1nd8 sDDD/GnGXaspc1FfmIko7o2iNRJhhodIM1bsKWWSd50YcD4k1X+L3FXv9T2Zk9QLmYPP 5Qh6ZviJGJXcpU75WE0GtFV69FN/xvoqkpfCHuXsd163jhx/2VB/9ELPklo1Q1v5GVHe s8fsulMnMOMIRxQVywSngbub1cCLdSRS8fQO1nx2fz9lF1lAzND6yFUvg7T8T7N2ad2X e0sA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linutronix.de header.s=2020 header.b=u7zu40ZA; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f1si732990ejc.311.2020.09.01.07.53.21; Tue, 01 Sep 2020 07:53:44 -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=fail header.i=@linutronix.de header.s=2020 header.b=u7zu40ZA; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728671AbgIAOuW (ORCPT + 99 others); Tue, 1 Sep 2020 10:50:22 -0400 Received: from Galois.linutronix.de ([193.142.43.55]:39528 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727824AbgIALs1 (ORCPT ); Tue, 1 Sep 2020 07:48:27 -0400 Date: Tue, 01 Sep 2020 11:47:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1598960878; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=agpKXEn4IiVG0idalDrSysa9oc+oy3SJpMth1in+B6A=; b=u7zu40ZA/e6dXI/wSYWJzFGW1T4yvb9cBm+oFRIA8GyNVVGCL5SX7YzsIjAu5ATQse++o4 i+cLn9gliA0uVcXbCVeI4U+qeRC+u9a6x/H95C7Dk9KYOefQ/6M5tJPKXuLWNck+bWQ+PX H+kS1sdgQ+KW+pnzZFcLAAadh5ylRq2WieUxYFDz7snPy7dxl6NObLgpCNbgybcPj/WMov 9KfotLKknteM+GddCWACmNIw5lcAfDEBirNdUtPv7Npvl1vcasaSQj799cY6ooGydzSLHF OkH+rvMtLNCoA+FhaVjCDjS40FiwAI0nhczFVGSHK3xSt21ruQ43eUh31UuHYQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1598960878; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=agpKXEn4IiVG0idalDrSysa9oc+oy3SJpMth1in+B6A=; b=InbigVtayoX2HWBQhqXki/dlnb2XS1q7Ld8luRmPJLEL8ZKR3uMCoL6tbgEP15pmJQzg6u muv4I2RaWzJM1xBg== From: "tip-bot2 for Kees Cook" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: core/build] arm64/build: Remove .eh_frame* sections due to unwind tables Cc: Ard Biesheuvel , Kees Cook , Ingo Molnar , Will Deacon , x86 , LKML In-Reply-To: <20200821194310.3089815-11-keescook@chromium.org> References: <20200821194310.3089815-11-keescook@chromium.org> MIME-Version: 1.0 Message-ID: <159896087788.20229.17729780848112883247.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the core/build branch of tip: Commit-ID: 6e0a66d10c5b629369afa47b753d0ec46fa812dd Gitweb: https://git.kernel.org/tip/6e0a66d10c5b629369afa47b753d0ec46fa812dd Author: Kees Cook AuthorDate: Fri, 21 Aug 2020 12:42:51 -07:00 Committer: Ingo Molnar CommitterDate: Tue, 01 Sep 2020 09:50:36 +02:00 arm64/build: Remove .eh_frame* sections due to unwind tables Avoid .eh_frame* section generation by making sure both CFLAGS and AFLAGS contain -fno-asychronous-unwind-tables and -fno-unwind-tables. With all sources of .eh_frame now removed from the build, drop this DISCARD so we can be alerted in the future if it returns unexpectedly once orphan section warnings have been enabled. Suggested-by: Ard Biesheuvel Signed-off-by: Kees Cook Signed-off-by: Ingo Molnar Acked-by: Will Deacon Link: https://lore.kernel.org/r/20200821194310.3089815-11-keescook@chromium.org --- arch/arm64/Makefile | 5 ++++- arch/arm64/kernel/vmlinux.lds.S | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index 55bc854..6de7f55 100644 --- a/arch/arm64/Makefile +++ b/arch/arm64/Makefile @@ -47,13 +47,16 @@ endif KBUILD_CFLAGS += -mgeneral-regs-only \ $(compat_vdso) $(cc_has_k_constraint) -KBUILD_CFLAGS += -fno-asynchronous-unwind-tables KBUILD_CFLAGS += $(call cc-disable-warning, psabi) KBUILD_AFLAGS += $(compat_vdso) KBUILD_CFLAGS += $(call cc-option,-mabi=lp64) KBUILD_AFLAGS += $(call cc-option,-mabi=lp64) +# Avoid generating .eh_frame* sections. +KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables +KBUILD_AFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables + ifeq ($(CONFIG_STACKPROTECTOR_PER_TASK),y) prepare: stack_protector_prepare stack_protector_prepare: prepare0 diff --git a/arch/arm64/kernel/vmlinux.lds.S b/arch/arm64/kernel/vmlinux.lds.S index 13fc2ec..c2b8426 100644 --- a/arch/arm64/kernel/vmlinux.lds.S +++ b/arch/arm64/kernel/vmlinux.lds.S @@ -94,7 +94,6 @@ SECTIONS *(.discard.*) *(.interp .dynamic) *(.dynsym .dynstr .hash .gnu.hash) - *(.eh_frame) } . = KIMAGE_VADDR + TEXT_OFFSET;