Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4693816imm; Mon, 11 Jun 2018 17:34:36 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKES3g684GhlxdcEH1UCsY+ZPJpy0oKi/arISfgDDxR0hgV/DtbMlgOZ5b5g2zvigWLwIv6 X-Received: by 2002:a65:6141:: with SMTP id o1-v6mr1120839pgv.409.1528763676020; Mon, 11 Jun 2018 17:34:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528763675; cv=none; d=google.com; s=arc-20160816; b=wvZLAIdMBN/wrL9d7Fi8RvNHDg3huFA0kI/jX7QUKe5Q+9v8mkeTWVdpvkDf8LOkLC lCkP64zvhTdgxR5PiC0tBKmKyjTQpEXL336Erp4n5VtLMzLD7NA+ViE22/iGTqpyZ/kx LGMsRZX89xLQ0kWRv7Wm/IYIZn8LxUcFzdGKDEwpJzLUJN9fZli5txeHZeKbK1RS6XuY Xo7IMRPqnl6oMFpqHzYdHgCkR5hcRJ8+A21DHH7SimDpFMZSrMZpZHyjqnBcRS4JxbR/ t+hZ1Qi56PPYegkM8V1gkSYPdT2UeMcKr36M9D946CK5DL+RaUy5/EjbkJ7sIIKI98wx UNag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=WE8UorqEcWR0qayLlC9jh0/UiPlrZYUo/DYEnp/7/Hs=; b=hsFXuHzvuPc/33o978ynRcyGX6wcKZVplPZt5cIskdlO7OahX8lb0OUR4rw3zbWVfM 2wBpMbaT0bGkW0tIZVB8Vlp21gRj5ORhQLnrYYVi+5hFmhEV5vXYArRDUzL0uRjMK8OT 5XEvx68vf01SmNKZWErC6VkJN25cI9S1WzzrFXOfttwzw1Pds/n00u+Yev42bazInO32 DEAoi6myOz+eSkQD0mNl5rL+UCBYq2aXqtFyI9bEiH6+T55MneBvBYc5N6nQcQP30tO1 3IupMWDfOiWWE4lNZUp7mICfx4IBcyR3uTwkgBHCkjzPz6LNoHE5eOQWUE6nK0p6qWo3 tpJg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x7-v6si65638915plo.303.2018.06.11.17.34.21; Mon, 11 Jun 2018 17:34:35 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934831AbeFLAc7 (ORCPT + 99 others); Mon, 11 Jun 2018 20:32:59 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:35192 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934815AbeFLAcy (ORCPT ); Mon, 11 Jun 2018 20:32:54 -0400 Received: by mail-pg0-f68.google.com with SMTP id 15-v6so10575200pge.2 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=dRf7JTnxiWC/+FXaLlYQlBCPUjTKH4moDO5TUsmqBBGzJ8fHRq3S+VXUuKCh/YJONf Z2DA21/+eMEWr7NZURG4mOQzIdi1NjPRcRiHHcMjWmIZlj9NirFsyD7S56h00w/vWVOY z/bn0tNXZ86VZIAJdSRl+xKzPHAX1ejqvYG4NEFIO3HbGtFxl0LD1wDKqnyFKb5daKOH EhRP18EMdTdR/ObklW9LeTsX42Zdu50s07qrjcXAbznfoepPK9MUWNn4XaR0Mwt13ZNF Jzn59WxiF8qOAXGsDuahuUm97wyjUVdTqSf/DWkA9qzFMYgi3R2wlP3ClsL5MX9N/Ogp uD+A== X-Gm-Message-State: APt69E2lXl1MKfeRrzIynbt4SYy4EZv0hRDwR+J3vudUnp7PDFaa0PQB FmjEh6wSKiXW/mtfFU2/r8Ldww== 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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 -- 2.18.0.rc1