-
Notifications
You must be signed in to change notification settings - Fork 436
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
samples: add Rust GPL access test sample #866
base: rust
Are you sure you want to change the base?
Conversation
Greg asked me to double-check whether we could use GPL symbols from non-GPL compatible Rust kernel modules. So I decided to ensure this in the CI via this sample. Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
@@ -0,0 +1,53 @@ | |||
// SPDX-License-Identifier: GPL-2.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this line be:
// SPDX-License-Identifier: GPL-2.0 | |
// SPDX-License-Identifier: Happy Little Accidents License |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on top of module!
is intended to clarify this, but maybe I should clarify it further if it is not clear: no, the module is still GPL-2.0 (otherwise, we would have an issue adding it to the kernel) and the bogus value for the license
field is only there out of necessity for the test.
I think this is fine, since the SPDX line is what really counts legally and the MODULE_LICENSE
is just a technical mechanism to prevent mistakes -- from the docs:
Loadable kernel modules also require a MODULE_LICENSE() tag. This tag is
neither a replacement for proper source code license information
(SPDX-License-Identifier) nor in any way relevant for expressing or
determining the exact license under which the source code of the module
is provided.
The sole purpose of this tag is to provide sufficient information
whether the module is free software or proprietary for the kernel
module loader and for user space tools.
and from Thomas Gleixner's commit message:
- None of the MODULE_LICENSE strings can be used for expressing or
determining the exact license
- Their sole purpose is to decide whether the module is free software or
not.
We may still trigger an alarm in the future in some script somewhere when they detect the mismatch (in 5.0, apparently ~25% of modules got it wrong... not sure how things are now :-), but I guess those scripts could have an exception set.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not at all, thanks to you for checking! :)
Greg asked me to double-check whether we could use GPL symbols from
non-GPL compatible Rust kernel modules.
So I decided to ensure this in the CI via this sample.
Signed-off-by: Miguel Ojeda ojeda@kernel.org