Message ID | 20200731230820.1742553-32-keescook@chromium.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <SRS0=15xB=BL=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 2A1A614B7 for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 1 Aug 2020 00:28:21 +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 F0BF12087C for <patchwork-linux-arm@patchwork.kernel.org>; Sat, 1 Aug 2020 00:28:20 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uPK71+2u"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="kXpcLutZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org F0BF12087C 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=qmXDbhz1gvLuzSy+OiQkR9ZAPG8xWsmpAbU4owm3x5U=; b=uPK71+2uwgVl17s4FEabKWRCi EOoWhj++SxZvQ/1L9G2Ob6tUStqn1EmvXvxWCKiTEdDyfbgCxKcFxbxb5OZo16bAa8bqnETodw2vH uR+zUr6KcQHoa/0mzvhrOhif57IG7oOsSLxCLVFhaeiu6G8OQIITgmAUkyYTVgwZK9Tpzl3edpoxa 1BcXSw3oKkCHZvm/GlD4ryIhAxrlDoiGdcrorrcaDy2eWUErceb1SRWC4YCdvDP85jiHF7rXgZ9P6 l1kAnP5CRJn5OvfIQ4cMfg5WGeSY+l0pmw8hZ/BmzcBDNYZknk6H7wpySr3uFr8Wdt/ChyrJ2OIkD 8gMtUW9Jw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1eCU-0001JJ-UG; Fri, 31 Jul 2020 23:12:30 +0000 Received: from mail-pf1-x442.google.com ([2607:f8b0:4864:20::442]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k1e8v-0008C4-CJ for linux-arm-kernel@lists.infradead.org; Fri, 31 Jul 2020 23:09:02 +0000 Received: by mail-pf1-x442.google.com with SMTP id f193so4771258pfa.12 for <linux-arm-kernel@lists.infradead.org>; Fri, 31 Jul 2020 16:08:49 -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=0GUjcxjsZxZ8lM3nHzNDLygJ5FIXra6/aspJ0PfOUm4=; b=kXpcLutZEBDIK8r/VrXM0/S/M66OR5FIx7eppKkF/v1AAyqoIG1EcJSK+MAUIX1GFO +VctBRcweBl+L7+RbRpkCnLdW+eB6f/AB/C7ovm8+db2FE3qYt6eJuyH5G4NG9EB2Nqy kXp3k3nuHXo+uMdBCXjaRxsfyYI9gbQEgrOEY= 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=0GUjcxjsZxZ8lM3nHzNDLygJ5FIXra6/aspJ0PfOUm4=; b=eR2cK5omqRs9yCQAhY7k9YsXDhRNJEKl7MAhZ2wyTlJ+rloKwisqLI+dppXJUlEhjg kY/YbLDr/StmGJFWV1O7IUATF7jyC/PDzYDAgtA/K+JwkYx4nMWaoJ5Wu/G+FwjDbJOG WlX4HERYl1i0lBMbnrcP9f8+n5UvWwUbXQbcH9lhET5X4gHfqRT+2JeVPpu6nMmTjRzc KMPzsSNhg6G10fXHNmWVHiQ7Zc1qdbbemaqI2eq7QJ+2cLx0UUkTJZ/h0s/HChHYmBsV /4lxzpOOCZ0ENk2vh0WpUnImgqwra1WOiS3giUVSoxvxmUmUQHpqmKBoWCOrtQCA322q CJHA== X-Gm-Message-State: AOAM531EL7DFWk6fmzRx6fXLdKU5Yb2YrYtzXe/Qj5Rdjyd5IUpbLXXj DVmMEOCoQK5BKMhqbEmRXilHlQ== X-Google-Smtp-Source: ABdhPJwiN0XXHdkflMLnP3OGR+ZptMLbM44ofV7XUW+Prs0tZqxumVQ+EVPIU7ICfg7NjYmYai6cfw== X-Received: by 2002:a63:4f1b:: with SMTP id d27mr5466462pgb.389.1596236927556; Fri, 31 Jul 2020 16:08:47 -0700 (PDT) Received: from www.outflux.net (smtp.outflux.net. [198.145.64.163]) by smtp.gmail.com with ESMTPSA id 75sm649022pfx.187.2020.07.31.16.08.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Jul 2020 16:08:44 -0700 (PDT) From: Kees Cook <keescook@chromium.org> To: Thomas Gleixner <tglx@linutronix.de>, Will Deacon <will@kernel.org> Subject: [PATCH v5 31/36] x86/build: Warn on orphan section placement Date: Fri, 31 Jul 2020 16:08:15 -0700 Message-Id: <20200731230820.1742553-32-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_190849_469591_2320AB0B X-CRM114-Status: GOOD ( 12.57 ) 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:442 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_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.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -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/x86/Makefile b/arch/x86/Makefile index 00e378de8bc0..f8a5b2333729 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -51,6 +51,10 @@ ifdef CONFIG_X86_NEED_RELOCS LDFLAGS_vmlinux := --emit-relocs --discard-none endif +# We never want expected sections to be placed heuristically by the +# linker. All sections should be explicitly named in the linker script. +LDFLAGS_vmlinux += --orphan-handling=warn + # # Prevent GCC from generating any FP code by mistake. #
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 <keescook@chromium.org> --- arch/x86/Makefile | 4 ++++ 1 file changed, 4 insertions(+)