Consider switching CONFIG_PREEMPT to allow zfs module compilation with default kernel8.img

Open
#3,549 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
linux, ubuntu

Research direction

Read the linked OpenZFS issue and compare CONFIG_PREEMPT with CONFIG_PREEMPT_VOLUNTARY in the Raspberry Pi arm64 kernel configuration used for default kernel8.img. Reproduce the arm64 zfs-dkms build failure, then verify the selected configuration builds the zfs module successfully without the GPL-only symbol error.

Written by the indexing model from the issue text.

Description

zfs doesn't compile on arm64 with CONFIG_PREEMPT=y due to an issue mentioned here https://github.com/openzfs/zfs/issues/8545 with the GPL-only symbol 'preempt_schedule_notrace'

The workaround mentioned here https://github.com/openzfs/zfs/issues/8545#issuecomment-490272088 is to have CONFIG_PREEMPT_VOLUNTARY=y set instead.

Compiling arm64 zfs-dkms from ubuntu gives this error:

Building module:
cleaning build area...
make -j4 KERNELRELEASE=5.4.29-v8+................................................................(bad exit status: 2)
ERROR (dkms apport): kernel package linux-headers-5.4.29-v8+ is not supported
Error! Bad return status for module build on kernel: 5.4.29-v8+ (aarch64)
Consult /var/lib/dkms/zfs/0.8.3/build/make.log for more information.
...

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:1607: modules] Error 2
make[3]: Leaving directory '/usr/src/rpi-linux'
make[2]: *** [Makefile:30: modules] Error 2
make[2]: Leaving directory '/var/lib/dkms/zfs/0.8.3/build/module'
make[1]: *** [Makefile:807: all-recursive] Error 1
make[1]: Leaving directory '/var/lib/dkms/zfs/0.8.3/build'
make: *** [Makefile:676: all] Error 2

Expected behaviour
The zfs module compiles successfully. (It does with the default ubuntu focal kernel.)

Dominant language
C
Stars
13.2k
Forks
5.5k
Avg merge
2d 21h
Merged PRs (30d)
21

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from raspberrypi/linux

All issues in raspberrypi/linux

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.