From patchwork Thu Oct 20 10:38:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Li X-Patchwork-Id: 6149 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp26411wrr; Thu, 20 Oct 2022 03:39:59 -0700 (PDT) X-Google-Smtp-Source: AMsMyM406M959QV0vJ+uzVcxrSM17QztZPBYML5N8UGJKGAu9P67NsRTF+x42IvUZFhAmVPTBynW X-Received: by 2002:a63:513:0:b0:462:f15e:5efc with SMTP id 19-20020a630513000000b00462f15e5efcmr11586094pgf.113.1666262399068; Thu, 20 Oct 2022 03:39:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666262399; cv=none; d=google.com; s=arc-20160816; b=QC22eFVCKqdE6HgH9WCgY87g0yqiluf7rRDGpmlQaoFD1ne9Rwg/7xzMjH36GW7h9o JbMkUnzEu3T9AcG6HCX/NbwU//fUB6n2utuP5G48CKOQ2eEzVHCtKY/3wGyacHYcQsGt pseNg18s0P+U0gEzOC57X+kCwdwhM1NlXKNzlOHg4/QL5Yg2hyR76xwS5QUWABjRe8aO EhpwWBehZdf9OW6zUz9qPZSvOFE2lGfLBkomQ9wKBA2/SWki0G+V8gDgThPLDGHCFjTk dRe0VgditOhNVTNF2C83vCPNO0LkxHVoUsrLE7oB9a/0//tVTMZvTQDLfu/C9Hge5UzQ yQ5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=Te4rLpHNvJyllNsKPSaW2YvWeVYj0zcpsIqOp8qcRVs=; b=I2Qu+MhDzCY+v9u6zlNArBrQ5ZqIWyLEBoz8moaKy9Ufr/1j9oO7k38tpMPe8FrzWy ZVwFRXu9TG9b0N3FuCdRkmlJN+0duyyuitOHA9mdD581NGJaII4EKNOo1OoOXsODz85P YVyji5UzWkLxA28L5lKvgNwUC/yONTwyodqTAQ3NpelNUEpjojT+3GJIkkZnBdX+ddFs ioSbiRZ88gPP6FjsIwIE/Uo0hz8DBHXTUNi3gjxueZLh2+yZpu6S16WUxpOtrfwbcZpx vkCg7SI7LntRR5Q7u6JbmPLR/a9ZM2KVenNUCA/mK6/EnueQTP9NUcea3WvInhjIpeyV perA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g63-20020a636b42000000b0046004f18c6csi21243426pgc.456.2022.10.20.03.39.45; Thu, 20 Oct 2022 03:39:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229988AbiJTKjX (ORCPT + 99 others); Thu, 20 Oct 2022 06:39:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231181AbiJTKir (ORCPT ); Thu, 20 Oct 2022 06:38:47 -0400 Received: from out30-131.freemail.mail.aliyun.com (out30-131.freemail.mail.aliyun.com [115.124.30.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA1851DEC20; Thu, 20 Oct 2022 03:38:35 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R331e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045176;MF=ashimida@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VSeueAo_1666262304; Received: from localhost(mailfrom:ashimida@linux.alibaba.com fp:SMTPD_---0VSeueAo_1666262304) by smtp.aliyun-inc.com; Thu, 20 Oct 2022 18:38:31 +0800 From: Dan Li To: masahiroy@kernel.org, michal.lkml@markovi.net, ndesaulniers@google.com, corbet@lwn.net Cc: linux-kbuild@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Dan Li Subject: [RFC] Documentation: kbuild: Add description of git for reproducible builds Date: Thu, 20 Oct 2022 03:38:23 -0700 Message-Id: <20221020103823.31001-1-ashimida@linux.alibaba.com> X-Mailer: git-send-email 2.17.1 X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747202761649557321?= X-GMAIL-MSGID: =?utf-8?q?1747202761649557321?= The status of git will affect the final compilation result, add it to the documentation of reproducible builds. Signed-off-by: Dan Li --- Documentation/kbuild/reproducible-builds.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Documentation/kbuild/reproducible-builds.rst b/Documentation/kbuild/reproducible-builds.rst index 071f0151a7a4..13397f38c358 100644 --- a/Documentation/kbuild/reproducible-builds.rst +++ b/Documentation/kbuild/reproducible-builds.rst @@ -119,6 +119,16 @@ To avoid this, you can make the vDSO different for different kernel versions by including an arbitrary string of "salt" in it. This is specified by the Kconfig symbol ``CONFIG_BUILD_SALT``. +Git +----------------------- + +Uncommitted changes or different commit ids in git can also lead +to different compilation results. For example, after executing +``git reset HEAD^``, even if the code is the same, the +``include/config/kernel.release`` generated during compilation +will be different, which will eventually lead to binary differences. +See ``scripts/setlocalversion`` for details. + .. _KBUILD_BUILD_TIMESTAMP: kbuild.html#kbuild-build-timestamp .. _KBUILD_BUILD_USER and KBUILD_BUILD_HOST: kbuild.html#kbuild-build-user-kbuild-build-host .. _KCFLAGS: kbuild.html#kcflags