Re: [PATCH] rust: macros: add `paste!` proc macro

From: Greg KH
Date: Thu Aug 10 2023 - 11:46:44 EST


On Thu, Aug 10, 2023 at 09:56:18AM +0200, Miguel Ojeda wrote:
> On Thu, Aug 10, 2023 at 7:08 AM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
> >
> > The kernel will migrate when we have converted all files in the tree to
> > SPDX and can worry about things like the SPDX version level. We have a
> > ways to go still...
>
> I see, thanks!
>
> > Be VERY careful with dual licenses please, and especially non-GPL ones
> > in the kernel tree. It gets tricky very very quickly and you need to
> > know what you are doing. So much so that I really want to see a lawyer
> > sign off on such a thing so that everyone involved understands the
> > issues that this requires.
>
> It is the common one used in Rust projects, which we are using for
> other bits too, e.g. vendoring the `alloc` standard library.
>
> Since these couple functions are essentially a compiler plugin (a proc
> macro) that is useful in userspace and other contexts too, Gary wanted
> to use that license (he contributes the other kernel code under
> GPL-2.0). For instance, he may possibly want to put those functions in
> crates.io or similar, I imagine (like the linked crate this replaces
> as a simplification).

If he, as the copyright owner, wants to take the code and do anything
else with it, under any other license, they can. There's nothing
preventing them from doing that, a dual license is not needed (as long
as you don't take any changes that anyone else made under a different
license.)

Which is one of the main reasons dual license isn't really needed, if
the author wants the code to go somewhere else also, they are free to do
so as they own the copyright.

So please think carefully about mixing licenses like this, it's almost
never needed, and keeping the files with multiple licenses is a major
pain to handle over time.

good luck!

greg k-h