Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp171132imm; Tue, 3 Jul 2018 16:23:07 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKqG6RYHk1vVn/W58rpMkr7ajm2ZunKkhF4gWDqqzF86oxg2cJlA4zKgvqv3E7QPCG3ufAU X-Received: by 2002:a17:902:5a0c:: with SMTP id q12-v6mr31551364pli.300.1530660187402; Tue, 03 Jul 2018 16:23:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530660187; cv=none; d=google.com; s=arc-20160816; b=sxwTNMQ1UvmEQYAa6G6q+FpSEzuwQ1auPdeZt0NDX9HneM1A+GkJf8kWGqdYR7/0Oe KEYgWe/xPuNqpWgJ027lMNfGK6V/luBV/TrIZE33Q+bttna7RjnIYoSXiPueWWo0SgZ+ XtPfwdU+BNYQwCXkGo1fuNGIL3UnOhb0Q7gRm9RJrajLCQS5CaUWNjq4z5NNrf79othK epgpDGkMIk5H2ICCPEPD6h7AdReeGn/VPGGw6mA5FPFtEJy2+IB/L61sRFIATJsseepS H64AIdTIHUqVgA6O5fNUD4TTPCZgoW7zcu0QzYEc/tkyFJ8QjhiN1GI88Jphx/kTRQhN hTtA== 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=TS/I98vAAnKjAyOMeCs7V10nIa69dIv5vbdlsKj9C98=; b=wnJrZyvh0+B0ei73tD/V7+lwX+5FssbO9vrO/qBKk3j5y9VfAK0r92sCc40tsuO9Pg kssw1uOzaM6TEmBc/I7hSlKyDZppENYDGFCfZ5Xa4YboazKmgrmGiKajpN8Fw2FG6MOr j3QRuyGiFtmWpO8OfUYgp+tQ0L0PTxKCsXPrmqS8C2l80ILTJ0mxVw4977tAfnPUSw+5 hDM4pb7cfmCWw7lAZ1/bOY6MRTIMKl2VinCle7f9WdURe6q3z5dL1UR4znDxjzoYMX7M 5mvr4ez438eq3wakbVI+i9nnSF17bEv9cz2g0eVIu+cxdGtgJQ+bsN9PN4MjFGqnAUhL n9pA== 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 21-v6si2257171pfj.6.2018.07.03.16.22.52; Tue, 03 Jul 2018 16:23:07 -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 S932138AbeGCXWI (ORCPT + 99 others); Tue, 3 Jul 2018 19:22:08 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:39089 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752691AbeGCXWG (ORCPT ); Tue, 3 Jul 2018 19:22:06 -0400 Received: by mail-oi0-f67.google.com with SMTP id d189-v6so7182443oib.6 for ; Tue, 03 Jul 2018 16:22:06 -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=TS/I98vAAnKjAyOMeCs7V10nIa69dIv5vbdlsKj9C98=; b=DX4S0QVntEa7anOX/Y/Spy5WdIjls7SvLf3uQcAXCEKOwQfQw/pe/cRwbGuIe9v4FN cQTk7vO5w64LIdRwQUWyJ1K8VB1NDbqT2K0G+osqNuy7ooWh4Krwi5sSnG0bHEzehtwj O2imbCmPg8yj9V4ov7ads7J/QExJdG9mf20wtlE0q6ufLR7VVGkYQ7G7La4PqyCenWuy QWv5Rk6hFBN7JGQHQBJwR4VK/sPUudT+TsO58mu36PVP1LmVD+sX/oR25Bh7VSVjlbt+ uK25fnU07a1ILXWC1tzW0dkUbW3xfojTrOMpTvwuEeZUrb0K5IA8GlJSyrGYCWWUpmKi klVQ== X-Gm-Message-State: APt69E2lIJrbP9m8OX0o36DzIzKOxPY0bYvUvGvmmlf52hpOXGii0+1T SdQuf2ZV3hMYMnIil4JxnEErlQ== X-Received: by 2002:aca:cc0b:: with SMTP id c11-v6mr19895206oig.314.1530660126099; Tue, 03 Jul 2018 16:22:06 -0700 (PDT) Received: from labbott-redhat.redhat.com ([2601:602:9802:a8dc::f0c1]) by smtp.gmail.com with ESMTPSA id 17-v6sm946587oir.27.2018.07.03.16.22.03 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 03 Jul 2018 16:22:04 -0700 (PDT) From: Laura Abbott To: Andy Lutomirski , mjw@fedoraproject.org, "H . J . Lu" , Masahiro Yamada , Michael Ellerman , Catalin Marinas , Will Deacon Cc: Laura Abbott , Linus Torvalds , X86 ML , linux-kernel@vger.kernel.org, Nick Clifton , Cary Coutant , linux-kbuild@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org Subject: [PATCHv5 0/4] Salted build ids via ELF notes Date: Tue, 3 Jul 2018 16:21:56 -0700 Message-Id: <20180703232200.11315-1-labbott@redhat.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is v5 of the series to allow unique build ids in the kernel. As a reminder of the context: "" 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 to add in the salt while building. The easiest proposal was to add an item in the linker script vs. linking in an object since we need the salt to go in every module as well as the kernel and vmlinux. "" v5 uses the approach suggested by Masahiro Yamada which uses the existing ELF note macro to more easily add the salt (vs previous approaches which tried to adjust via linker section). If arch maintainers are okay, I'd like acks for this so this can go through the kbuild tree. Thanks, Laura Laura Abbott (4): kbuild: Add build salt to the kernel and modules x86: Add build salt to the vDSO powerpc: Add build salt to the vDSO arm64: Add build salt to the vDSO arch/arm64/kernel/vdso/note.S | 3 +++ arch/powerpc/kernel/vdso32/note.S | 3 +++ arch/x86/entry/vdso/vdso-note.S | 3 +++ arch/x86/entry/vdso/vdso32/note.S | 3 +++ include/linux/build-salt.h | 20 ++++++++++++++++++++ init/Kconfig | 9 +++++++++ init/version.c | 3 +++ scripts/mod/modpost.c | 3 +++ 8 files changed, 47 insertions(+) create mode 100644 include/linux/build-salt.h -- 2.17.1