Bug 134744

Summary: RHEL4: modules: put srcversion checksum in each modinfo section
Product: Red Hat Enterprise Linux 4 Reporter: Matt Domsch <matt_domsch>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: dwmw2, katzj, pfrields, tburke, us_linux_engineering
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-08 21:20:01 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 135876    
Attachments:
Description Flags
linux-2.6.9-rc3-srcversion.patch none

Description Matt Domsch 2004-10-05 22:15:58 UTC
Date: Tue, 5 Oct 2004 17:02:11 -0500
From: Matt Domsch <Matt_Domsch>
To: akpm, Rusty Russell <rusty.au>
Cc: linux-kernel.org
Subject: [PATCH 2.6.9-rc3] modules: put srcversion checksum in each 
modinfo 
section

Separate the module source and header checksum into a separate 
modinfo field 
srcversion.
With CONFIG_MODULE_SRCVERSION_ALL=y, put srcversion into every module,
not just those with MODULE_VERSION("something").

Patch by Rusty Russell, trivial merging and testing by Matt Domsch

Signed-off-by: Matt Domsch <Matt_Domsch>

 include/linux/module.h   |    6 +--
 init/Kconfig             |   12 +++++++
 scripts/Makefile.modpost |    1
 scripts/mod/modpost.c    |   65 +++++++++++++++++++++++++++++++++++--
-
 scripts/mod/modpost.h    |   10 +++--
 scripts/mod/sumversion.c |   80 ++++++++-----------------------------
---------
-
 6 files changed, 96 insertions, 78 deletions


DKMS could use this information to tell if a driver source has 
changed or not, 
regardless of if the driver author put a MODULE_VERSION() tag in it.

w/o patch, modinfo doesn't show a 'srcversion' field
w patch and CONFIG_MODULE_SRCVERSION_ALL=y, modinfo shows 
a 'srcversion' field 
for all modules.

Comment 1 Matt Domsch 2004-10-05 22:16:45 UTC
Created attachment 104813 [details]
linux-2.6.9-rc3-srcversion.patch

Patch sent to akpm today.

Comment 3 Matt Domsch 2004-10-21 14:33:51 UTC
This patch was just committed to Linus's 2.6 bitkeeper repo.

Comment 8 Tim Burke 2004-11-08 21:20:01 UTC
Matt,

Our intention is include the MODULE_VERSION in all of the main network
and storage drivers in RHEL4 RC.  In conjunction, we are implementing
the RPM based dependencies which Jeremy described to you. We can't
really make use of the checksum from a versioning standpoint. Unless
we went through the unmaintainable trauma of having a database of
every shipped driver & respective version. 

For this reason, the incremental value of adding in this change isn't
compelling to put in this late in the game.  In a later update, when
we rebase, it would then be picked up. 


Comment 9 Matt Domsch 2004-11-08 21:27:15 UTC
OK, but you probably won't rebase for an update, so it becomes a "you 
get it for free in RHEL5" thing.