failed to load large compressed kernel modules in mantic with 6.5

Bug #2032674 reported by Andrea Righi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kmod (Ubuntu)
Fix Released
Undecided
Dimitri John Ledkov
Mantic
Fix Released
Undecided
Dimitri John Ledkov

Bug Description

[Impact]

Kernel 6.5 in Mantic enabled zstd module compression and at the same time libkmod is now trying to decompress the modules in-kernel directly. However the size that can be allocated by the kernel to do such decompression is limited and some large modules can fail to load (such as zfs for example).

[Test case]

Install zfs-dkms, then run:

 $ modprobe zfs

[Fix]

Fallback to the old user-space module loading way when ENOMEM is returned by finit_module().

[Regression potential]

We may introduce a small performance regression when loading multiple modules, due to the in-kernel and user-space attempts to load kernel modules, however this performance regression is negligible (one additional syscall when loading large modules) and it allows to correctly support large compressed kernel modules.

ProblemType: Bug
DistroRelease: Ubuntu 23.10
Package: kmod 30+20230519-1ubuntu2
ProcVersionSignature: User Name 6.5.0-6.6-generic 6.5.0-rc7
Uname: Linux 6.5.0-6-generic x86_64
ApportVersion: 2.27.0-0ubuntu2
Architecture: amd64
CasperMD5CheckResult: unknown
CloudArchitecture: x86_64
CloudBuildName: server
CloudID: nocloud
CloudName: unknown
CloudPlatform: nocloud
CloudSerial: 20230822
CloudSubPlatform: config-disk (/dev/vdb)
Date: Tue Aug 22 15:31:34 2023
ProcEnviron:
 LANG=C.UTF-8
 PATH=(custom, no user)
 SHELL=/bin/bash
 TERM=xterm-256color
 XDG_RUNTIME_DIR=<set>
SourcePackage: kmod
UpgradeStatus: No upgrade log present (probably fresh install)

Related branches

Revision history for this message
Andrea Righi (arighi) wrote :
Revision history for this message
Andrea Righi (arighi) wrote :

debdiff in attach fixes the problem and it allows to load large compressed kernel modules with the latest 6.5 kernel in mantic.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "kmod-fix-large-compressed-modules-loading.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Dan Bungert (dbungert)
Changed in kmod (Ubuntu Mantic):
assignee: nobody → Dan Bungert (dbungert)
status: New → In Progress
Revision history for this message
Dan Bungert (dbungert) wrote :

Thanks Andrea, LGTM and the listed test case passes. I will upload it shortly.

Is there work ongoing to upstream this?

Revision history for this message
Dan Bungert (dbungert) wrote :

Actually Dimitri uploaded already.

Changed in kmod (Ubuntu Mantic):
assignee: Dan Bungert (dbungert) → nobody
assignee: nobody → Dimitri John Ledkov (xnox)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kmod - 30+20230519-1ubuntu3

---------------
kmod (30+20230519-1ubuntu3) mantic; urgency=medium

  * Allow to load big compressed modules (LP: #2032674):
   - debian/patches/0006-libkmod-support-large-compressed-modules.patch

 -- Andrea Righi <email address hidden> Tue, 22 Aug 2023 15:40:46 +0000

Changed in kmod (Ubuntu Mantic):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.