Bug 1218283

Summary: Building ZFS for 15.6 and Tumbleweed broken on aarch64 by kernel_neon_begin changed from EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
Product: [openSUSE] openSUSE Tumbleweed Reporter: Dominik Heidler <dheidler>
Component: KernelAssignee: Jan Engelhardt <jengelh>
Status: RESOLVED UPSTREAM QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None CC: andrea.porta, felix.niederwanger, fvogt, guillaume.gardet, ivan.ivanov, jengelh, mbenes, stanimir.varbanov, tiwai
Version: Current   
Target Milestone: ---   
Hardware: aarch64   
OS: Other   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Dominik Heidler 2023-12-20 22:19:57 UTC
Fail: https://build.opensuse.org/package/live_build_log/filesystems/zfs/openSUSE_Tumbleweed/aarch64

[  259s] ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kernel_neon_end'
[  259s] ERROR: modpost: GPL-incompatible module zfs.ko uses GPL-only symbol 'kernel_neon_begin'

Upstream tracks the issue
here https://github.com/openzfs/zfs/issues/15401
and here https://github.com/openzfs/zfs/issues/14555


It could be fixed by reverting this kernel patch:
https://github.com/torvalds/linux/commit/aaeca98456431a8d9382ecf48ac4843e252c07b3
Comment 1 Miroslav Beneš 2023-12-21 09:20:15 UTC
Dominik, do you know if it has been reported to the kernel upstream?

Could also anyone tell how it (ZFS) works on x86 where the respective functions are reportedly _GPL too? Perhaps it can be easily fixed on ZFS side then.
Comment 2 Dominik Heidler 2023-12-21 09:39:37 UTC
Upstream hinted in the bug report that they try to reach out to the kernel people but it could take months to change anything if it helps at all.

If I understood it correctly Upstream wrote in the referened issue that on x86 they have reimplemented some of the functionality on their own to prevent usage of the GPL symbol. But this tool a lot of time and work.

Other distros (at lease some NixOS packagers commented on the issue) have solved this particular issue by reverting the referenced patch in the kernel,
which shouldn't be a legal issue, as it is just restoring an already released version of the code.
Comment 3 Miroslav Beneš 2023-12-22 14:40:33 UTC
(In reply to Dominik Heidler from comment #2)
> Upstream hinted in the bug report that they try to reach out to the kernel
> people but it could take months to change anything if it helps at all.

It takes just one email and the viewpoint of arm64 kernel maintainers would be known in a matter of days (or weeks given there are holidays in Europe now).

> If I understood it correctly Upstream wrote in the referened issue that on
> x86 they have reimplemented some of the functionality on their own to
> prevent usage of the GPL symbol. But this tool a lot of time and work.
> 
> Other distros (at lease some NixOS packagers commented on the issue) have
> solved this particular issue by reverting the referenced patch in the kernel,
> which shouldn't be a legal issue, as it is just restoring an already
> released version of the code.

But the context has changed. Now we know that the general policy and the intention is to have those symbols used by GPL code only.

Others may feel differently but I think this needs to resolved with the upstream maintainers first, or on the ZFS side.
Comment 4 Takashi Iwai 2024-01-02 12:32:07 UTC
Agreed with Miroslav, it should be addressed by the upstream at first -- at least for Tumbleweed.

Though, a slightly open question is for Leap 15.6; it's an update, and we may see it as a regression.  If any other solution is found, a revert might be an option in this case.
Comment 5 Fabian Vogt 2024-01-30 12:19:47 UTC
Should be addressed by upstream https://github.com/openzfs/zfs/commit/7b89149c9f120e2fb1c08e7f903a0c671340fabd
Comment 6 Dominik Heidler 2024-01-30 15:05:27 UTC
https://build.opensuse.org/request/show/1142805
Comment 7 Ivan Ivanov 2024-03-22 09:15:36 UTC
Request 1142805 accepted. Closing.