From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57F07C433E0 for ; Fri, 31 Jul 2020 23:20:41 +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 261122072A for ; Fri, 31 Jul 2020 23:20:41 +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 261122072A 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+linux-arm-kernel=archiver.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 ; 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 To: Thomas Gleixner , Will Deacon 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-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, clang-built-linux@googlegroups.com, Arvind Sankar , Ingo Molnar , James Morse , Nathan Chancellor , Borislav Petkov , Peter Collingbourne , Ard Biesheuvel , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- arch/arm/boot/compressed/Makefile | 2 ++ 1 file changed, 2 insertions(+) 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 -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel