Message ID | 20200731230820.1742553-28-keescook@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=vkGX=BK=lists.infradead.org=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@kernel.org> 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 386FC138C for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 31 Jul 2020 23:19:17 +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 1073F20672 for <patchwork-linux-arm@patchwork.kernel.org>; Fri, 31 Jul 2020 23:19:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HJbxwQ3S"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="DMIGjUeC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1073F20672 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=DRigsLV1M1iWituanlgvBnmbK1aUGRI121RtHg24POM=; b=HJbxwQ3SEeZGRyzYK+/YOIPiY U0JEw/1UF1gs+A0LpAQ4U3Zju4Laa9qT0axhp/NUy1jecw/+OLFpL6I2UZrj0Ju4QPCl+YQfD/nR9 2nb9aO1iCccQkrBxWgJrxISWpK9Ei8NkN9SFnsYBlGH3drR5s0yW4xhVnVizcbOuWcFFdYtqwHOjE 10/QF/E0vS6prVTlBMs30q/KjjOs7G7DoCJow1TFFaS9j7QWXs1r2uAFjqAxvIlo/zKIxLysfbvTV i2y8XKFJYXUxuG1+AaGgzn1Bv36lrY8AIY0u9q7M3Q0Ve0+Pq4dMVFStUh1zn4sOWiocTr9EnqXbJ dPgbgI2vw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1eIn-00016Y-BH; Fri, 31 Jul 2020 23:19:01 +0000 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1eI4-0000j7-RN for linux-arm-kernel@lists.infradead.org; Fri, 31 Jul 2020 23:18:20 +0000 Received: by mail-pf1-x441.google.com with SMTP id y206so4899775pfb.10 for <linux-arm-kernel@lists.infradead.org>; Fri, 31 Jul 2020 16:18:16 -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=CCrf0JNZv+v7XnAC2zXNDLnfzhwewMny4SzCwBazlpk=; b=DMIGjUeCu7WS1yf3tO/ZSurFXxQBrmrk+d4SNtYg3Zx4gCqGr5TRspd1Co3OvHWOuD HgP0Q2MhZC5ng5TdGuBK1N01WZRuRbuL0sGEYmgyIAQ/nfOQmSKgbXe+WhGM7kP/jalx nJM2JxLFu2JgqXahVDnFg8bR+aSG0MSFz/IAE= 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=CCrf0JNZv+v7XnAC2zXNDLnfzhwewMny4SzCwBazlpk=; b=NqoJHHGRicHIbKekZr/UHeHXdx2KrbMaHqSHj9TtdRugV2LKv74Chf8ye2+6vL4lVF mnemQsPccif5eMBLk3IbhumLpJ3671TSgu6bqT9xwdQcyJWlU9s2rSgRHlPW5NnZPAQH sfd69/DYRlM+kqheYgFPwRBQCzm2rNotX1HmuhSr+2RgJorSy4DocKl7hZ4VoPQGInyW epKTR2s1egF3uZu9ahAO5syS1RbsXxGsLWNDSUdM+rpoDcfhk8b2PQzVAFdYNCrGxCLt vu5o6xjPlPoOzaeVWkIl2B/1xGclMq45TgkYn1wTNEYDNwrYcVHGMc6KB9j3ACC96rSP my9g== X-Gm-Message-State: AOAM532hljbfukks7V4GZwKSBbZ3GRDDD+rCDAC9YUjvWHZdzMtaCKTf FFYiLuJJ4cGKbxc4S6bACKObhQ== X-Google-Smtp-Source: ABdhPJzxG26pp/QHLf5eE3Hfqcu8R6vyN4v2osnuJzxCtSaiYaQfi+Blj9rxPYtcQ07RmWuKHr521Q== X-Received: by 2002:aa7:947b:: with SMTP id t27mr5503555pfq.117.1596237494645; Fri, 31 Jul 2020 16:18:14 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id i1sm11609642pfo.212.2020.07.31.16.18.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2020 16:18:11 -0700 (PDT) From: Kees Cook <keescook@chromium.org> To: Thomas Gleixner <tglx@linutronix.de>, Will Deacon <will@kernel.org> Subject: [PATCH v5 27/36] arm/boot: Warn on orphan section placement Date: Fri, 31 Jul 2020 16:08:11 -0700 Message-Id: <20200731230820.1742553-28-keescook@chromium.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200731230820.1742553-1-keescook@chromium.org> References: <20200731230820.1742553-1-keescook@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200731_191816_918781_39694826 X-CRM114-Status: GOOD ( 13.33 ) 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:441 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_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -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: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: Mark Rutland <mark.rutland@arm.com>, linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, Kees Cook <keescook@chromium.org>, Arnd Bergmann <arnd@arndb.de>, Catalin Marinas <catalin.marinas@arm.com>, Masahiro Yamada <masahiroy@kernel.org>, x86@kernel.org, Nick Desaulniers <ndesaulniers@google.com>, Russell King <linux@armlinux.org.uk>, linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com, Arvind Sankar <nivedita@alum.mit.edu>, Ingo Molnar <mingo@redhat.com>, James Morse <james.morse@arm.com>, Nathan Chancellor <natechancellor@gmail.com>, Borislav Petkov <bp@suse.de>, Peter Collingbourne <pcc@google.com>, Ard Biesheuvel <ardb@kernel.org>, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org |
Series |
Warn on orphan section placement
|
expand
|
diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 00602a6fba04..b8a97d81662d 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -128,6 +128,8 @@ endif LDFLAGS_vmlinux += --no-undefined # Delete all temporary local symbols LDFLAGS_vmlinux += -X +# Report orphan sections +LDFLAGS_vmlinux += --orphan-handling=warn # Next argument is a linker script LDFLAGS_vmlinux += -T
We don't want to depend on the linker's orphan section placement heuristics as these can vary between linkers, and may change between versions. All sections need to be explicitly handled in the linker script. With all sections now handled, enable orphan section warning. Signed-off-by: Kees Cook <keescook@chromium.org> --- arch/arm/boot/compressed/Makefile | 2 ++ 1 file changed, 2 insertions(+)