Hi,
Linux kernel 5.9 will get a GPL condom, which will eventually be backported to older kernels as well:
https://github.com/torvalds/linux/commit/262e6ae7081df304fc625cf368d5c2cbba2bb991
This seems to be mainly targeted towards NVIDIA:
https://www.theregister.com/2020/08/04/gpl_condom_nvidia_linux_kernel/
Would there be any negative affect on zfs?
It might, but with all these "preventions" (certainly with opensource) it's just a cat and mouse game in the end.
Thing is: If these GPL violations by the Kernel team (which they objectively are, the GPL doesn't allow picking an choosing what you allow for non-gpl and gpl modules respectively) keep stacking up, people eventually start removing those from their distro's anyway, it's opensource in the end.
Totally Off-topic:
Can we also get an idiot condom btw:
Add a anti-circumvention devices so people don't accidentally get themselves into trouble this way.
Do we also get a bin to throw up into with this issue, for this disgusting false sense of supremacy?
Ah, the proven-to-be-illegal "GPL Condom" defense :)
If he actually read the jurisprudence mister Greg would've known that it isn't the GPL_ONLY tag or the condom that determines if there is a gpl violation. Those only mean someone actively tried to circumvent GPL protections, which has been determined by the courts to be a sign(!) there might be wrongfull intent by said party.
It is, in itself, not illegal nor is it, in itself a gpl violation.
More info about this topic:
More info about this topic:
Yeah I know the discussion.
It reads like: "Greg had his usual behavorial issues and the fanboys followed as usual, regardless of subject".
Sorry, but this dude is never even close to respectfull if something hurts his GPL fundementalist feelings (regardless if those feelings are right or wrong). He could've very politely pointed out that this wasn't the way to go for this feature, because it would assist NVIDIA in circumventing GPL and pointed in the correct direction. Just like the article you mentioned did.
Well, it is pretty easy to patch the kernel. There are quite a few hidden features, it is okay to patch the kernel to enable them, but you have to know, what it is exactly, that you're doing - ie. read up on the relevant discussions on LKML and such.
With that said, you can have NFS client + server in user namespaces (unprivileged LXC containers), iotop working in the containers, etc...
To me, it's the same thing with ZFS. I want to use something, that is against the popular opinion held by a group of close friends around the kernel, that is ok, but I have to know, what it is, that I'm doing. Ie. follow up on the stuff with FPU registers, for example - that was the first trigger for me. Our kernel exports those symbols by EXPORT_SYMBOL, not the _GPL variant, since then. If more stuff comes this way, we'll do just the same, patch it out of our kernel.
I would be up for maintaining such patches in the OpenZFS tree, which would patch all the relevant stuff in Linux to ZFS. If there's interest, I will do it, it's what I'm already doing for our production setups in vpsFree.cz anyway.
but I have to know, what it is, that I'm doing
This exactly, this is (ofcoarse) true for every kernel-level change!
Thats also why i'm a bit dumbfounded by the statement stating:
"Add a anti-circumvention devices so people don't accidentally get themselves into trouble this way."
There is nothing inherently more troublesome (codewise) using non-gpl modules or patches vs gpl modules or patches. you should always know what you are doing and be ready for the consequences.
I would be up for maintaining such patches in the OpenZFS tree, which would patch all the relevant stuff in Linux to ZFS. If there's interest
It's at least a relevant thing to look into: Giving people the option to just use a kernel that exports all relevant content as non_gpl EXPORT_SYMBOL :)
First off, let me remind everyone to keep this discussion polite and avoid personal attacks, even when we strongly agree with other people's positions and actions.
From the LWN article:
With this patch applied, any module that imports symbols from a proprietary module is itself marked as being proprietary, denying it access to GPL-only symbols.
There is no proprietary software in OpenZFS, it's all open source software. Labeling non-GPL open-source software as "proprietary" is inaccurate, and harms open-source projects.
Now if what the article meant to say was:
With this patch applied, any module that imports symbols from a non-GPL module is itself marked as being non-GPL, denying it access to GPL-only symbols.
Then I don't think that would impact ZFS either, because all of our modules that imports symbols from a non-GPL module (e.g. the zfs module importing symbols from the icp module) are already explicitly declared as non-GPL.
The OpenZFS modules only use non-GPL symbols so they will continue to work. I've verified this with the 5.9-rc2 kernel which includes this patch.
The OpenZFS modules only use non-GPL symbols so they will continue to work. I've verified this with the 5.9-rc2 kernel which includes this patch.
@behlendorf I just tried building 0.8.6-staging against 5.9.0 on my Ubuntu 20.04 arm64 machine and while the modules built just fine, I did get errors trying to load them.
dmesg complained a lot about GPL taint proprietary modules with regard to zlua. I could save the logs, but I will try to get more logs later this week. Not sure if I did something wrong here but wanted to flag it
I am using zfs 0.8.5 with kernel 5.9 without any issue. No errors during compilation and no errors - not even warnings - while loading and running the modules.
Finally managed to get some logs from the system that's throwing up with 5.9.1 and ZFS 0.8.5. Modules built no problem on kernel update, booted and got this:
[ 302.753969] zlua: module license 'MIT' taints kernel.
[ 302.753972] Disabling lock debugging due to kernel taint
[ 302.946920] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.948460] zfs: Unknown symbol lua_pcallk (err -2)
[ 302.948470] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.949931] zfs: Unknown symbol lua_touserdata (err -2)
[ 302.949943] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.951400] zfs: Unknown symbol lua_pushlightuserdata (err -2)
[ 302.951424] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.952857] zfs: Unknown symbol lua_atpanic (err -2)
[ 302.952885] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.954542] zfs: Unknown symbol lua_isnumber (err -2)
[ 302.954599] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.956425] zfs: Unknown symbol lua_sethook (err -2)
[ 302.956461] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.958237] zfs: Unknown symbol luaopen_string (err -2)
[ 302.958255] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.960040] zfs: Unknown symbol lua_getfield (err -2)
[ 302.960089] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.961809] zfs: Unknown symbol lua_next (err -2)
[ 302.961851] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.963548] zfs: Unknown symbol lua_gettop (err -2)
[ 302.963562] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.965243] zfs: Unknown symbol lua_pushvfstring (err -2)
[ 302.965291] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.966925] zfs: Unknown symbol lua_tointegerx (err -2)
[ 302.966947] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.968559] zfs: Unknown symbol lua_pushnumber (err -2)
[ 302.968586] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.970187] zfs: Unknown symbol lua_remove (err -2)
[ 302.970191] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.971798] zfs: Unknown symbol lua_setfield (err -2)
[ 302.971845] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.973077] zfs: Unknown symbol lua_isstring (err -2)
[ 302.973087] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.974308] zfs: Unknown symbol lua_pushvalue (err -2)
[ 302.974326] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.975525] zfs: Unknown symbol lua_pushnil (err -2)
[ 302.975536] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.976715] zfs: Unknown symbol luaL_error (err -2)
[ 302.976737] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.978087] zfs: Unknown symbol lua_settop (err -2)
[ 302.978116] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.979449] zfs: Unknown symbol lua_pushcclosure (err -2)
[ 302.979477] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.980788] zfs: Unknown symbol lua_pushfstring (err -2)
[ 302.980814] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.982116] zfs: Unknown symbol lua_tolstring (err -2)
[ 302.982130] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.983416] zfs: Unknown symbol lua_type (err -2)
[ 302.983439] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.984683] zfs: Unknown symbol lua_pushboolean (err -2)
[ 302.984703] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.985894] zfs: Unknown symbol lua_tonumberx (err -2)
[ 302.985934] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.987225] zfs: Unknown symbol lua_settable (err -2)
[ 302.987274] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.988544] zfs: Unknown symbol lua_setmetatable (err -2)
[ 302.988566] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.989823] zfs: Unknown symbol lua_close (err -2)
[ 302.989864] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.991073] zfs: Unknown symbol luaL_newmetatable (err -2)
[ 302.991099] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.992319] zfs: Unknown symbol lua_newuserdata (err -2)
[ 302.992419] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.993366] zfs: Unknown symbol lua_newstate (err -2)
[ 302.993384] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.994573] zfs: Unknown symbol lua_setglobal (err -2)
[ 302.994579] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.995717] zfs: Unknown symbol lua_error (err -2)
[ 302.995737] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.996879] zfs: Unknown symbol lua_absindex (err -2)
[ 302.996920] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.998029] zfs: Unknown symbol lua_checkstack (err -2)
[ 302.998037] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 302.999148] zfs: Unknown symbol lua_gettable (err -2)
[ 302.999154] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.000245] zfs: Unknown symbol lua_pushstring (err -2)
[ 303.000263] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.001338] zfs: Unknown symbol luaL_argerror (err -2)
[ 303.001342] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.002387] zfs: Unknown symbol luaL_loadbufferx (err -2)
[ 303.002467] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.003505] zfs: Unknown symbol luaopen_base (err -2)
[ 303.003532] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.004311] zfs: Unknown symbol luaopen_table (err -2)
[ 303.004346] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.005113] zfs: Unknown symbol lua_replace (err -2)
[ 303.005150] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.006131] zfs: Unknown symbol luaL_traceback (err -2)
[ 303.006179] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.007132] zfs: Unknown symbol luaopen_coroutine (err -2)
[ 303.007197] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.008128] zfs: Unknown symbol lua_toboolean (err -2)
[ 303.008132] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.009056] zfs: Unknown symbol lua_typename (err -2)
[ 303.009104] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.009967] zfs: Unknown symbol lua_createtable (err -2)
[ 303.009976] zfs: module using GPL-only symbols uses symbols from proprietary module zlua.
[ 303.010790] zfs: Unknown symbol lua_pushinteger (err -2)
@mabod you don't see any of these on your system?
I dont see that. module zlua is loaded without any error or warning.
And journalctl -b | grep -i gpl is empty.
This is an Arch Linux kernel 5.9.1-arch1-1 with zfs-dkms 0.8.5-1
^ but you're not running on arm64.
Right. That is then probably the issues. Looks like the arm64 source code is different.
Ok so I think we found the issue. The issue is that the license string for zlua in module/lua/lapi.c is set to MIT when it should be Dual MIT/GPL. This PR fixes the issue for me
I see the same taint message her in my log:
zlua: module license 'MIT' taints kernel.
But no further errors or warnings. Therefore I am not sure if a simple license string change is solving the issue for @ndanyluk
@mabod not sure if it's something deeper in the code, but manually applying that patch to 0.8.5-1 and building on my system appears to fix the issue. The zlua license no longer appears in the logs and the modules load/pools can be imported/mounted.
Most helpful comment
The OpenZFS modules only use non-GPL symbols so they will continue to work. I've verified this with the 5.9-rc2 kernel which includes this patch.