Received: by 10.213.65.68 with SMTP id h4csp881114imn; Tue, 20 Mar 2018 18:47:48 -0700 (PDT) X-Google-Smtp-Source: AG47ELvkZZaT4hCV4+16n8L47YoYGA2ZPb4nz+0o9m7o8gwpJ9lutCAX+orB4VVMVFi7CRyZ6TQ7 X-Received: by 10.98.159.85 with SMTP id g82mr15315617pfe.15.1521596868879; Tue, 20 Mar 2018 18:47:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521596868; cv=none; d=google.com; s=arc-20160816; b=P+HahV/jeNW6luEszRUGZlY4+Ikvi2oHKssd/zCuMGgeJlXfcCKpEdfzzo+6rhLUrr Z/1uta53JcwHrI6KqoK+gKcgspOC98KwqBRLdp7KEyJwic71F3M0Qp+a6jyO4UcI95zW jauqlY3AENZxds9s2BtHhmGjgJlat2qR/3mA9o0k0B48GlQ+n2pFq3MFkstC/7jE1DRO zO65C5mVORHUN9p3fQ2GcuFWRzdFfWEj6v2pa7kyGuPrYdd5itXvn51MPlBrvAJ+P4pc 2Yc1z3lPDAzWBL33jFBAvKkBGwc+o3KnXm9ao87TTG9O4bGZLTZie3sRnzQXdA7eTufn ltlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=0u/OpaXfN1YtDDwzMj9A6I7QMMRSXlxZ3rUJiKLocJg=; b=CtQ6z139J6r/txMgL4A7755HcPMrORd9wG2UDE6Q6JPa3ai72bMYdP1AC69zvq2vn6 K03mFmvfMRRxWPBk4QBqSEY/ZdvNn1LL1/VLpSDTpZ4Ss/Yty1SS32UnLBeu3vL1pEcY 7udn65jg8YQ/uycTXBg77JHBG6F0o0R5TurmreY/u/FbAOwx/T/riPkaw6t+653EPMyx SkITS+g4WMMQ/HaovjVxs3ueIx5/hKj5lSapFAeUZ3IYhIhHmC3MrXf5hcBQ9EENh373 zkcRUIwR3OZMwm6SiJjHuva3v9m2s0pvhhWZDyBRw8xWWftlii6ATdiMxI4/0m8IcKD2 iMYQ== 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 r14-v6si2398206pls.241.2018.03.20.18.47.34; Tue, 20 Mar 2018 18:47:48 -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 S1751581AbeCUBql (ORCPT + 99 others); Tue, 20 Mar 2018 21:46:41 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:41608 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751018AbeCUBqk (ORCPT ); Tue, 20 Mar 2018 21:46:40 -0400 Received: by mail-pl0-f68.google.com with SMTP id b7-v6so2196963plr.8 for ; Tue, 20 Mar 2018 18:46:40 -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; bh=0u/OpaXfN1YtDDwzMj9A6I7QMMRSXlxZ3rUJiKLocJg=; b=oldrSfCXixWwWTXbsN6hWHJS/PMcNKeJApSbThRnHdi3LFoz3txfmUR4kqQ5ChCFiu xxQestAIzSQiKT203WivvmQhpEAxMf+3nrzhyLZL/8QgzmOgmKxNX+Ux/0O0yI3vNBKS bzHjV78rIQDG+uMxr/JtH6RE97a9SVBVEm06Hk61E2t0kv32qx7BWFGCNllV2aqNZLRc YPHH6/lV1JyirZbB8LouAvUDaNZm8NCTUluzJOOcO+aV2vIqhLFl5vPBrw2/DTQopvNk m83ZwlU1IFrr72q3Kkc5SkRdreSyPCgCNZSoinNB4CGeDt/3trlOzqj0i+dtqgO6KRYH ds9g== X-Gm-Message-State: AElRT7H8ZvabC4AFdZydfIIjv2965MbfqjC6Pfn9aELLNIYTK7EJOSx0 a95fF/2mTn+OcjsjXPUMPRoZFQ== X-Received: by 2002:a17:902:6bc1:: with SMTP id m1-v6mr18861781plt.303.1521596800188; Tue, 20 Mar 2018 18:46:40 -0700 (PDT) Received: from localhost.net ([2601:602:9802:a8dc::6a4d]) by smtp.gmail.com with ESMTPSA id x4sm6025787pfb.46.2018.03.20.18.46.38 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Mar 2018 18:46:38 -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 Subject: [RFC PATCH 0/3] Salted build ids via linker sections Date: Tue, 20 Mar 2018 18:46:32 -0700 Message-Id: <20180321014635.29113-1-labbott@redhat.com> X-Mailer: git-send-email 2.16.2 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is a proposal that's come out of several discussion for Fedora but may be of interest to other distributions. In Fedora, the debug information is packaged separately (foo-debuginfo) and can be installed separately. There's been a long standing issue where only one version of a debuginfo info package can be installed at a time. Mark Wielaard made an effort for Fedora 27 to allow parallel installation of debuginfo (see https://fedoraproject.org/wiki/Changes/ParallelInstallableDebuginfo for more details) Part of the requirement to allow this to work is that build ids are unique between builds. The existing upstream rpm implementation ensures this by re-calculating the build-id using the version and release as a seed. This doesn't work 100% for the kernel because of the vDSO which is its own binary and doesn't get updated. After poking holes in a few of my ideas, there was a discussion with some people from the binutils team about adding --build-id-salt to let ld do the calculation debugedit is doing. There was a counter proposal made about adding some extra information via a .comment which will affect the build id calculation but just get stripped out. This is an implementation of the counter proposal. If an environment variable is set, that value gets added as a .comment section to the necessary binaries. This is RFC mostly to see if this approach is plausible enough to be merged or if it's worth trying to update binutils with the --build-id-salt option. I don't care about any names, I was pretty inconsistent. If people are roughly satisifed with this I'll probably just change all the names to build-salt or whatever gets bike shedded. Thanks, Laura Laura Abbott (3): kbuild: Introduce build-salt generated header kbuild: Link with generated build-salt header x86/vdso: Add build salt to the vDSO Makefile | 13 +++++++++++-- arch/x86/entry/vdso/vdso-layout.lds.S | 3 +++ scripts/.gitignore | 1 + scripts/Makefile | 2 +- scripts/build-id.lds.S | 5 +++++ scripts/gencomment | 19 +++++++++++++++++++ scripts/link-vmlinux.sh | 3 ++- 7 files changed, 42 insertions(+), 4 deletions(-) create mode 100644 scripts/build-id.lds.S create mode 100755 scripts/gencomment -- 2.16.2