-
-
Notifications
You must be signed in to change notification settings - Fork 556
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add and modify license rules to fix detections
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
- Loading branch information
1 parent
0432bf6
commit 3b8a9ce
Showing
18 changed files
with
147 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
is_false_positive: yes | ||
notes: seen in kernel /Documentation/process/license-rules.rst | ||
--- | ||
|
||
The SPDX license identifier in kernel files shall be added at the first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
is_false_positive: yes | ||
notes: seen in kernel /Documentation/process/license-rules.rst | ||
--- | ||
|
||
The SPDX license identifier is added in form of a comment. The comment | ||
style depends on the file type:: | ||
|
||
C source: // SPDX-License-Identifier: <SPDX License Expression> | ||
C header: /* SPDX-License-Identifier: <SPDX License Expression> */ | ||
ASM: /* SPDX-License-Identifier: <SPDX License Expression> */ | ||
scripts: # SPDX-License-Identifier: <SPDX License Expression> | ||
.rst: .. SPDX-License-Identifier: <SPDX License Expression> | ||
.dts{i}: // SPDX-License-Identifier: <SPDX License Expression> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
is_false_positive: yes | ||
notes: seen in kernel /Documentation/process/license-rules.rst | ||
--- | ||
|
||
(SPDX-License-Identifier) nor in any way relevant for expressing or |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
is_false_positive: yes | ||
notes: seen at drivers/block/floppy.c | ||
--- | ||
|
||
* modeled after the freeware MS-DOS program fdformat/88 V1.8 by |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
is_false_positive: yes | ||
notes: seen at kernel/bpf/syscall.c | ||
--- | ||
|
||
sizeof(license) - 1) < 0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
is_false_positive: yes | ||
notes: seen at kernel/bpf/syscall.c | ||
--- | ||
|
||
license[sizeof(license) - 1] = 0; |
9 changes: 9 additions & 0 deletions
9
src/licensedcode/data/rules/gcc-linking-exception-2.0_13.RULE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
license_expression: gcc-linking-exception-2.0 | ||
is_license_tag: yes | ||
relevance: 70 | ||
minimum_coverage: 100 | ||
notes: seen in kernel /Documentation/process/license-rules.rst | ||
--- | ||
|
||
SPDX-License-Identifier: <SPDX-License> WITH GCC-exception-2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
license_expression: gpl-2.0-plus | ||
is_license_reference: yes | ||
minimum_coverage: 100 | ||
--- | ||
|
||
MODULE_LICENSE("GPL"); | ||
// Actually dual-licensed, but it doesn't matter for | ||
// the sake of this tag. It's Free Software. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
license_expression: gpl-2.0-plus OR bsd-new | ||
is_license_tag: yes | ||
relevance: 100 | ||
minimum_coverage: 100 | ||
notes: seen at linux/include/dt-bindings/reset/amlogic,meson-axg-reset.h | ||
--- | ||
|
||
* SPDX-License-Identifier: (GPL-2.0+ OR BSD) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...lus_and_gpl-2.0-plus_and_lgpl-2.0_and_lgpl-2.0-plus_and_lgpl-2.1_and_lgpl-2.1-plus_1.RULE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
license_expression: gpl-2.0 AND gpl-1.0-plus AND gpl-2.0-plus AND lgpl-2.0 AND lgpl-2.0-plus | ||
AND lgpl-2.1 AND lgpl-2.1-plus | ||
is_license_notice: yes | ||
minimum_coverage: 90 | ||
--- | ||
|
||
The license described in the COPYING file applies to the kernel source | ||
as a whole, though individual source files can have a different license | ||
which is required to be compatible with the GPL-2.0:: | ||
|
||
GPL-1.0+ : GNU General Public License v1.0 or later | ||
GPL-2.0+ : GNU General Public License v2.0 or later | ||
LGPL-2.0 : GNU Library General Public License v2 only | ||
LGPL-2.0+ : GNU Library General Public License v2 or later | ||
LGPL-2.1 : GNU Lesser General Public License v2.1 only | ||
LGPL-2.1+ : GNU Lesser General Public License v2.1 or later |
10 changes: 10 additions & 0 deletions
10
src/licensedcode/data/rules/gpl-2.0_with_linux-syscall-exception-gpl_14.RULE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
license_expression: gpl-2.0 WITH linux-syscall-exception-gpl | ||
is_license_notice: yes | ||
notes: seen in kernel /Documentation/process/license-rules.rst | ||
--- | ||
|
||
The Linux Kernel is provided under the terms of the {{GNU General Public | ||
License version 2 only}} (GPL-2.0), as provided in LICENSES/preferred/GPL-2.0, | ||
with an explicit syscall exception described in | ||
{{LICENSES/exceptions/Linux-syscall-note}}, as described in the COPYING file. |
10 changes: 10 additions & 0 deletions
10
src/licensedcode/data/rules/license-clue_free-unknown_5.RULE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
license_expression: free-unknown | ||
is_license_clue: yes | ||
minimum_coverage: 100 | ||
notes: seen in kernel /Documentation/process/license-rules.rst | ||
--- | ||
|
||
Aside from that, individual files can be provided under a dual license, | ||
e.g. one of the compatible GPL variants and alternatively under a | ||
permissive license like BSD, MIT etc. |
16 changes: 16 additions & 0 deletions
16
src/licensedcode/data/rules/license-clue_free-unknown_6.RULE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
license_expression: free-unknown | ||
is_license_clue: yes | ||
minimum_coverage: 95 | ||
notes: seen in kernel /Documentation/process/license-rules.rst | ||
--- | ||
|
||
Dual Licensing Only | ||
|
||
These licenses should only be used to dual license code with another | ||
license in addition to a preferred license. These licenses are available | ||
from the directory:: | ||
|
||
LICENSES/dual/ | ||
|
||
in the kernel source tree. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
license_expression: unknown-license-reference | ||
is_license_intro: yes | ||
--- | ||
|
||
* Some parts copyright and used with permission. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
license_expression: unknown-license-reference | ||
is_license_intro: yes | ||
--- | ||
|
||
including portions of which come from the | ||
Developer's Reference Manual and used with permission |
9 changes: 9 additions & 0 deletions
9
src/licensedcode/data/rules/linux-syscall-exception-gpl_11.RULE
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
license_expression: linux-syscall-exception-gpl | ||
is_license_tag: yes | ||
relevance: 70 | ||
minimum_coverage: 100 | ||
notes: seen in kernel /Documentation/process/license-rules.rst | ||
--- | ||
|
||
SPDX-License-Identifier: <SPDX-License> WITH Linux-syscall-note |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
--- | ||
license_expression: proprietary-license | ||
is_license_notice: yes | ||
is_license_clue: yes | ||
relevance: 100 | ||
--- | ||
|
||
|