From nobody Fri Oct 2 12:20:00 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C483342CB07; Fri, 31 Jul 2026 13:03:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785502985; cv=none; b=QhZ4U66447jS6D72C/lEKFKaLTTIuwk0Knu/+lOw9sSz8TCabcffEyiM7cNA0O4NomEErlYSX/wXz0Q1E8FBpULex+V4KxefADf2tsPLeP+cN/kpsMACdEPYVjjYrHRQkrEl6e1mQz2/96MZI+S+3ais41E9yvXA6csqQXIyx6Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785502985; c=relaxed/simple; bh=YvhAS+jqIEopvMBRFPP4PuvgS21KN+zPGPaVhgmWBjs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kpRqlor69EzErP+1vxMo1/GWeyaXwfSzZ4ZJYkJBwdOZ7SJ7T4EU7dIFnp6M0ulJZtJlM0xpobDOvJTRb0KkWG+2cKc9erwfTXBvieLpUyX2N8STryatawdMHkkgP7q3+bvHJH+dreVUm6yk6NKAVRHiOeGkxZ4/ZWymKysLKXE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=Fgo80dGi; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="Fgo80dGi" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 043FF1F000E9; Fri, 31 Jul 2026 13:03:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785502983; bh=Z9eknygJ64zVXB4Xgdrr0GdVp/4tpYnJSHY3Y16u6BE=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=Fgo80dGikgWpRNlM8F87BPlHBOQwUYYe+jvS6hO9GSky5B4XpWONafXcNvAKnNBzk RsHFuhmpKbMuWjQ1OYeN4PJyGJ86YywYuNuQ9C0vMKKSePIVh8CYKQ7G9XROMLPvbq XUcnAqQQyuPG63VRQt8a5DQdRj5qWMBoAM8BSF/M= From: Greg Kroah-Hartman Date: Fri, 31 Jul 2026 15:02:23 +0200 Subject: [PATCH v2 1/2] module: remove MODULE_VERSION() Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260731-module_ver_remove-v2-1-c9163858f382@linuxfoundation.org> References: <20260731-module_ver_remove-v2-0-c9163858f382@linuxfoundation.org> In-Reply-To: <20260731-module_ver_remove-v2-0-c9163858f382@linuxfoundation.org> To: Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Shyam Saini , Kees Cook , Thorsten Blum , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, Greg Kroah-Hartman Cc: Christoph Hellwig X-Mailer: b4 0.16-dev-401aa X-Developer-Signature: v=1; a=openpgp-sha256; l=9004; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=YvhAS+jqIEopvMBRFPP4PuvgS21KN+zPGPaVhgmWBjs=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk5c77e6ZtU/vrHoXSOnB0y/RJnnxh8OhO8uTRDjWtSi /DKKo7CjlgWBkEmBlkxRZYv23iO7q84pOhlaHsaZg4rE8gQBi5OAZjIYXeG+RFLw5vkLy16sptl XmONJvuFU0em6jMsuFAhuf+hYAPX5mQJ7jOqRbFzFD5sBQA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Module "versions" do not make sense as the kernel is built all at once, the "version" is the overall kernel version number, so modules can not really be described as having a unique version given that they rely on the infrastructure of the whole kernel. For now, just make this an "empty" define, to keep existing code building properly as the tree is slowly purged of the use of this over time. This macro will be removed entirely in the future when there are no in-tree users. Cc: Luis Chamberlain Cc: Petr Pavlu Cc: Daniel Gomez Cc: Sami Tolvanen Cc: Aaron Tomlin Cc: Shyam Saini Cc: Kees Cook Cc: Thorsten Blum Reviewed-by: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman --- Documentation/ABI/stable/sysfs-module | 6 ---- arch/x86/tools/relocs.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 7 +--- include/asm-generic/vmlinux.lds.h | 5 --- include/linux/module.h | 57 ++++++----------------------= ---- kernel/module/main.c | 2 -- kernel/params.c | 30 ----------------- 7 files changed, 12 insertions(+), 96 deletions(-) diff --git a/Documentation/ABI/stable/sysfs-module b/Documentation/ABI/stab= le/sysfs-module index 41b1f16e8795..7a3cdd8a8d9f 100644 --- a/Documentation/ABI/stable/sysfs-module +++ b/Documentation/ABI/stable/sysfs-module @@ -39,9 +39,3 @@ Date: Jun 2005 Description: If the module source has MODULE_VERSION, this file will contain the checksum of the source code. - -What: /sys/module//version -Date: Jun 2005 -Description: - If the module source has MODULE_VERSION, this file will contain - the version of the source code. diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c index e5a2b9a912d1..1426ddcb3a89 100644 --- a/arch/x86/tools/relocs.c +++ b/arch/x86/tools/relocs.c @@ -81,7 +81,6 @@ static const char * const sym_regex_kernel[S_NSYMTYPES] = =3D { "__(start|stop)___ksymtab(_gpl)?|" "__(start|stop)___kcrctab(_gpl)?|" "__(start|stop)___param|" - "__(start|stop)___modver|" "__(start|stop)___bug_table|" "__tracedata_(start|end)|" "__(start|stop)_notes|" diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd= /amdgpu/amdgpu_virt.c index 9e8f7d2b898c..a1ca1bc27f93 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c @@ -677,12 +677,7 @@ static int amdgpu_virt_write_vf2pf_data(struct amdgpu_= device *adev) vf2pf_info->header.size =3D sizeof(struct amd_sriov_msg_vf2pf_info); vf2pf_info->header.version =3D AMD_SRIOV_MSG_FW_VRAM_VF2PF_VER; =20 -#ifdef MODULE - if (THIS_MODULE->version !=3D NULL) - strscpy(vf2pf_info->driver_version, THIS_MODULE->version); - else -#endif - strscpy(vf2pf_info->driver_version, "N/A"); + strscpy(vf2pf_info->driver_version, "N/A"); =20 vf2pf_info->pf2vf_version_required =3D 0; // no requirement, guest unders= tands all vf2pf_info->driver_cert =3D 0; diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinu= x.lds.h index 5659f4b5a125..80bc90ec9ee1 100644 --- a/include/asm-generic/vmlinux.lds.h +++ b/include/asm-generic/vmlinux.lds.h @@ -544,11 +544,6 @@ BOUNDED_SECTION_BY(__param, ___param) \ } \ \ - /* Built-in module versions. */ \ - __modver : AT(ADDR(__modver) - LOAD_OFFSET) { \ - BOUNDED_SECTION_BY(__modver, ___modver) \ - } \ - \ KCFI_TRAPS \ \ RO_EXCEPTION_TABLE \ diff --git a/include/linux/module.h b/include/linux/module.h index 7566815fabbe..209b6a388be7 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -62,15 +62,6 @@ struct module_attribute { void (*free)(struct module *); }; =20 -struct module_version_attribute { - struct module_attribute mattr; - const char *module_name; - const char *version; -}; - -extern ssize_t __modver_version_show(const struct module_attribute *, - struct module_kobject *, char *); - extern const struct module_attribute module_uevent; =20 /* These are either module local, or the kernel's dummy ones. */ @@ -256,43 +247,18 @@ struct module_kobject *lookup_or_create_module_kobjec= t(const char *name); static typeof(name) __mod_device_table(type, name) \ __attribute__ ((used, alias(__stringify(name)))) =20 -/* Version of form [:][-]. - * Or for CVS/RCS ID version, everything but the number is stripped. - * : A (small) unsigned integer which allows you to start versions - * anew. If not mentioned, it's zero. eg. "2:1.0" is after - * "1:2.0". - - * : The may contain only alphanumerics and the - * character `.'. Ordered by numeric sort for numeric parts, - * ascii sort for ascii parts (as per RPM or DEB algorithm). - - * : Like , but inserted for local - * customizations, eg "rh3" or "rusty1". - - * Using this automatically adds a checksum of the .c files and the - * local headers in "srcversion". +/* + * Module "versions" do not make sense as the kernel is built all at once,= the + * "version" is the overall kernel version number, so modules can not real= ly be + * described as having a unique version given that they rely on the + * infrastructure of the whole kernel. + * + * For now, just make this an "empty" define, to keep existing code buildi= ng + * properly as the tree is slowly purged of the use of this over time. + * + * It will be removed in the future when there are no in-tree users. */ - -#if defined(MODULE) || !defined(CONFIG_SYSFS) -#define MODULE_VERSION(_version) MODULE_INFO(version, _version) -#else -#define MODULE_VERSION(_version) \ - MODULE_INFO(version, _version); \ - static const struct module_version_attribute __modver_attr \ - __used __section("__modver") \ - __aligned(__alignof__(struct module_version_attribute)) \ - =3D { \ - .mattr =3D { \ - .attr =3D { \ - .name =3D "version", \ - .mode =3D S_IRUGO, \ - }, \ - .show =3D __modver_version_show, \ - }, \ - .module_name =3D KBUILD_MODNAME, \ - .version =3D _version, \ - } -#endif +#define MODULE_VERSION(_version) =20 /* Optional firmware file (or files) needed by the module * format is simply firmware file name. Multiple firmware @@ -411,7 +377,6 @@ struct module { /* Sysfs stuff. */ struct module_kobject mkobj; struct module_attribute *modinfo_attrs; - const char *version; const char *srcversion; const char *imported_namespaces; struct kobject *holders_dir; diff --git a/kernel/module/main.c b/kernel/module/main.c index 46dd8d25a605..da8be9788d13 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -602,7 +602,6 @@ static const struct module_attribute modinfo_##field = =3D { \ .free =3D free_modinfo_##field, \ }; =20 -MODINFO_ATTR(version); MODINFO_ATTR(srcversion); =20 static void setup_modinfo_import_ns(struct module *mod, const char *s) @@ -1084,7 +1083,6 @@ static const struct module_attribute modinfo_taint = =3D =20 const struct module_attribute *const modinfo_attrs[] =3D { &module_uevent, - &modinfo_version, &modinfo_srcversion, &modinfo_import_ns, &modinfo_initstate, diff --git a/kernel/params.c b/kernel/params.c index a668863a4bb6..6c5a1eb22b25 100644 --- a/kernel/params.c +++ b/kernel/params.c @@ -837,35 +837,6 @@ static void __init param_sysfs_builtin(void) } } =20 -ssize_t __modver_version_show(const struct module_attribute *mattr, - struct module_kobject *mk, char *buf) -{ - const struct module_version_attribute *vattr =3D - container_of_const(mattr, struct module_version_attribute, mattr); - - return scnprintf(buf, PAGE_SIZE, "%s\n", vattr->version); -} - -extern const struct module_version_attribute __start___modver[]; -extern const struct module_version_attribute __stop___modver[]; - -static void __init version_sysfs_builtin(void) -{ - const struct module_version_attribute *vattr; - struct module_kobject *mk; - int err; - - for (vattr =3D __start___modver; vattr < __stop___modver; vattr++) { - mk =3D lookup_or_create_module_kobject(vattr->module_name); - if (mk) { - err =3D sysfs_create_file(&mk->kobj, &vattr->mattr.attr); - WARN_ON_ONCE(err); - kobject_uevent(&mk->kobj, KOBJ_ADD); - kobject_put(&mk->kobj); - } - } -} - /* module-related sysfs stuff */ =20 static ssize_t module_attr_show(struct kobject *kobj, @@ -968,7 +939,6 @@ static int __init param_sysfs_builtin_init(void) if (!module_kset) return -ENOMEM; =20 - version_sysfs_builtin(); param_sysfs_builtin(); =20 return 0; --=20 2.55.0 From nobody Fri Oct 2 12:20:00 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D1DF842DA50; Fri, 31 Jul 2026 13:03:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785502988; cv=none; b=ZTFDjeGXns26bVraZAXNCuyjHM6iraekiOGVyzTxBNQCwS7+G7d3yA9AbSnufitUzOSh0qrC/RTNKnHC0IXe1JQVRthOoiuA1qBZe/aPuV/QbRBR7GzqcUp3wfgEP1At4EA/J76sz5VFy0CIpifmhsokq7rINDJ9jWqWQtdIR4k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785502988; c=relaxed/simple; bh=V2wxZhoHVWffRIKfCoiokWovc+AjWq81unlflacOnC8=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qrUhrf9CgNLZOAk2QO2g7I3t567tsNChHbV564qUymW1+zFPcaDsGm2iAI+wimje9hPOozmMXyw6edhvNzGXzZ9cU/qf2Fgg5Vp855/bMjo00OaFUjZrtqYGS3MARP0WyFZqiYzo1MovzUEXk+uNFjiTIrlbnrhj2UznBGOeRzE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=t3J/jFNy; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="t3J/jFNy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id ACFDD1F000E9; Fri, 31 Jul 2026 13:03:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1785502986; bh=lKfeHMMS/JD2JJc1HXDMovraIG2bbsZFo6mnqo0AZoc=; h=From:Date:Subject:References:In-Reply-To:To:Cc; b=t3J/jFNytldqjR/03kuxJMX4mPim2tDXWvLGuwRGjJyf/WSpbVsfGeEfJkPput73Z coxB1ALbZgmO42TLY6TBKBGlpJ0bCyjNZKVj9rOcO5HeStV1yv2gl/YFx9gJd/Mwdo 0IsWoQZ27dJUbDULl9lqGgGJmoSffwC/m4F6Odq0= From: Greg Kroah-Hartman Date: Fri, 31 Jul 2026 15:02:24 +0200 Subject: [PATCH v2 2/2] module: remove srcversion module attribute Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20260731-module_ver_remove-v2-2-c9163858f382@linuxfoundation.org> References: <20260731-module_ver_remove-v2-0-c9163858f382@linuxfoundation.org> In-Reply-To: <20260731-module_ver_remove-v2-0-c9163858f382@linuxfoundation.org> To: Luis Chamberlain , Petr Pavlu , Daniel Gomez , Sami Tolvanen , Aaron Tomlin , Shyam Saini , Kees Cook , Thorsten Blum , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-modules@vger.kernel.org, Greg Kroah-Hartman Cc: Christoph Hellwig X-Mailer: b4 0.16-dev-401aa X-Developer-Signature: v=1; a=openpgp-sha256; l=8802; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=V2wxZhoHVWffRIKfCoiokWovc+AjWq81unlflacOnC8=; b=owGbwMvMwCRo6H6F97bub03G02pJDFk5c76JXmZYeqjS/9WugPpFcleENjpNSLbUXXP2x5t47 r28Nsu+dMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEFvgyLOg5p6p2p8bedO1h iaK2bmXhqntFOgwLdrDMnHqTvXLDNaGTjJLJC74Iir2WAwA= X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Now that module versions are gone, there is no need for srcversion either. So drop the logic for this from both the kernel and the helper module tools. Cc: Luis Chamberlain Cc: Petr Pavlu Cc: Daniel Gomez Cc: Sami Tolvanen Cc: Aaron Tomlin Cc: Shyam Saini Cc: Kees Cook Cc: Thorsten Blum Cc: Christoph Hellwig Signed-off-by: Greg Kroah-Hartman Reviewed-by: Christoph Hellwig --- Documentation/ABI/stable/sysfs-module | 6 ------ drivers/block/drbd/drbd_buildtag.c | 7 +------ include/linux/module.h | 1 - kernel/module/Kconfig | 11 ----------- kernel/module/main.c | 30 ------------------------------ scripts/Makefile.modpost | 1 - scripts/mod/modpost.c | 24 ------------------------ scripts/mod/modpost.h | 1 - 8 files changed, 1 insertion(+), 80 deletions(-) diff --git a/Documentation/ABI/stable/sysfs-module b/Documentation/ABI/stab= le/sysfs-module index 7a3cdd8a8d9f..5c028af9921a 100644 --- a/Documentation/ABI/stable/sysfs-module +++ b/Documentation/ABI/stable/sysfs-module @@ -33,9 +33,3 @@ Description: Note: If the module is built into the kernel, or if the CONFIG_MODULE_UNLOAD kernel configuration value is not enabled, this file will not be present. - -What: /sys/module//srcversion -Date: Jun 2005 -Description: - If the module source has MODULE_VERSION, this file will contain - the checksum of the source code. diff --git a/drivers/block/drbd/drbd_buildtag.c b/drivers/block/drbd/drbd_b= uildtag.c index cd0389488f63..22f1e842f9ce 100644 --- a/drivers/block/drbd/drbd_buildtag.c +++ b/drivers/block/drbd/drbd_buildtag.c @@ -10,13 +10,8 @@ const char *drbd_buildtag(void) =20 static char buildtag[38] =3D "\0uilt-in"; =20 - if (buildtag[0] =3D=3D 0) { -#ifdef MODULE - sprintf(buildtag, "srcversion: %-24s", THIS_MODULE->srcversion); -#else + if (buildtag[0] =3D=3D 0) buildtag[0] =3D 'b'; -#endif - } =20 return buildtag; } diff --git a/include/linux/module.h b/include/linux/module.h index 209b6a388be7..cafb99479966 100644 --- a/include/linux/module.h +++ b/include/linux/module.h @@ -377,7 +377,6 @@ struct module { /* Sysfs stuff. */ struct module_kobject mkobj; struct module_attribute *modinfo_attrs; - const char *srcversion; const char *imported_namespaces; struct kobject *holders_dir; =20 diff --git a/kernel/module/Kconfig b/kernel/module/Kconfig index 43b1bb01fd27..e27f12778e24 100644 --- a/kernel/module/Kconfig +++ b/kernel/module/Kconfig @@ -238,17 +238,6 @@ config BASIC_MODVERSIONS =20 endif # MODVERSIONS =20 -config MODULE_SRCVERSION_ALL - bool "Source checksum for all modules" - help - Modules which contain a MODULE_VERSION get an extra "srcversion" - field inserted into their modinfo section, which contains a - sum of the source files which made it. This helps maintainers - see exactly which source was used to build a module (since - others sometimes change the module source without updating - the version). With this option, such a "srcversion" field - will be created for all modules. If unsure, say N. - config MODULE_SIG bool "Module signature verification" select MODULE_SIG_FORMAT diff --git a/kernel/module/main.c b/kernel/module/main.c index da8be9788d13..5f590ce90f2d 100644 --- a/kernel/module/main.c +++ b/kernel/module/main.c @@ -575,35 +575,6 @@ bool __is_module_percpu_address(unsigned long addr, un= signed long *can_addr) =20 #endif /* CONFIG_SMP */ =20 -#define MODINFO_ATTR(field) \ -static void setup_modinfo_##field(struct module *mod, const char *s) \ -{ \ - mod->field =3D kstrdup(s, GFP_KERNEL); \ -} \ -static ssize_t show_modinfo_##field(const struct module_attribute *mattr, \ - struct module_kobject *mk, char *buffer) \ -{ \ - return scnprintf(buffer, PAGE_SIZE, "%s\n", mk->mod->field); \ -} \ -static int modinfo_##field##_exists(struct module *mod) \ -{ \ - return mod->field !=3D NULL; \ -} \ -static void free_modinfo_##field(struct module *mod) \ -{ \ - kfree(mod->field); \ - mod->field =3D NULL; \ -} \ -static const struct module_attribute modinfo_##field =3D { \ - .attr =3D { .name =3D __stringify(field), .mode =3D 0444 }, \ - .show =3D show_modinfo_##field, \ - .setup =3D setup_modinfo_##field, \ - .test =3D modinfo_##field##_exists, \ - .free =3D free_modinfo_##field, \ -}; - -MODINFO_ATTR(srcversion); - static void setup_modinfo_import_ns(struct module *mod, const char *s) { mod->imported_namespaces =3D NULL; @@ -1083,7 +1054,6 @@ static const struct module_attribute modinfo_taint = =3D =20 const struct module_attribute *const modinfo_attrs[] =3D { &module_uevent, - &modinfo_srcversion, &modinfo_import_ns, &modinfo_initstate, &modinfo_coresize, diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost index d7d45067d08b..b6c1467cf527 100644 --- a/scripts/Makefile.modpost +++ b/scripts/Makefile.modpost @@ -45,7 +45,6 @@ modpost-args =3D \ $(if $(CONFIG_MODVERSIONS),-m) \ $(if $(CONFIG_BASIC_MODVERSIONS),-b) \ $(if $(CONFIG_EXTENDED_MODVERSIONS),-x) \ - $(if $(CONFIG_MODULE_SRCVERSION_ALL),-a) \ $(if $(CONFIG_SECTION_MISMATCH_WARN_ONLY),,-E) \ $(if $(KBUILD_MODPOST_WARN),-w) \ $(if $(KBUILD_NSDEPS),-d modules.nsdeps) \ diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index a7b72a81d248..2e969be7f414 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -33,8 +33,6 @@ static bool module_enabled; /* Are we using CONFIG_MODVERSIONS? */ static bool modversions; -/* Is CONFIG_MODULE_SRCVERSION_ALL set? */ -static bool all_versions; /* Is CONFIG_BASIC_MODVERSIONS set? */ static bool basic_modversions; /* Is CONFIG_EXTENDED_MODVERSIONS set? */ @@ -1584,7 +1582,6 @@ static void mod_set_crcs(struct module *mod) static void read_symbols(const char *modname) { const char *symname; - char *version; char *license; char *namespace; struct module *mod; @@ -1645,13 +1642,6 @@ static void read_symbols(const char *modname) =20 check_sec_ref(mod, &info); =20 - if (!mod->is_vmlinux) { - version =3D get_modinfo(&info, "version"); - if (version || all_versions) - get_src_version(mod->name, mod->srcversion, - sizeof(mod->srcversion) - 1); - } - parse_elf_finish(&info); =20 if (modversions) { @@ -2035,15 +2025,6 @@ static void add_depends(struct buffer *b, struct mod= ule *mod) buf_printf(b, "\");\n"); } =20 -static void add_srcversion(struct buffer *b, struct module *mod) -{ - if (mod->srcversion[0]) { - buf_printf(b, "\n"); - buf_printf(b, "MODULE_INFO(srcversion, \"%s\");\n", - mod->srcversion); - } -} - static void write_buf(struct buffer *b, const char *fname) { FILE *file; @@ -2149,8 +2130,6 @@ static void write_mod_c_file(struct module *mod) free(alias); } =20 - add_srcversion(&buf, mod); - ret =3D snprintf(fname, sizeof(fname), "%s.mod.c", mod->name); if (ret >=3D sizeof(fname)) { error("%s: too long path was truncated\n", fname); @@ -2327,9 +2306,6 @@ int main(int argc, char **argv) case 'o': dump_write =3D optarg; break; - case 'a': - all_versions =3D true; - break; case 'T': files_source =3D optarg; break; diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index 2aecb8f25c87..2c2f1d2b4021 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -126,7 +126,6 @@ struct module { bool seen; bool has_init; bool has_cleanup; - char srcversion[25]; // Missing namespace dependencies struct list_head missing_namespaces; // Actual imported namespaces --=20 2.55.0