License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 21:07:57 +07:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2007-04-24 02:20:05 +07:00
|
|
|
obj-$(CONFIG_CFG80211) += cfg80211.o
|
2008-09-25 05:13:14 +07:00
|
|
|
obj-$(CONFIG_LIB80211) += lib80211.o
|
2008-10-29 22:35:05 +07:00
|
|
|
obj-$(CONFIG_LIB80211_CRYPT_WEP) += lib80211_crypt_wep.o
|
|
|
|
obj-$(CONFIG_LIB80211_CRYPT_CCMP) += lib80211_crypt_ccmp.o
|
|
|
|
obj-$(CONFIG_LIB80211_CRYPT_TKIP) += lib80211_crypt_tkip.o
|
2007-04-24 02:20:05 +07:00
|
|
|
|
2009-09-30 04:27:28 +07:00
|
|
|
obj-$(CONFIG_WEXT_CORE) += wext-core.o
|
|
|
|
obj-$(CONFIG_WEXT_PROC) += wext-proc.o
|
|
|
|
obj-$(CONFIG_WEXT_SPY) += wext-spy.o
|
|
|
|
obj-$(CONFIG_WEXT_PRIV) += wext-priv.o
|
|
|
|
|
2009-08-07 22:22:35 +07:00
|
|
|
cfg80211-y += core.o sysfs.o radiotap.o util.o reg.o scan.o nl80211.o
|
2014-11-03 16:33:18 +07:00
|
|
|
cfg80211-y += mlme.o ibss.o sme.o chan.o ethtool.o mesh.o ap.o trace.o ocb.o
|
cfg80211: add peer measurement with FTM initiator API
Add a new "peer measurement" API, that can be used to measure
certain things related to a peer. Right now, only implement
FTM (flight time measurement) over it, but the idea is that
it'll be extensible to also support measuring the necessary
things to calculate e.g. angle-of-arrival for WiGig.
The API is structured to have a generic list of peers and
channels to measure with/on, and then for each of those a
set of measurements (again, only FTM right now) to perform.
Results are sent to the requesting socket, including a final
complete message.
Closing the controlling netlink socket will abort a running
measurement.
v3:
- add a bit to report "final" for partial results
- remove list keeping etc. and just unicast out the results
to the requester (big code reduction ...)
- also send complete message unicast, and as a result
remove the multicast group
- separate out struct cfg80211_pmsr_ftm_request_peer
from struct cfg80211_pmsr_request_peer
- document timeout == 0 if no timeout
- disallow setting timeout nl80211 attribute to 0,
must not include attribute for no timeout
- make MAC address randomization optional
- change num bursts exponent default to 0 (1 burst, rather
rather than the old default of 15==don't care)
v4:
- clarify NL80211_ATTR_TIMEOUT documentation
v5:
- remove unnecessary nl80211 multicast/family changes
- remove partial results bit/flag, final is sufficient
- add max_bursts_exponent, max_ftms_per_burst to capability
- rename "frames per burst" -> "FTMs per burst"
v6:
- rename cfg80211_pmsr_free_wdev() to cfg80211_pmsr_wdev_down()
and call it in leave, so the device can't go down with any
pending measurements
v7:
- wording fixes (Lior)
- fix ftm.max_bursts_exponent to allow having the limit of 0 (Lior)
v8:
- copyright statements
- minor coding style fixes
- fix error path leak
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2018-09-10 18:29:12 +07:00
|
|
|
cfg80211-y += pmsr.o
|
2017-01-05 00:58:31 +07:00
|
|
|
cfg80211-$(CONFIG_OF) += of.o
|
2009-05-02 11:37:21 +07:00
|
|
|
cfg80211-$(CONFIG_CFG80211_DEBUGFS) += debugfs.o
|
2009-09-30 04:27:28 +07:00
|
|
|
cfg80211-$(CONFIG_CFG80211_WEXT) += wext-compat.o wext-sme.o
|
2008-12-09 18:39:52 +07:00
|
|
|
|
2012-07-31 22:48:27 +07:00
|
|
|
CFLAGS_trace.o := -I$(src)
|
2017-09-14 03:21:08 +07:00
|
|
|
|
|
|
|
cfg80211-$(CONFIG_CFG80211_USE_KERNEL_REGDB_KEYS) += shipped-certs.o
|
|
|
|
ifneq ($(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR),)
|
|
|
|
cfg80211-y += extra-certs.o
|
|
|
|
endif
|
|
|
|
|
2017-12-19 15:26:17 +07:00
|
|
|
$(obj)/shipped-certs.c: $(wildcard $(srctree)/$(src)/certs/*.hex)
|
2017-10-13 19:04:30 +07:00
|
|
|
@$(kecho) " GEN $@"
|
2017-12-19 15:26:17 +07:00
|
|
|
@(echo '#include "reg.h"'; \
|
|
|
|
echo 'const u8 shipped_regdb_certs[] = {'; \
|
|
|
|
cat $^ ; \
|
|
|
|
echo '};'; \
|
|
|
|
echo 'unsigned int shipped_regdb_certs_len = sizeof(shipped_regdb_certs);'; \
|
|
|
|
) > $@
|
2017-09-14 03:21:08 +07:00
|
|
|
|
|
|
|
$(obj)/extra-certs.c: $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%) \
|
|
|
|
$(wildcard $(CONFIG_CFG80211_EXTRA_REGDB_KEYDIR:"%"=%)/*.x509)
|
2017-10-13 19:04:30 +07:00
|
|
|
@$(kecho) " GEN $@"
|
2017-12-05 17:59:33 +07:00
|
|
|
@(set -e; \
|
|
|
|
allf=""; \
|
|
|
|
for f in $^ ; do \
|
2019-05-08 00:28:15 +07:00
|
|
|
test -f $$f || continue;\
|
2017-12-05 17:59:33 +07:00
|
|
|
# similar to hexdump -v -e '1/1 "0x%.2x," "\n"' \
|
|
|
|
thisf=$$(od -An -v -tx1 < $$f | \
|
|
|
|
sed -e 's/ /\n/g' | \
|
|
|
|
sed -e 's/^[0-9a-f]\+$$/\0/;t;d' | \
|
|
|
|
sed -e 's/^/0x/;s/$$/,/'); \
|
|
|
|
# file should not be empty - maybe command substitution failed? \
|
|
|
|
test ! -z "$$thisf";\
|
|
|
|
allf=$$allf$$thisf;\
|
|
|
|
done; \
|
|
|
|
( \
|
|
|
|
echo '#include "reg.h"'; \
|
|
|
|
echo 'const u8 extra_regdb_certs[] = {'; \
|
|
|
|
echo "$$allf"; \
|
|
|
|
echo '};'; \
|
|
|
|
echo 'unsigned int extra_regdb_certs_len = sizeof(extra_regdb_certs);'; \
|
2017-12-14 20:33:38 +07:00
|
|
|
) > $@)
|
2017-12-19 15:26:17 +07:00
|
|
|
|
|
|
|
clean-files += shipped-certs.c extra-certs.c
|