Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4695037imm; Mon, 11 Jun 2018 17:36:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKInvIP/1YBgw1CrM2YkycA54XyH6mchr9xO+qbMnFASlddx0MVGwn1zL+hdOru28hDRam/a X-Received: by 2002:a63:980a:: with SMTP id q10-v6mr1175404pgd.50.1528763774079; Mon, 11 Jun 2018 17:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528763774; cv=none; d=google.com; s=arc-20160816; b=1EwFX7Mv+jWNGaS+W5ekBk39vv4BcCgH/jTdxSKy9QsTIgaSyuGfcEnnntbTsN6Z4d w7G4k73j32j1KO+BIBCiGCArMVYWUQEwlrPV52IU4AqNNffga4vTSMG9pz1vdYDIQmDY gD0fE2/+j/yudswHMxppQmaCvToKz2Jnz0f0X2pbRGXnXjeO4shkm0mYzXHHYZQXQHLb G2GYib+xTDsxU9nDutJPnvKpWERulCk/y1OpJ54HN0ChTA0H3El2mZ0aODyD5mLUOKTE WjKsVmbDpEd6I2tT8o3kqndKs7EQxolpoiSpsk94MQX+2A7anc9+zD9QoCMdO6QVvWlI dQqA== 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=QCPb3+W8Dc+YjFxnFovwQRs+CT/I6flVV4/pcIUWrPY=; b=MFV3vVAe5XcJ9baRfG7T5gE5JOjJV9cUfsjKkCck0qpsLaYTDNbgqd/+Tja/nOo58x 0TuKzUxfR6ubTgNr4RfYbaGPAqZ+bINbl5Fspsn5CgCCczkjgTIkWpg6hng6EaGUOu9n n/RpylvA8Yl1WJ3RIe2QIxik56r3jrnNM+61nxS/NJnlt+b9StcUSzJHFOG+QUi/umqs jBab1FbC11E3nBDlY5uLofAQBMzPWitraUSl8VSAvfrdRjzsZZ6BNx8Eb0Q3hsCXDK7N RvnM/DFOPSFBMZMYRMtf5wuvH4DobEsMEpMeEgjCC1feSsdWsruwSH55SINxaXuWsPVk Zqjw== 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 w134-v6si18620747pfd.313.2018.06.11.17.35.59; Mon, 11 Jun 2018 17:36:14 -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 S934779AbeFLAct (ORCPT + 99 others); Mon, 11 Jun 2018 20:32:49 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:40718 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934675AbeFLAcs (ORCPT ); Mon, 11 Jun 2018 20:32:48 -0400 Received: by mail-pf0-f193.google.com with SMTP id z24-v6so11120343pfe.7 for ; Mon, 11 Jun 2018 17:32:48 -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=QCPb3+W8Dc+YjFxnFovwQRs+CT/I6flVV4/pcIUWrPY=; b=jhY2LKf1G78irb6f7vpkE7oMa8tBnCSKeKS2jh1C01NCfYaI2rw00fxdi61ZLuxutK MafTB+M/gWJGKpdHIAMwFZu91ovn/+ofUoM634AOPSGahORu1MitVfu8l2u+GUCupbI8 evnjqYm+OXuX0taHSYO1CdUq6M/2x1ClcHnKRF9t3W0uOD61daURQqbET18Lefum1629 cLzAUi85SJ5B/pi5/In5zeo8k5JHAv2XwMtYtnReh70Ilvjm2kVInI3B3s0+bTfBhmyM stBKfX1j0iYojLrxkxSq9wA4GXivt96fou3RH809BEIyP+wpdUMRAoxQpCBpJ4/DBs1R 06SQ== X-Gm-Message-State: APt69E1lEo/sTp8rF8+UZJzqFMDw2fq6MZ1022DiYApq9XbnypO5nRcC FxqKMO+N/G7qs/V+7258fL6+SA== X-Received: by 2002:a63:6f89:: with SMTP id k131-v6mr1141808pgc.345.1528763567916; Mon, 11 Jun 2018 17:32:47 -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.45 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 11 Jun 2018 17:32:46 -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 0/3] Salted build ids via linker sections Date: Mon, 11 Jun 2018 17:32:21 -0700 Message-Id: <20180612003224.3658-1-labbott@redhat.com> X-Mailer: git-send-email 2.18.0.rc1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This is v4 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. "" v4 takes Linus' suggestion of using linker fill to insert the build id. This removes the need to use a generated header which makes things much easier. One change is that because this section isn't .comment it won't get stripped automatically. This is pretty small but I also know people can be picky so I'm open to opinions or suggestions here. Laura Abbott (3): scripts: Preprocess module-common.lds kbuild: Introduce build-salt linker section and config option x86: Add build salt to the vDSO and kernel linker scripts arch/x86/entry/vdso/vdso-layout.lds.S | 3 ++- arch/x86/kernel/vmlinux.lds.S | 1 + include/asm-generic/vmlinux.lds.h | 6 ++++++ init/Kconfig | 9 +++++++++ scripts/.gitignore | 1 + scripts/Makefile | 2 +- scripts/{module-common.lds => module-common.lds.S} | 4 ++++ 7 files changed, 24 insertions(+), 2 deletions(-) rename scripts/{module-common.lds => module-common.lds.S} (94%) -- 2.18.0.rc1