zfs modules in Focal kernel taint kernel

Bug #1876990 reported by Jeff Lane 
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
High
Colin Ian King

Bug Description

the ZFS modules in the shipping focal kernel do not contain the intree flag, and because of that I believe they are the cause of kernel tainting discovered during 20.04 certification testing.

The output from a recent certification test run for 20.04:

Kernel taint value is 4097
Taint bit value: 0 (proprietary module was loaded)
Taint bit value: 12 (externally-built ('out-of-tree') module was loaded)

Looking into modinfo for everything loaded at the time, it appears that the ZFS modules are loaded (even though we did not configure any ZFS filesystems), and that seems to be the root cause of the test failure. To test this, I checked /proc/sys/kernel/tainted and verified it was tainted. I then blacklisted all the ZFS related modules and rebooted, and then checked /proc/sys/kernel/tainted again and the kernel no longer shows as being tainted.

Tags: focal
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1876990

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: focal
Revision history for this message
Colin Ian King (colin-king) wrote :

ZFS and the CDDL licence means that we will always have this tainting. It is expected.

Changed in linux (Ubuntu):
status: Incomplete → In Progress
importance: Undecided → High
assignee: nobody → Colin Ian King (colin-king)
Revision history for this message
Colin Ian King (colin-king) wrote :

Also, the modules are built out-of-tree during the kernel build phase since we cannot incorporate them in-tree as this violates the GPL. The zfs modules are build after the kernel is built from the zfs-dkms package and then bundled in the kernel package.

Revision history for this message
Colin Ian King (colin-king) wrote :

@Jeff, not sure how we progress on this. Any comments?

Changed in linux (Ubuntu):
status: In Progress → Incomplete
Changed in linux (Ubuntu):
status: Incomplete → Won't Fix
Revision history for this message
Glenn Washburn (crass) wrote :

I'm running into this as well. I'd like to boot the Live CD such that the kernel is untainted, but since the zfs modules are automatically loaded, the kernel is tainted at boot.

I was able to ensure that the zfs modules were not loaded at boot by adding the kernel parameter "systemd.mask=zfs.target" in the grub bootloader.

I don't think there's a "fix" for this issue, but maybe this will help someone else running in to this issue.

One thing that would be nice though would be for the kernel parameter "zfs=(off|no|0)" would disable this target. Just as it disabled module loading in /etc/initd.d/zfs-import (via /etc/zfs/zfs-functions in function checksystem).

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.