Skip to content
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

Linux 5.3.0-rc4-rk3399: GPL-incompatible module zfs.ko uses GPL-only symbol 'preempt_schedule_notrace' #9948

Closed
mrhaoxx opened this issue Feb 5, 2020 · 5 comments
Labels
Type: Building Indicates an issue related to building binaries

Comments

@mrhaoxx
Copy link

mrhaoxx commented Feb 5, 2020

System information

Type Version/Name
Distribution Name Debian
Distribution Version buster
Linux Kernel Linux 5.3.0-rc4-rk3399
Architecture aarch64-linux
ZFS Version 0.8.2/0.8.3
SPL Version None

Describe the problem you're observing

  Building modules, stage 2.
  MODPOST 8 modules
FATAL: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'preempt_schedule_notrace'
make[4]: *** [scripts/Makefile.modpost:103: modules-modpost] Error 1

Similar Issue:
#8545 #9745 #6146

@mrhaoxx
Copy link
Author

mrhaoxx commented Feb 5, 2020

Also failed on linux 5.3.11-rockchip64

dkms build zfs/0.8.2
Building module:
cleaning build area...
make -j6 KERNELRELEASE=5.3.11-rockchip64....................................(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.3.11-rockchip64 (aarch64)
Consult /var/lib/dkms/zfs/0.8.2/build/make.log for more information.
  Building modules, stage 2.
  MODPOST 8 modules
FATAL: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'preempt_schedule_notrace'
make[4]: *** [scripts/Makefile.modpost:103: modules-modpost] Error 1

@behlendorf behlendorf added the Type: Building Indicates an issue related to building binaries label Feb 7, 2020
@neszt
Copy link

neszt commented Mar 13, 2020

Also failed on Linux rock64 5.4.20-rockchip64:

root@rock64:~# dkms build zfs/0.8.3
Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.4.20-rockchip64...................................................................................................(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.20-rockchip64 (aarch64)
Consult /var/lib/dkms/zfs/0.8.3/build/make.log for more information.
root@rock64:~# tail -15 /var/lib/dkms/zfs/0.8.3/build/make.log 
  CC [M]  /var/lib/dkms/zfs/0.8.3/build/module/zfs/qat_crypt.o
  CC [M]  /var/lib/dkms/zfs/0.8.3/build/module/zfs/vdev_raidz_math_aarch64_neon.o
  CC [M]  /var/lib/dkms/zfs/0.8.3/build/module/zfs/vdev_raidz_math_aarch64_neonx2.o
  LD [M]  /var/lib/dkms/zfs/0.8.3/build/module/zfs/zfs.o
  Building modules, stage 2.
  MODPOST 8 modules
FATAL: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'preempt_schedule_notrace'
make[4]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make[3]: *** [Makefile:1609: modules] Error 2
make[3]: Leaving directory '/usr/src/linux-headers-5.4.20-rockchip64'
make[2]: *** [Makefile:30: modules] Error 2
make[2]: Leaving directory '/var/lib/dkms/zfs/0.8.3/build/module'
make[1]: *** [Makefile:805: all-recursive] Error 1
make[1]: Leaving directory '/var/lib/dkms/zfs/0.8.3/build'
make: *** [Makefile:674: all] Error 2

@Titaniumtown
Copy link

Titaniumtown commented May 24, 2020

Same issue, Raspberry pi 4 4gb, running arch linux arm aarch64.
Linux kernel: 5.4.42-1-ARCH+

Interesting thing: it works fine on kernel 4.19

@satmandu
Copy link
Contributor

satmandu commented Jun 9, 2020

If this is on your own system, then nobody is going to come after you for messing with the licenses on your modules.

So run this before building the zfs modules:

#!/bin/bash
set -ex
modify_zfs() {
        cd /usr/src/$(ls /usr/src | grep zfs | tail -n 1)
        ./autogen.sh
}
(sed -i 's/CDDL/GPL/g' /usr/src/zfs-*/META && modify_zfs) || true
exit 0

It worked for me.

zfs, 0.8.4, 5.4.44-v8+, aarch64: installed

@satmandu
Copy link
Contributor

satmandu commented Jun 9, 2020

(This problem also goes away if you disable preempt on your kernel.)

See #8545 for more info.

tonyhutter pushed a commit to tonyhutter/zfs that referenced this issue Sep 28, 2020
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
behlendorf added a commit that referenced this issue Oct 1, 2020
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
jsai20 pushed a commit to jsai20/zfs that referenced this issue Mar 30, 2021
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
sempervictus pushed a commit to sempervictus/zfs that referenced this issue May 31, 2021
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Building Indicates an issue related to building binaries
Projects
None yet
Development

No branches or pull requests

5 participants