Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp385885pxb; Wed, 3 Feb 2021 07:48:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJ6EZcCBq4BRMxEgw6rgYu6YKaawI3ji+eRYkAvOsNzG1jDw6woPhW2+rq1R6+ZDWkbDYu X-Received: by 2002:a17:906:4051:: with SMTP id y17mr1328544ejj.45.1612367319486; Wed, 03 Feb 2021 07:48:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612367319; cv=none; d=google.com; s=arc-20160816; b=KUMH32X/3fb49C9nQVuPrtRbK37eD5vh1pjrNgo1TaR4KM6vBCLdnGBQzqg9P9Udf4 ejNLuRgda0Nd5SukZh17A5oHzxIgYJHiYBSbhNX8EJOgfB5Rq5WV0O8JKdhA7yB8zw6u YKqLkcy5XEb61jFp8HmlcGsyg11EPa2tKg0GYuFXVx3uEO56KAtgRQZTQbdVj/9SL8/q +F1MrI76TJk6qD3hDAx+jmaNvaVaS+elZNOTbbAil9k9L+QebHIQXskJsy1hRRoZW0tb dGRVJx/wXU8+jwApqF69ENiaKtYaQNLCKxup9gpcccgnDLGePhP7V4Lk3LVW6k/Uy58H BMrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=glbfSru0IR1J25EOpT2tvJikf2FNZ+LHPVFRfOOZ1ww=; b=fir4wtS4/6kZlEY3Oc9+CIlha2bDz8CYdrv8dZtlnblxEcV/nM+6x4qAQCVUsYv7ZH /tA0wRV6bLKLPSBz+BtbseK5xdguhVV7MqUprxhfhgv6a/RlRVIeBJavW1Zj37FiIbyc F1YexiucQi6kTjTkKlyoUbFxQINg8kobKP2Rg12TWzJuedp8J1Iwkpllwi7XjpFaU3nv zja6r5xkEaEUUSvkFGrD4znkOhK82IFApIxDIV9Ku+QNtrNpqMHQ0tuN6C3Qfp2EWHUB PpKQW0QQlHNKnQHD7/O3qk0EZCVFhh8mvXlPrbfVrx4satD1TYYj/vZ/eMSlukYJGuEJ 0Gqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eZ88J2hD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d17si1597582edv.89.2021.02.03.07.48.15; Wed, 03 Feb 2021 07:48:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eZ88J2hD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234583AbhBCPrX (ORCPT + 99 others); Wed, 3 Feb 2021 10:47:23 -0500 Received: from mail.kernel.org ([198.145.29.99]:59712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234560AbhBCPrE (ORCPT ); Wed, 3 Feb 2021 10:47:04 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 04F2864D9E; Wed, 3 Feb 2021 15:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612367182; bh=96x1/gBkvEl/hdEhVih245wwQ8gSXLwBaaP/RpbNLi4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eZ88J2hDrL3Gx+bCkm3uaUIRUGjlgd2l0hVAr11i0rxmq/mRmZ4r9/WSrDWEtrSAd owZ7ZRRz/v9ugZgC+YMCD+dVAmve+0e0/XuUjH9LhzKl0tI62UHYfSq8bgSerrkahh AvbcrH9X/isX7kBaR25uYsvtZAyjnEAKfhvprC3Ycio48ebfcydtQfhylXzVrXEbZt 9J1vNcOh2U7YrBH8qK9r7ijmidlAEvSh2yD/HUQomMJX7Sv/Xa+2PiIX4/MZEJXpds cDM2M+XcpR+i1+VfXT9NLyPH0kY3xIcN0v2O64excYd3OTmUjlHsCxYwLqBJcZN66l /zVmj40HlvWnw== Date: Wed, 3 Feb 2021 16:46:16 +0100 From: Jessica Yu To: Will McVicker Cc: Masahiro Yamada , Michal Marek , Greg Kroah-Hartman , Christoph Hellwig , Saravana Kannan , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, kernel-team@android.com Subject: Re: [PATCH v6] modules: introduce the MODULE_SCMVERSION config Message-ID: References: <20210121213641.3477522-1-willmcvicker@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <20210121213641.3477522-1-willmcvicker@google.com> X-OS: Linux gunter 5.10.9-1-default x86_64 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +++ Will McVicker [21/01/21 21:36 +0000]: >Config MODULE_SCMVERSION introduces a new module attribute -- >`scmversion` -- which can be used to identify a given module's SCM >version. This is very useful for developers that update their kernel >independently from their kernel modules or vice-versa since the SCM >version provided by UTS_RELEASE (`uname -r`) will now differ from the >module's vermagic attribute. > >For example, we have a CI setup that tests new kernel changes on the >hikey960 and db845c devices without updating their kernel modules. When >these tests fail, we need to be able to identify the exact device >configuration the test was using. By including MODULE_SCMVERSION, we can >identify the exact kernel and modules' SCM versions for debugging the >failures. > >Additionally, by exposing the SCM version via the sysfs node >/sys/module/MODULENAME/scmversion, one can also verify the SCM versions >of the modules loaded from the initramfs. Currently, modinfo can only >retrieve module attributes from the module's ko on disk and not from the >actual module that is loaded in RAM. > >You can retrieve the SCM version in two ways, > >1) By using modinfo: > > modinfo -F scmversion MODULENAME >2) By module sysfs node: > > cat /sys/module/MODULENAME/scmversion Hi Will, First off, thanks for being patient and being responsive throughout the patch review process. Personally, I am rather neutral towards this feature. We already provide CONFIG_MODULE_SRCVERSION to provide a checksum of a module's source files and I think the SCMVERSION is a nicer alternative. I can see how an optional scmversion field might be helpful information for distro developers in testing environments and in situations where it is possible for the kernel and modules to be updated/packaged separately (for instance, the kernel selftest modules under lib/ are in-tree modules that are provided as a separate kernel module package in SLE). Generally, out of principle, I do not want to merge a patch that's been NAK'd repeatedly; even if I take the patch it'd likely be contested all the way up to the merge window. So this boils down to whether Christoph (and maybe Greg) are fine with this being a debug option that's not enabled by default. Thanks, Jessica