From patchwork Mon Jun 29 06:18:32 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kees Cook X-Patchwork-Id: 11630487 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D762618 for ; Mon, 29 Jun 2020 06:22:14 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 C6F9523131 for ; Mon, 29 Jun 2020 06:22:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="CeQrIZTB"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="EwIeltjG" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C6F9523131 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=QjECSnDP6YlIsuibQgNPizHVLILVYNsBPmSOMADLOeo=; b=CeQrIZTBHZL6GucsBTl7xC1rI yhxUvHj79UlJbAHZ0pFe5txv9u4bXo9I79GCXM861zlUquPQjgGQxE0T0GZLpHyyDyPsRrpMKkhJl +rTvz7dU5Qxj/o7Y1SJy0buqmj2VRm5DlqzYEuO3N7Q5lZpRE15KMbuhies7hUV75xp+OBiONp2n+ oJj8OThgpBfip6dbffsQ/TYUwATcGjOmNmGle1yn1nzs2w+DwL9Y4hEtL2chmYTMiU+bw/ZVgdPPF JyZAe6wSBqNdOnraU8DOQYum14CrlgbO//No1SIpvt54R42DrCildTax3rqezDOeV+IuXc8b3aWRs ucE5qD8Dw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpn8p-00067Q-SO; Mon, 29 Jun 2020 06:19:43 +0000 Received: from mail-pf1-x444.google.com ([2607:f8b0:4864:20::444]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jpn81-0005qo-Q9 for linux-arm-kernel@lists.infradead.org; Mon, 29 Jun 2020 06:19:02 +0000 Received: by mail-pf1-x444.google.com with SMTP id q17so7445857pfu.8 for ; Sun, 28 Jun 2020 23:18:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l2gkWNX3d66L/hKh2STsGvUucTtZJRcz4r/ewyLA14w=; b=EwIeltjGnlLT7TimPFoW5tYhE4Etaftjgk0utIv1DERQIoaBLaCrzZdEMEbl2/ko2L EIAKTruY9wYrBxsUO8J20gzMkX43dcOFiRkqGRmfq8OMnlhw0L7j5pNYBiu1NorElQCk 0rG1LKDuU8dxAvdd7b1IG3oEzj54pXm3LMXCA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=l2gkWNX3d66L/hKh2STsGvUucTtZJRcz4r/ewyLA14w=; b=ivNDfmxmkuLZjNXCMa/rlaWtm4g4q4cEvJo0C/OCo20b79GRBnvoAPSTTsLq/A2ltI ZqFLU7jpn104eegrkl3m2EvEEEaoB+UZE3GCYnA3llnRm2PBQWs7ZgA60gaTxbxIb6bi Ln7GBgSv0anUI5amW73H5YaXxxrUSoys/WcIPp3TcidJwKJukEslk6//DoVyl4JAPOY/ vL6Lfqetcu7AznBelA1w/xuMv9ALMXR0OjUo/y8aKdHP5kWzY5Q0QKhQf58/ERbyQb9o 3E6lkx8CrlfkJZwIjEKH6sq5pNhbMG3Ct9YgpgjIYNddJG1sEUxWQ0NijQDugTR6DBmc 84Mg== X-Gm-Message-State: AOAM531lp0wbp1kJk03EBDItnWfcbkx7H9PAGFG4yFq89SDfF6Y6F2jd jCg0/N0QFgvsFEQ6hgHFad+s2Q== X-Google-Smtp-Source: ABdhPJzd+VgRMDjRj70nfxA/PtEMQQFRxNgIvA3+idrGBzG3XC8iwLb7Qy3efrxK+yKVlZZEtao0mA== X-Received: by 2002:a63:7802:: with SMTP id t2mr9139650pgc.421.1593411532102; Sun, 28 Jun 2020 23:18:52 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id d25sm28162513pgn.2.2020.06.28.23.18.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 28 Jun 2020 23:18:48 -0700 (PDT) From: Kees Cook To: Will Deacon Subject: [PATCH v4 09/17] arm64/build: Remove .eh_frame* sections due to unwind tables Date: Sun, 28 Jun 2020 23:18:32 -0700 Message-Id: <20200629061840.4065483-10-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200629061840.4065483-1-keescook@chromium.org> References: <20200629061840.4065483-1-keescook@chromium.org> MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:444 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.0 DKIMWL_WL_HIGH DKIMwl.org - Whitelisted High sender 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: Mark Rutland , linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, Kees Cook , Arnd Bergmann , Catalin Marinas , Masahiro Yamada , x86@kernel.org, Nick Desaulniers , Russell King , linux-kernel@vger.kernel.org, Nathan Chancellor , clang-built-linux@googlegroups.com, Arvind Sankar , Ingo Molnar , James Morse , Thomas Gleixner , Borislav Petkov , Peter Collingbourne , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Avoid .eh_frame* section generation by making sure both CFLAGS and AFLAGS contain -fno-asychronous-unwind-tables and -fno-unwind-tables. Suggested-by: Ard Biesheuvel Acked-by: Will Deacon Signed-off-by: Kees Cook --- arch/arm64/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/arch/arm64/Makefile b/arch/arm64/Makefile index a0d94d063fa8..895486606f74 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