-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
FATAL: modpost: GPL-incompatible module zzstd.ko uses GPL-only symbol 'mutex_lock_nested' #10982
Comments
I had to edit META in order to get it to build |
And uhhh... the zstd is BSD licensed meaning you also need to edit that as well |
This doesnt happen on 5.8 |
@cheesycod Please try and actually fill in the form next time, it's there to be sure you give all information in one go instead of feeling the need to add 3 follow-up oneliners. (which makes things harder to figure out for everyone ;) ) That being said: zzstd.ko == zfs_zstd.c, right? Which is actually un-altered and dual-licenced BSD-GPLv2, so should be able to use GPL-only symbols. I think I know why this is triggering: |
Even changing the zstd license doesn't fully solve the problem as the resulting module fails to load mutex_lock_nested and some other symbols with error 2 |
@cheesycod I know, I already explained why that wouldnt work.
|
@cheesycod this is likely caused by having This is something of a long standing annoyance. You just happen to get the warning with zstd since license string wasn't recognized as a known one. "Dual BSD/GPL" is what the kernel expects for a BSD license, we can update the module accordingly. https://github.com/torvalds/linux/blob/master/include/linux/module.h#L182-L226 |
@behlendorf I get another issue happened on a nodebug kernel without CONFIG_DEBUG_LOCK_ALLOC set |
On the nodebug kernel, it compiles but fails to load the module due to undefined symbol: mutex_lock_nested error=2 |
https://ibb.co/LS70XbD |
ErrorS you mean ;-) |
this is a overall problem in zfs if you enable lockdep debugging in kernel. its not just zzstd. its also zfs.ko. its not fixable due the license of zfs |
i can recheck it with 5.9 but this must be resolved in zfs overall. i cannot fix this, since i need the mutex functions |
Sorry, wasn't aware @BrainSlayer and @behlendorf ! |
Once again, this is on a nodebug kernel without lockdep debugging. Older versions of ZFS from August work perfectly |
i just can say this problem isnt a zstd specific problem. the same symbols are used overall in zfs and i know this problem from older kernels with some specific debugging options. now in 5.9 i know what the kernel developers explicit want to prevent projects like zfs to use certain symbols. i havent checked the latest 5.9 tree yet. but will |
@BrainSlayer Yes, thats what I was thinking, maybe that measure is increasing the problem, I know that said code should be included in last 5.9 RC. @cheesycod You could try two RC versions of kernel 5.9 back, If my theory increases the issue you will see said RC+zfs working just fine ;) |
One question, what's stopping us from lying to the kernel and telling it we are GPL when we are really CDDL? It looks like it would solve a lot of headaches. |
@cheesycod Decency mostly. So legally speaking there is no direct consequence in lying about your licence. It isn't more or less of a violation by adding a gpl flag to the code (because there is no legal requirement, or definition that justifies GPL flags to begin with) There are two things keeping us from doing this:
|
If Linus makes things worse, we might have to...... |
@cheesycod I don't think it's needed to go there, yet. |
We did. There was a configure time check added to detect this, unfortunately it appears it was accidental broken when integrating the parallel kABI checks. I've opened #10991 to fix the configure check. @cheesycod based on the screenshot you provided it looks to me like your kernel is built with |
The Linux kernel MODULE_LICENSE macro only recognizes a handful of license strings and "BSD" is not one of the them. Update the macro to use "Dual BSD/GPL" which is recognized and what the kernel expects BSD licensed module to use. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue openzfs#10982
The Linux kernel MODULE_LICENSE macro only recognizes a handful of license strings and "BSD" is not one of the them. Update the macro to use "Dual BSD/GPL" which is recognized and what the kernel expects BSD licensed module to use. Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #10982 Closes #10992
The Linux kernel MODULE_LICENSE macro only recognizes a handful of license strings and "BSD" is not one of the them. Update the macro to use "Dual BSD/GPL" which is recognized and what the kernel expects BSD licensed module to use. Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#10982 Closes openzfs#10992
The Linux kernel MODULE_LICENSE macro only recognizes a handful of license strings and "BSD" is not one of the them. Update the macro to use "Dual BSD/GPL" which is recognized and what the kernel expects BSD licensed module to use. Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes openzfs#10982 Closes openzfs#10992
FATAL: modpost: GPL-incompatible module zzstd.ko uses GPL-only symbol 'mutex_lock_nested'
This only occurs on Linux 5.9-rc6. Linux 5.8 is not affected
The text was updated successfully, but these errors were encountered: