-
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
Support ZFS_CONFIG=m in kernel source tree #11120
Comments
This isn't a symbol ZFS uses directly, nor is it something we've seen with the automated |
Hello! Since Debian apparently never used the 5.4 series, I have built against the Ubuntu 20.04 LTS 5.4 Kernel config. I have difficulties finding a way to definitely disable CONFIG_TRACING. Is there a way to skip this check? Ubuntu redistributes ZFS kernel module binaries that they build out-of-tree and I guess they contain the same GPL-only symbols, but no error is thrown. So, I do not think it would make a (legal) difference to skip this check. And oddly enough, when I select ZFS as built-in to the kernel (not module), there is no warning or error at all, even though this is even "worse" in terms of CDDL-GPL-mixing. EDIT: I found the original config for 5.4 (backport) and will try again shortly. Will update this ticket accordingly. |
This was the official Debian Backports Kernel 5.4 for Debian Stable (Buster): I stripped the config from the distribution signing key path for modules before loading it.
Am I doing something wrong here? Thank you very much. |
Can you check if $ grep HAVE_DECLARE_EVENT_CLASS zfs_config.h
/* #undef HAVE_DECLARE_EVENT_CLASS */ Assuming that's the case we'll need to determine why it was set wrong for this kernel. Can you attach the contents of the |
Thank you for your reply! Indeed, include/zfs/zfs_config.h has the EVENT_CLASS defined:
Attached you find the file you have asked for - and additionally the entire config.log. I commented out the offending line, but now it fails on a different one:
|
What's the point in copying zfs sources into kernel with --enable-linux-builtin=yes Just compile it in your custom kernel - problem solved. |
Oh, I somehow missed the fact that you're building this in to the kernel with |
Thank you very much for your reply! I am working on an embedded system which is built using a custom build system and its unified EFI binary kernel commandline should not need to be adjusted for each system in case I need a different ARC cache size or something else or simply want to load ZFS on demand. If MODPOST fails because zfs.ko uses GPL-ONLY symbols, doesn't that mean that if I build the ZFS modules manually, that it also uses GPL-ONLY symbols without telling me about it, since this Kernel check script is not being run? I have yet to find out how distributions like Ubuntu do it, since zfs.ko is also included in their regular linux-image-amd64 generic configuration. If ZFS On Linux will always use GPL-ONLY symbols regardless and is only caught "red handed" by some random kernel script, then I would just use "#define ZFS_META_LICENSE "GPL" to circumvent the check. |
We're careful not to use any GPL-only symbols in OpenZFS. In order to detect which symbols are license compatible the configure script relies on the kernel generated If you don't mind an extra step what can do is build your kernel first without OpenZFS patched in as you would normally configure it. This will generate the needed |
Thank you for your thorough explanation. Now I understand what the problem is. I will try that out (copying zfs_config.h) once I need this functionality. |
Hello! I can confirm that your suggested workaround (copying zfs_config.h) works very well! Thank you very much! |
System information
Describe the problem you're observing
Building the ZFS On Linux modules via kernel source tree integration (--enable-linux-builtin=yes) fails because zfs.ko uses a GPL-only symbol (trace_seq_printf).
Describe how to reproduce the problem
Include any warning/errors/backtraces from the system logs
Note: No, CONFIG_PREEMPT is not set.
Do you know if there is a quick fix for this?
Thank you very much!
schreiberstein
The text was updated successfully, but these errors were encountered: