Bug 1349651

Summary: [RFE] Enable MODULE_COMPRESS for compressed kernel modules
Product: [Fedora] Fedora Reporter: Christian Kujau <redhat>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: rawhideCC: gansalmon, itamar, jonathan, kernel-maint, madhu.chinakonda, mchehab
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-29 23:03:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Christian Kujau 2016-06-23 21:42:30 UTC
Right now, kernel modules are compressed after they are built and before they're packaged into an RPM:

> kernel.spec: xz compress modules on i686 and x86_64
> https://lists.fedoraproject.org/pipermail/kernel/2014-May/005253.html
> http://pkgs.fedoraproject.org/cgit/rpms/kernel.git/commit/?id=8922622

While this is (really) great, the Linux kernel supports compressed modules since v3.18 (i.e. shortly after Fedora switched to compressed moduled):

> kbuild: handle module compression while running 'make modules_install'
> https://git.kernel.org/linus/beb50df39e91745604ce3cb9dc6a503f39f4383d

From the commit message:

  > Since module-init-tools (gzip) and kmod (gzip and xz) support compressed
  > modules, it could be useful to include a support for compressing modules
  > right after having them installed. Doing this in kbuild instead of per
  > distro can permit to make this kind of usage more generic.

Comment 1 Josh Boyer 2016-06-24 00:27:20 UTC
Thanks for the report, but we already know this.

We need to evaluate whether or not this will work with the debuginfo mechanism that RPM provides.  I actually don't believe it does, because AFAIK we have to leave all of the modules intact in the %install phase so that find-debuginfo can run and extract it properly.  Then we sign and compress the modules.

This just needs to be confirmed (or proven wrong).

Comment 2 Christian Kujau 2022-11-29 23:03:43 UTC
Going through old bug reports and stumbled over this...from 2016, wow - I even forgot that I reported this. So, in Fedora 37 we still have CONFIG_MODULE_COMPRESS_NONE=y set and I guess nobody else cares. And I don't really care much about this either: the current mechanism works, and re-working all that package building machinery and find-debuginfo to deal with compressed modules just to be able to say "yes, we do use that kernel feature" may be a waste of time, when there are much more pressing issues. With that, I'm closing this one for now. Feel free to re-open if this really needs to be implemented. Thanks.