From patchwork Tue Jun 12 00:32:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 10459019 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 56291601AE for ; Tue, 12 Jun 2018 00:33:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45EF028521 for ; Tue, 12 Jun 2018 00:33:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A85128630; Tue, 12 Jun 2018 00:33:14 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 470B22862D for ; Tue, 12 Jun 2018 00:33:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934823AbeFLAc7 (ORCPT ); Mon, 11 Jun 2018 20:32:59 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:46186 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934816AbeFLAcy (ORCPT ); Mon, 11 Jun 2018 20:32:54 -0400 Received: by mail-pg0-f66.google.com with SMTP id d2-v6so10568877pga.13 for ; Mon, 11 Jun 2018 17:32:54 -0700 (PDT) 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; bh=WE8UorqEcWR0qayLlC9jh0/UiPlrZYUo/DYEnp/7/Hs=; b=dUWcbkyvY0BEIA8iRX9Srwo02L10gvXMFiCXEQdMKRGRSUoyjZdkk2IAi6WgOrEjtd tDKLPCcLzxfQOSekjOhbLMypzvtUTYjdC0EPGoyctIVxqbeNciJC5Y5ab/JlI6g33OKT L9/0bm1oQ835SFnxYQhRhRQkaaTCl5niD6f7aQ6ALST3Yx6KiguXa+v8LFGrauvApYy1 Dr2QqvKCO97hzZ7FzRli7UMQh1QVIRZUGL8hO2DdFU6ire8+cegsHKcpsZQ2SjDYtpfJ 4l1+amPej5ZxKi/+4SaF7RVmvKsSBOhq0+Uw03lvstGVtLf5CBGpAs0QTbzpZW+yyvci Zqhw== X-Gm-Message-State: APt69E2dpzBLaWr9bXPpb2Oc1QsJeS/PeDYLFkhz2wJE0AZVv5/igPIh yE0JyLlj1e9DJ0hzsGZUrPm19g== X-Google-Smtp-Source: ADUXVKLxcuCuWAEKmgw6zsfo7NYAcvvMbh1/xeZSE/Sz5Dmi7GQ39uMmRkgnuWhxAFmLO+KdtDF89g== X-Received: by 2002:a62:6406:: with SMTP id y6-v6mr1384980pfb.204.1528763574248; Mon, 11 Jun 2018 17:32:54 -0700 (PDT) Received: from localhost.net ([2601:602:9802:a8dc::27e5]) by smtp.gmail.com with ESMTPSA id c12-v6sm40866112pfi.177.2018.06.11.17.32.52 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Jun 2018 17:32:53 -0700 (PDT) From: Laura Abbott To: Andy Lutomirski , mjw@fedoraproject.org, "H . J . Lu" , Masahiro Yamada Cc: Laura Abbott , Linus Torvalds , X86 ML , linux-kernel@vger.kernel.org, Nick Clifton , Cary Coutant , linux-kbuild@vger.kernel.org Subject: [PATCHv4 3/3] x86: Add build salt to the vDSO and kernel linker scripts Date: Mon, 11 Jun 2018 17:32:24 -0700 Message-Id: <20180612003224.3658-4-labbott@redhat.com> X-Mailer: git-send-email 2.18.0.rc1 In-Reply-To: <20180612003224.3658-1-labbott@redhat.com> References: <20180612003224.3658-1-labbott@redhat.com> Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Both the kernel and the vDSO need to have unique build ids. Insert the build salt section to make the build ids unique. Signed-off-by: Laura Abbott Acked-by: Ingo Molnar --- arch/x86/entry/vdso/vdso-layout.lds.S | 3 ++- arch/x86/kernel/vmlinux.lds.S | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86/entry/vdso/vdso-layout.lds.S b/arch/x86/entry/vdso/vdso-layout.lds.S index acfd5ba7d943..a331c1d41360 100644 --- a/arch/x86/entry/vdso/vdso-layout.lds.S +++ b/arch/x86/entry/vdso/vdso-layout.lds.S @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 */ #include - +#include /* * Linker script for vDSO. This is an ELF shared object prelinked to * its virtual address, and with only one read-only segment. @@ -74,6 +74,7 @@ SECTIONS .fake_shstrtab : { *(.fake_shstrtab) } :text + BUILD_SALT .note : { *(.note.*) } :text :note .eh_frame_hdr : { *(.eh_frame_hdr) } :text :eh_frame_hdr diff --git a/arch/x86/kernel/vmlinux.lds.S b/arch/x86/kernel/vmlinux.lds.S index 5e1458f609a1..b61c33fa2617 100644 --- a/arch/x86/kernel/vmlinux.lds.S +++ b/arch/x86/kernel/vmlinux.lds.S @@ -172,6 +172,7 @@ SECTIONS _edata = .; } :data + BUILD_SALT BUG_TABLE ORC_UNWIND_TABLE