Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp686574rwi; Thu, 20 Oct 2022 04:09:13 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7CjLMFsbP6OnYBI7ZGR8aZzO8MmIShF6Ki2p/XR/Q1/n+U2vT/42A9ha81OyLQ/dUE++eb X-Received: by 2002:a17:902:d4c8:b0:186:6180:fb8e with SMTP id o8-20020a170902d4c800b001866180fb8emr3166687plg.132.1666264153405; Thu, 20 Oct 2022 04:09:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666264153; cv=none; d=google.com; s=arc-20160816; b=CBtZQg78KgmH38VoLIhMssyNsV6wj6E5YWuJF6OCu1hzBbqFXsU//vP8PkvCJtfVLW o3aZvD0S/MB2yGA1ydWipTyCDsiweaBnW08RhF0+d4tjBF/SmGebhHMPfzbSW88x0JLX 07eZfDK4y86WtuXeuFYk58NJw4DBdxJ/YaXAKK0BT8xQQ7kVj+ms3F1fO5Hgwhg+gyas kOTaSYgyDYF5Jtkc89mxneYYkd3y3pnd3EDSZtuzFaVUTVpoSiNoNxI7N00D2ss0qmmc fYnRzmLh/dMSEldBloAaLv0lS6FWP8vI5ZbjD5EU+bqNOS2PvYN2GcIcVCKYlvxdQ4Ae yf4g== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e10-20020a170902f10a00b00182a9c27a9csi1605898plb.603.2022.10.20.04.09.00; Thu, 20 Oct 2022 04:09:13 -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 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 -- 2.17.1