Skip to content
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

sys/queue.h:remove CONFIG_ALLOW_MIT_COMPONENTS #8326

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

anjiahao1
Copy link
Contributor

@anjiahao1 anjiahao1 commented Jan 28, 2023

Summary

Remove CONFIG_BSD_COMPONENTS from header file sys/queue.h

Impact

use sys/queue.h

Testing

Vela

@acassis
Copy link
Contributor

acassis commented Jan 28, 2023

@anjiahao1 if BSD or MIT licenses are enabled by default and some BSD or MIT code are included in the final binary we need some way alert the user and ask him to confirm (pressing Y/N question) with this decision.
It is because Apache license theoretically protects again patent litigation, so if some company are using NuttX and has some patented code that was included on NuttX, they cannot sue other company using NuttX, because the license protect that company in this case.

@xiaoxiang781216
Copy link
Contributor

xiaoxiang781216 commented Jan 28, 2023

@acassis If so, for this simple code:
https://github.com/apache/nuttx/blob/master/include/sys/queue.h#L46
does it make sense to be guarded by CONFIG_ALLOW_BSD_COMPONENTS? It's definitely doesn't have any patent issue, but very annoy the end user.

@acassis
Copy link
Contributor

acassis commented Jan 28, 2023

@xiaoxiang781216 maybe an better option is to contact the original author of this code and ask if he agrees to re-license it under Apache. Or, you can do just like Samsung did with NuttX some years ago: add Apache license in the head and keep the BSD license and its author under it.

@xiaoxiang781216
Copy link
Contributor

xiaoxiang781216 commented Jan 28, 2023

What's the difference if we keep the original BSD license and author without and Apache llicense?

@acassis
Copy link
Contributor

acassis commented Jan 28, 2023

Other thing I'm thinking now: to use the "tainted kernel" flag like in the Linux kernel. In their case they want all code been GPL without proprietary license. In your case we want all code Apache, so when some code that is BSD/MIT/Other is enabled this flag will change. Then in the final binary we can identify if this flag is enabled and alert the user.

@acassis
Copy link
Contributor

acassis commented Jan 28, 2023

What's the difference if we keep the original BSD license and author without and Apache llicense?

I'm not a lawyer, but when I contacted Samsung many years ago they told me their legal department explained to them this was the right way to do. i.e.: https://github.com/Samsung/TizenRT/blob/master/os/fs/smartfs/smartfs_smart.c

@acassis acassis requested a review from jerpelea January 28, 2023 14:42
@xiaoxiang781216
Copy link
Contributor

If so, how about remove CONFIG_ALLOW_BSD_COMPONENTS from the well documented algo(e.g. list, hash...) and pretend Apache copyright before BSD copyright? All these algo exist in the public domain for many years and implement in all OS, I don't believe anyone will raise IP issue for them.

@acassis
Copy link
Contributor

acassis commented Jan 28, 2023

If so, how about remove CONFIG_ALLOW_BSD_COMPONENTS from the well documented algo(e.g. list, hash...) and pretend Apache copyright before BSD copyright? All these algo exist in the public domain for many years and implement in all OS, I don't believe anyone will raise IP issue for them.

Ok, if you are sure it is Public Domain then you can go ahead and remove this #ifdef. BTW, seems like it was @anjiahao himself that included this code (at least according to git blame)

@xiaoxiang781216
Copy link
Contributor

If so, how about remove CONFIG_ALLOW_BSD_COMPONENTS from the well documented algo(e.g. list, hash...) and pretend Apache copyright before BSD copyright? All these algo exist in the public domain for many years and implement in all OS, I don't believe anyone will raise IP issue for them.

Ok, if you are sure it is Public Domain then you can go ahead and remove this #ifdef.

The code base comes from FreeBSD, I think it's enough to keep the original copyright/owner and record it in LISENCSE since the code just contain the well-known algorithm, no any special/unusual code.

BTW, seems like it was @anjiahao himself that included this code (at least according to git blame)

It's added during the review(#6828 (review)), but we found that it's too annoy to condition the frequent used feature.

@acassis
Copy link
Contributor

acassis commented Jan 28, 2023

Yes, I think it is better to remove the #ifdef CONFIG_ALLOW_BSD_COMPONENTS from that file than making ALLOW_BSD_COMPONENTS =y default. If you really want to make ALLOW_BSD_COMPONENTS=y default, please include some tainted kernel logic to warn the user at the end of compilation that the generated nuttx.bin is using BSD code that are not protected by Apache license.

@anjiahao1 anjiahao1 changed the title Lisencse:Use BSD & MIT default sys/queue.h:remove CONFIG_ALLOW_MIT_COMPONENTS Jan 29, 2023
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
@xiaoxiang781216
Copy link
Contributor

@acassis done.

@xiaoxiang781216 xiaoxiang781216 merged commit 3cfd8a3 into apache:master Jan 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants