-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZoL 0.7.13 + Linux Kernel 5.0.4: GPL-incompatible module zfs.ko uses GPL-only symbol 'preempt_schedule_notrace' #8545
Comments
The following have the same problem:
|
As far as I can tell this has always been |
Hmm, yeah ... Not sure what is going on there. I do have |
The last time NixOS was able to build ZFS on aarch64 for the latest stable was 4.19.12, I'll start bisecting. |
I bisected 5.0 to 4.19 and torvalds/linux@0e9da3f is the first offending commit Based on My colleague is rebasing torvalds/linux@0e9da3f on to torvalds/linux@b12a912 and I'll be bisect that next. |
OK I finished that rebase, and it narrowed down to this commit: torvalds/linux@7fcf2b0 -- calling it a day for now, and will look more tomorrow. |
Attached are build logs and the results of the original attempted build ( objdump (attached) shows https://github.com/zfsonlinux/zfs/blob/a8c2b7ebc64d23ffe15e2b168aa0bea7a4897133/module/zfs/vdev_disk.c#L702-L779 is calling |
@grahamc thanks for isolating the offending commit. It looks like when they switched over to using percpu_ref's in This code is pulled in though the |
Ah, excellent! Unfortunately, I can't turn that off so that workaround doesn't apply for me. However, I'm able to use 4.19 for the the next 4-5 months. Thank you for doing this research and getting to the workaround! |
So, in NixOS we give up on ZFS in latest-kernel stuff for aarch64? (example) |
Something like that, but let's move that discussion to our own issue tracker NixOS/nixpkgs#58959 :) |
The 5.0 kernel defines the macro ASM_BUG. In order to prevent a conflict and build failure rename ASM_BUG to ZFS_ASM_BUG. This is currently only an issue on aarch64 but all instances of ASM_BUG we're renamed to avoid any future conflict on x86_64. Signed-off-by: Brian Behlendorf <[email protected]> Issue openzfs#8545
@grahamc I've opened PR #8725 which resolves the |
I'm also wondering if this may be a general issue with |
Please disregard, that works wonderfully. Thanks, @behlendorf ! |
The 5.0 kernel defines the macro ASM_BUG. In order to prevent a conflict and build failure rename ASM_BUG to ZFS_ASM_BUG. This is currently only an issue on aarch64 but all instances of ASM_BUG we're renamed to avoid any future conflict on x86_64. Reviewed-by: Tomohiro Kusumi <[email protected]> Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Chris Dunlop <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #8725 Issue #8545
This does look like it may be a general issue, but I haven't confirmed that. The |
I'm currently checking if this also occurs on x86_64 with |
This doesn't seem to affect my x86_64 build of the kernel (i.e. zfs builds fine even with |
So the build should probably fail if aarch64 && CONFIG_PREEMPT? At the very least a better error message can be displayed. |
That's a good idea. This is something we could catch earlier at configure time. |
Yes, but also only from 5.0 onwards. |
Upstream-issue: openzfs/zfs#8545 Package-Manager: Portage-2.3.67, Repoman-2.3.13 Signed-off-by: Georgy Yakovlev <[email protected]>
The 5.0 kernel defines the macro ASM_BUG. In order to prevent a conflict and build failure rename ASM_BUG to ZFS_ASM_BUG. This is currently only an issue on aarch64 but all instances of ASM_BUG we're renamed to avoid any future conflict on x86_64. Reviewed-by: Tomohiro Kusumi <[email protected]> Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Chris Dunlop <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#8725 Issue openzfs#8545
The 5.0 kernel defines the macro ASM_BUG. In order to prevent a conflict and build failure rename ASM_BUG to ZFS_ASM_BUG. This is currently only an issue on aarch64 but all instances of ASM_BUG we're renamed to avoid any future conflict on x86_64. Reviewed-by: Tomohiro Kusumi <[email protected]> Reviewed-by: Richard Laager <[email protected]> Reviewed-by: Chris Dunlop <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes openzfs#8725 Issue openzfs#8545
It also affects PREEMPT_RT_FULL since PREEMPT_RT_FULL selects PREEMPT. |
I seem to be hitting this on aarch64 with a kernel config set to |
also of note, I was trying to install zfs master on 5.2.14 |
Upstream-issue: openzfs/zfs#8545 Package-Manager: Portage-2.3.67, Repoman-2.3.13 Signed-off-by: Georgy Yakovlev <[email protected]>
Is there any chance of the issue with (This is in the default kernel config for the default 5.4 kernels put out for the Raspberry Pi by the Raspberry Pi Foundation.)
|
this seems fixed in git master, building against 5.7.8 |
iwcfg requires various crypto changes zfs-dkms requires CONFIG_PREEMPT_VOLUNTARY=y due to a mixed GPL license warning See moonman#7 for a discussion of iwcfg/crypto See openzfs/zfs#8545 for a discussion of CONFIG_PREEMPT_VOLUNTARY
See moonman#7 for discussion on iwcfg See openzfs/zfs#8545 for discussion on zfs-dkms
iwcfg requires various crypto changes zfs-dkms requires CONFIG_PREEMPT_VOLUNTARY=y due to a mixed GPL license warning See moonman#7 for a discussion of iwcfg/crypto See openzfs/zfs#8545 for a discussion of CONFIG_PREEMPT_VOLUNTARY
Building master didn't work on Aarch64 with kernel 5.4.49 using Armbian on a NanoPi M4v2. This is the final output:
|
guess there may still be problems with 5.4 then |
FYI Ubuntu has a workaround for this now: https://git.launchpad.net/ubuntu/+source/zfs-linux/commit/?h=applied/ubuntu/devel&id=e7c101ed4b81cb3c2eda8abba0b50fedac5d6bab
|
Aarch64 with kernel 5.8.10 using Armbian on a Rock64
|
used on arm64 which is a GPL-only function and hence the build of the DKMS kernel module fails. 'Fix' that by redefining preempt_schedule_notrace() to preempt_schedule() which should be safe as long as tracing is not used. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Juerg Haefliger <[email protected]> Issue openzfs#8545
@behlendorf The patch works for me with the RPI arm64 kernel at Hexxeh/rpi-firmware@a995f0c:
|
With PREEMPTION=y and BLK_CGROUP=y preempt_schedule_notrace() is being used on arm64 which is a GPL-only function and hence the build of the DKMS kernel module fails. Fix that by redefining preempt_schedule_notrace() to preempt_schedule() which should be safe as long as tracing is not used. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Juerg Haefliger <[email protected]> Closes openzfs#8545 Closes openzfs#9948 Closes openzfs#10416 Closes openzfs#10973
With PREEMPTION=y and BLK_CGROUP=y preempt_schedule_notrace() is being used on arm64 which is a GPL-only function and hence the build of the DKMS kernel module fails. Fix that by redefining preempt_schedule_notrace() to preempt_schedule() which should be safe as long as tracing is not used. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Juerg Haefliger <[email protected]> Closes #8545 Closes #9948 Closes #10416 Closes #10973
With PREEMPTION=y and BLK_CGROUP=y preempt_schedule_notrace() is being used on arm64 which is a GPL-only function and hence the build of the DKMS kernel module fails. Fix that by redefining preempt_schedule_notrace() to preempt_schedule() which should be safe as long as tracing is not used. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Juerg Haefliger <[email protected]> Closes openzfs#8545 Closes openzfs#9948 Closes openzfs#10416 Closes openzfs#10973
With PREEMPTION=y and BLK_CGROUP=y preempt_schedule_notrace() is being used on arm64 which is a GPL-only function and hence the build of the DKMS kernel module fails. Fix that by redefining preempt_schedule_notrace() to preempt_schedule() which should be safe as long as tracing is not used. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Juerg Haefliger <[email protected]> Closes openzfs#8545 Closes openzfs#9948 Closes openzfs#10416 Closes openzfs#10973
System information
Describe the problem you're observing
Kernel module build fails in MODPOST:
I'm also seeing the following warnings:
Describe how to reproduce the problem
Attempt to compile the module. In this particular case, if you have a machine with Nix running aarch64:
Include any warning/errors/backtraces from the system logs
The text was updated successfully, but these errors were encountered: