** Description changed:
[Impact]
On arm64 with PREEMPTION and BLK_CGROUP enabled,
preempt_schedule_notrace is being pulled in which is a GPL-only function
so the DKMS build fails:
DKMS make.log for zfs-0.8.3 for kernel 5.4.0-1015-raspi (aarch64)
Tue Aug 18 06:30:17 UTC 2020
./scripts/make_gitrev.sh
/bin/bash: ./scripts/make_gitrev.sh: No such file or directory
make: [Makefile:1512: gitrev] Error 127 (ignored)
make all-recursive
make[1]: Entering directory '/var/lib/dkms/zfs/0.8.3/build'
Making all in module
make[2]: Entering directory '/var/lib/dkms/zfs/0.8.3/build/module'
list='icp lua'; for targetdir in $list; do \
make -C $targetdir; \
done
make[3]: Entering directory '/var/lib/dkms/zfs/0.8.3/build/module/icp'
mkdir -p api core spi io os algs algs/aes algs/edonr algs/modes algs/sha1
algs/sha2 algs/skein asm-x86_64 asm-x86_64/aes asm-x86_64/modes asm-x86_64/sha1
asm-x86_64/sha2 asm-i386 asm-generic
make[3]: Leaving directory '/var/lib/dkms/zfs/0.8.3/build/module/icp'
make[3]: Entering directory '/var/lib/dkms/zfs/0.8.3/build/module/lua'
mkdir -p setjmp
make[3]: Leaving directory '/var/lib/dkms/zfs/0.8.3/build/module/lua'
make -C /lib/modules/5.4.0-1015-raspi/build M=`pwd` CONFIG_ZFS=m modules
make[3]: Entering directory '/usr/src/linux-headers-5.4.0-1015-raspi'
CC [M] /var/lib/dkms/zfs/0.8.3/build/module/avl/avl.o
CC [M] /var/lib/dkms/zfs/0.8.3/build/module/nvpair/nvpair.o
<SNIP>
CC [M] /var/lib/dkms/zfs/0.8.3/build/module/zfs/qat_compress.o
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:1647: modules] Error 2
make[3]: Leaving directory '/usr/src/linux-headers-5.4.0-1015-raspi'
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
Note that Ubuntu currently doesn't support/provide a preemptible arm64
kernel so this hasn't been a problem so far.
[Test Case]
Install zfs-dkms on an arm64 system that has a PREEMPT kernel installed.
[Fix]
Redefine preempt_schedule_notrace() to preempt_schedule() in the ZFS
module (only for arm64 and if PREEMPTION and BLK_CGROUP are both
enabled). preempt_schedule() is not a GPL symbol.
[Regression Potential]
Per comment in the kernel source, preempt_schedule_notrace() is required
- when tracing is enabled. As long as tracing is disabled, this 'fix'
- should not cause any problems. Problems due to this change would
- manifest themselves as TBD.
+ when tracing is enabled. As long as tracing is not enabled, this 'fix'
+ should not cause any issues. Problems due to this change could show up
+ as kernel splats like:
+
+ ===============================
+ [ INFO: suspicious RCU usage. ]
+ 3.10.0-rc2+ #1 Not tainted
+ -------------------------------
+ include/linux/rcupdate.h:771 rcu_read_lock() used illegally while idle!
+ other info that might help us debug this:
+ RCU used illegally from idle CPU! rcu_scheduler_active = 1, debug_locks
= 0
+ RCU used illegally from extended quiescent state!
+ 2 locks held by cc1/63645:
+ #0: (&rq->lock){-.-.-.}, at: [<ffffffff816b39fd>] __schedule+0xed/0x9b0
+ #1: (rcu_read_lock){.+.+..}, at: [<ffffffff8109d645>]
cpuacct_charge+0x5/0x1f0
+
+ CPU: 1 PID: 63645 Comm: cc1 Not tainted 3.10.0-rc2+ #1 [loadavg: 40.57
27.55 13.39 25/277 64369]
+ Hardware name: Gigabyte Technology Co., Ltd.
GA-MA78GM-S2H/GA-MA78GM-S2H, BIOS F12a 04/23/2010
+ 0000000000000000 ffff88010f78fcf8 ffffffff816ae383 ffff88010f78fd28
+ ffffffff810b698d ffff88011c092548 000000000023d073 ffff88011c092500
+ 0000000000000001 ffff88010f78fd60 ffffffff8109d7c5 ffffffff8109d645
+ Call Trace:
+ [<ffffffff816ae383>] dump_stack+0x19/0x1b
+ [<ffffffff810b698d>] lockdep_rcu_suspicious+0xfd/0x130
+ [<ffffffff8109d7c5>] cpuacct_charge+0x185/0x1f0
+ [<ffffffff8109d645>] ? cpuacct_charge+0x5/0x1f0
+ [<ffffffff8108dffc>] update_curr+0xec/0x240
+ [<ffffffff8108f528>] put_prev_task_fair+0x228/0x480
+ [<ffffffff816b3a71>] __schedule+0x161/0x9b0
+ [<ffffffff816b4721>] preempt_schedule+0x51/0x80
+ [<ffffffff816b4800>] ? __cond_resched_softirq+0x60/0x60
+ [<ffffffff816b6824>] ? retint_careful+0x12/0x2e
+ [<ffffffff810ff3cc>] ftrace_ops_control_func+0x1dc/0x210
+ [<ffffffff816be280>] ftrace_call+0x5/0x2f
+ [<ffffffff816b681d>] ? retint_careful+0xb/0x2e
+ [<ffffffff816b4805>] ? schedule_user+0x5/0x70
+ [<ffffffff816b4805>] ? schedule_user+0x5/0x70
+ [<ffffffff816b6824>] ? retint_careful+0x12/0x2e
+ ------------[ cut here ]------------
--
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to zfs-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1892001
Title:
zfs-dkms fails to build on arm64 with PREEMPTION and BLK_CGROUP
Status in zfs-linux package in Ubuntu:
Fix Released
Status in zfs-linux source package in Bionic:
New
Status in zfs-linux source package in Focal:
New
Status in zfs-linux source package in Groovy:
Fix Released
Bug description:
[Impact]
On arm64 with PREEMPTION and BLK_CGROUP enabled,
preempt_schedule_notrace is being pulled in which is a GPL-only
function so the DKMS build fails:
DKMS make.log for zfs-0.8.3 for kernel 5.4.0-1015-raspi (aarch64)
Tue Aug 18 06:30:17 UTC 2020
./scripts/make_gitrev.sh
/bin/bash: ./scripts/make_gitrev.sh: No such file or directory
make: [Makefile:1512: gitrev] Error 127 (ignored)
make all-recursive
make[1]: Entering directory '/var/lib/dkms/zfs/0.8.3/build'
Making all in module
make[2]: Entering directory '/var/lib/dkms/zfs/0.8.3/build/module'
list='icp lua'; for targetdir in $list; do \
make -C $targetdir; \
done
make[3]: Entering directory '/var/lib/dkms/zfs/0.8.3/build/module/icp'
mkdir -p api core spi io os algs algs/aes algs/edonr algs/modes algs/sha1
algs/sha2 algs/skein asm-x86_64 asm-x86_64/aes asm-x86_64/modes asm-x86_64/sha1
asm-x86_64/sha2 asm-i386 asm-generic
make[3]: Leaving directory '/var/lib/dkms/zfs/0.8.3/build/module/icp'
make[3]: Entering directory '/var/lib/dkms/zfs/0.8.3/build/module/lua'
mkdir -p setjmp
make[3]: Leaving directory '/var/lib/dkms/zfs/0.8.3/build/module/lua'
make -C /lib/modules/5.4.0-1015-raspi/build M=`pwd` CONFIG_ZFS=m modules
make[3]: Entering directory '/usr/src/linux-headers-5.4.0-1015-raspi'
CC [M] /var/lib/dkms/zfs/0.8.3/build/module/avl/avl.o
CC [M] /var/lib/dkms/zfs/0.8.3/build/module/nvpair/nvpair.o
<SNIP>
CC [M] /var/lib/dkms/zfs/0.8.3/build/module/zfs/qat_compress.o
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:1647: modules] Error 2
make[3]: Leaving directory '/usr/src/linux-headers-5.4.0-1015-raspi'
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
Note that Ubuntu currently doesn't support/provide a preemptible arm64
kernel so this hasn't been a problem so far.
[Test Case]
Install zfs-dkms on an arm64 system that has a PREEMPT kernel
installed.
[Fix]
Redefine preempt_schedule_notrace() to preempt_schedule() in the ZFS
module (only for arm64 and if PREEMPTION and BLK_CGROUP are both
enabled). preempt_schedule() is not a GPL symbol.
[Regression Potential]
Per comment in the kernel source, preempt_schedule_notrace() is
required when tracing is enabled. As long as tracing is not enabled,
this 'fix' should not cause any issues. Problems due to this change
could show up as kernel splats like:
===============================
[ INFO: suspicious RCU usage. ]
3.10.0-rc2+ #1 Not tainted
-------------------------------
include/linux/rcupdate.h:771 rcu_read_lock() used illegally while idle!
other info that might help us debug this:
RCU used illegally from idle CPU! rcu_scheduler_active = 1, debug_locks
= 0
RCU used illegally from extended quiescent state!
2 locks held by cc1/63645:
#0: (&rq->lock){-.-.-.}, at: [<ffffffff816b39fd>] __schedule+0xed/0x9b0
#1: (rcu_read_lock){.+.+..}, at: [<ffffffff8109d645>]
cpuacct_charge+0x5/0x1f0
CPU: 1 PID: 63645 Comm: cc1 Not tainted 3.10.0-rc2+ #1 [loadavg: 40.57
27.55 13.39 25/277 64369]
Hardware name: Gigabyte Technology Co., Ltd.
GA-MA78GM-S2H/GA-MA78GM-S2H, BIOS F12a 04/23/2010
0000000000000000 ffff88010f78fcf8 ffffffff816ae383 ffff88010f78fd28
ffffffff810b698d ffff88011c092548 000000000023d073 ffff88011c092500
0000000000000001 ffff88010f78fd60 ffffffff8109d7c5 ffffffff8109d645
Call Trace:
[<ffffffff816ae383>] dump_stack+0x19/0x1b
[<ffffffff810b698d>] lockdep_rcu_suspicious+0xfd/0x130
[<ffffffff8109d7c5>] cpuacct_charge+0x185/0x1f0
[<ffffffff8109d645>] ? cpuacct_charge+0x5/0x1f0
[<ffffffff8108dffc>] update_curr+0xec/0x240
[<ffffffff8108f528>] put_prev_task_fair+0x228/0x480
[<ffffffff816b3a71>] __schedule+0x161/0x9b0
[<ffffffff816b4721>] preempt_schedule+0x51/0x80
[<ffffffff816b4800>] ? __cond_resched_softirq+0x60/0x60
[<ffffffff816b6824>] ? retint_careful+0x12/0x2e
[<ffffffff810ff3cc>] ftrace_ops_control_func+0x1dc/0x210
[<ffffffff816be280>] ftrace_call+0x5/0x2f
[<ffffffff816b681d>] ? retint_careful+0xb/0x2e
[<ffffffff816b4805>] ? schedule_user+0x5/0x70
[<ffffffff816b4805>] ? schedule_user+0x5/0x70
[<ffffffff816b6824>] ? retint_careful+0x12/0x2e
------------[ cut here ]------------
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/zfs-linux/+bug/1892001/+subscriptions
--
Mailing list: https://launchpad.net/~kernel-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~kernel-packages
More help : https://help.launchpad.net/ListHelp