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 1EC43C433DF for ; Fri, 31 Jul 2020 23:18:36 +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 DD01F20672 for ; Fri, 31 Jul 2020 23:18:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="f+h9tsfA"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="X38w8FM1"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="Lr9or3Hp" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DD01F20672 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=/EoQfMF8ZZCWnHABFgHCQ6gw3sG0oK31SL118jZBPhw=; b=f+h9tsfAYWkpbzC+W8N46I4fF jzX+0Rxtby2JmzYM6LNxfN6fBai1Y4ky9cNM9zjbuKqtWxHbHyZLjB/ThON5bqvNAXX9lxCSXYQD4 NEniF6n17SQeWC0mr/578iuNwq0UbereC58U/CqPymo24Hn2HrJq5X/TSCKs0U//tPhTWQzxUymfj WT210nviieXlFDF/74r7WuXJq0y8n/mrOz+oNdILpPPKfMxgnmKzWEuIM9CM06+w7h3NyyGhBB0Rv MrhaplfofRF95ltZH44TC5WwgmSNkwtRkytpMdbmX5qgc6gR85D8aikmp+f3d4QVMOykBJ5uwdAgE UFVP+2Dtg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1eGd-0000JH-OU; Fri, 31 Jul 2020 23:16:47 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1e9s-00008B-B8 for linux-arm-kernel@merlin.infradead.org; Fri, 31 Jul 2020 23:09:48 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=84268jPgmFqAzbh6kvNmngGGyveZ3rMo3Gva+KPIY/c=; b=X38w8FM16UlPbgSzfJ8YsaQHSt OrGMGACdW6gccLlE0gtbpoYjQjxAn/BYB11oFO6Zb0h4gl55JZrwgOOwIgMoi+bMmV3wmGCjQNodo f0x7N1lbR4bz3ponqzzKdh4SpDEJLVyNtQWgM4PhZMh7MvB8fJlIAMIvllzxjxrc1Hkn6B6WcZUpl twGrR3oK52KdjDgxQVFkdfK81WJFTVY4ePnxxe8vbS7/BUT/pxJHeEdwQ5znSwV0nFooLaBP2ydPz zX99ASpSBPYBjCXrCj4geqVVSn6a7Dth61rOaF4E46fMCmHSpzXZG3bdL8ERo6QcsBD6Shys+h3NG si+yYNsw==; Received: from mail-pj1-x1042.google.com ([2607:f8b0:4864:20::1042]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1e8z-0000b0-Ot for linux-arm-kernel@lists.infradead.org; Fri, 31 Jul 2020 23:09:46 +0000 Received: by mail-pj1-x1042.google.com with SMTP id lx9so8520415pjb.2 for ; Fri, 31 Jul 2020 16:08: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=84268jPgmFqAzbh6kvNmngGGyveZ3rMo3Gva+KPIY/c=; b=Lr9or3Hp0DSvQYElAg+xki465Vdb1uAtDe85PRDbs1d8wZ08VYB9OlhllbtENPVieR V70iE3+WoadE5MGnu8i8GLUrfRA1t5+LbrYMwG75g0Vr4sqB1S8u5be8NrKejxdMS7gm byUy6rMjO1J+JL4A2Xwyw8hGAHymoJEGFEhIc= 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=84268jPgmFqAzbh6kvNmngGGyveZ3rMo3Gva+KPIY/c=; b=F2JzZNH4WjUdvXCncxVfox5ytVHcCMH1mS60r5iRQinJoe9K2zWd5VaJy/Yks3EN9g 4PHH5k55TlcJOmqKcxKe5gPWC0ANxqN8AIGkDPQxSIRVFcvJlF//kqbmr6YnhwRDO2ck yb+oV2vZBUgSYbqCwiUJ/z0IhvbDH6Be9KV7E/pBwJLYiqcXmbukOokKepBm2yA/6CMW cRlr4QeDlPcqIEzooSu7yfJByVe9Zgb8BM70nnG/HK5sJAuZLWtYtLicWZddMSLC558w dS3t4yDhq6tAfITEnjl0fJbm+uKPY+AKK8JDtCST9fn5HY2MRZGIPhM65qRt/I2a7iDK zrIw== X-Gm-Message-State: AOAM531ZvuF9r2Pha6no3vnSmFEXjyAgaMeI25uGjKrcc5juyyqvJOIW xia9i7Vms5POU9JEj2ZtMsxnjQ== X-Google-Smtp-Source: ABdhPJwhHCIH/rXPbloue7Ao7LwdLWcpC7pKCtwRdsLSguHj3gdxjmuhn4CNI2OYzSlwA+KLPraTmQ== X-Received: by 2002:a17:90a:d252:: with SMTP id o18mr3631713pjw.146.1596236931297; Fri, 31 Jul 2020 16:08:51 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id y18sm11218113pff.10.2020.07.31.16.08.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2020 16:08:49 -0700 (PDT) From: Kees Cook To: Thomas Gleixner , Will Deacon Subject: [PATCH v5 35/36] x86/boot/compressed: Warn on orphan section placement Date: Fri, 31 Jul 2020 16:08:19 -0700 Message-Id: <20200731230820.1742553-36-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-20200801_000855_092398_9E116A17 X-CRM114-Status: GOOD ( 12.74 ) 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. Now that all sections are explicitly handled, enable orphan section warnings. Signed-off-by: Kees Cook --- arch/x86/boot/compressed/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/boot/compressed/Makefile b/arch/x86/boot/compressed/Makefile index 43b49e1f5b6d..f8270d924858 100644 --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -53,6 +53,7 @@ KBUILD_LDFLAGS += $(call ld-option,--no-ld-generated-unwind-info) # Compressed kernel should be built as PIE since it may be loaded at any # address by the bootloader. LDFLAGS_vmlinux := -pie $(call ld-option, --no-dynamic-linker) +LDFLAGS_vmlinux += --orphan-handling=warn LDFLAGS_vmlinux += -T hostprogs := mkpiggy -- 2.25.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel