Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903117 - Linux kernel 6.2.8 breaks sys-fs/zfs-kmod-2.1.9
Summary: Linux kernel 6.2.8 breaks sys-fs/zfs-kmod-2.1.9
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Georgy Yakovlev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-26 12:06 UTC by Adrien Dessemond
Modified: 2023-09-10 14:21 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
config/kernel-generic_io_acct.m4 patched for Linux 6.2.8 compatibility (kernel-generic_io_acct.m4-linux-6.2.8.patch,5.22 KB, patch)
2023-03-26 14:41 UTC, Adrien Dessemond
Details | Diff
blkdev_compat.h patched for Linux 6.2.8 compatibility (blkdev_compat.h-linux-6.2.8.patch,1.07 KB, patch)
2023-03-26 14:43 UTC, Adrien Dessemond
Details | Diff
All-in-one version of the previously patches (bugfix-903117-linux-6.2.8.patch,6.30 KB, patch)
2023-03-26 14:49 UTC, Adrien Dessemond
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrien Dessemond 2023-03-26 12:06:17 UTC
Genkernel fails when rebuilding the ZFS kernel modules with a 6.2.8 Linux kernel:

(...)
make -f ./scripts/Makefile.modpost
   scripts/mod/modpost       -o /var/tmp/portage/sys-fs/zfs-kmod-2.1.9/work/zfs-2.1.9/module/Module.symvers -n -T /var/tmp/portage/sys-fs/zfs-kmod-2.1.9/work/zfs-2.1.9/module/modules.order -i Module.symvers -e 
ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'bio_start_io_acct'
ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'bio_end_io_acct_remapped'
make[4]: *** [scripts/Makefile.modpost:138: /var/tmp/portage/sys-fs/zfs-kmod-2.1.9/work/zfs-2.1.9/module/Module.symvers] Error 1
make[3]: *** [Makefile:1973: modpost] Error 2
make[2]: *** [Makefile:55: modules-Linux] Error 2
make[2]: Leaving directory '/var/tmp/portage/sys-fs/zfs-kmod-2.1.9/work/zfs-2.1.9/module'
make[1]: *** [Makefile:933: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-fs/zfs-kmod-2.1.9/work/zfs-2.1.9'
make: *** [Makefile:794: all] Error 2
 * ERROR: sys-fs/zfs-kmod-2.1.9::gentoo failed (compile phase):
 *   emake failed

The root cause is a backport from Linux 6.3-RC3 which breaks the kernel API. See the linked upstream bug.

Also discussed in Gentoo bug #902821.
Comment 1 Adrien Dessemond 2023-03-26 14:37:03 UTC
A working solution exists here => https://github.com/CachyOS/zfs/commit/00e580bca282bf30913fcf5832fc58191cf0ff32?diff=unified

So far no issues while running with Linux 6.2.8 + ZFS 2.1.9 :)

Will post the individual patches in comments below.
Comment 2 Adrien Dessemond 2023-03-26 14:41:44 UTC
Created attachment 859039 [details, diff]
config/kernel-generic_io_acct.m4 patched for Linux 6.2.8 compatibility
Comment 3 Adrien Dessemond 2023-03-26 14:43:04 UTC
Created attachment 859041 [details, diff]
blkdev_compat.h patched for Linux 6.2.8 compatibility
Comment 4 Adrien Dessemond 2023-03-26 14:49:56 UTC
Created attachment 859043 [details, diff]
All-in-one version of the previously patches
Comment 5 Georgy Yakovlev archtester gentoo-dev 2023-03-27 21:28:29 UTC
we don't officially support 6.2 with our ebuild.

or policy is to strictly adhere to META/release notes supported release to avoid confusion and backport only exceptional patches/cases, like when between kernel releases when old is kernel is gone and new is broken to prevent kernel downgrades.


users are free to specify
ZFS_KERNEL_COMPAT_OVERRIDE=6.2

and patch it for newer kernel compat.

this will work with gentoo-sources and dist-kernel


patch is staged for 2.1.10 

https://github.com/openzfs/zfs/pull/14677
Comment 6 Adrien Dessemond 2023-09-10 14:21:19 UTC
Linux 6.2 kernel series have been removed several weeks ago.
Issue is obsolete.