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 17:07:57 +03:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2007-09-20 21:09:35 +04:00
|
|
|
#ifndef __NET_WIRELESS_NL80211_H
|
|
|
|
#define __NET_WIRELESS_NL80211_H
|
|
|
|
|
|
|
|
#include "core.h"
|
|
|
|
|
2009-07-01 23:26:46 +04:00
|
|
|
int nl80211_init(void);
|
|
|
|
void nl80211_exit(void);
|
2014-05-26 15:52:25 +04:00
|
|
|
void nl80211_notify_wiphy(struct cfg80211_registered_device *rdev,
|
|
|
|
enum nl80211_commands cmd);
|
2016-08-04 00:58:33 +03:00
|
|
|
void nl80211_notify_iface(struct cfg80211_registered_device *rdev,
|
|
|
|
struct wireless_dev *wdev,
|
|
|
|
enum nl80211_commands cmd);
|
2009-07-01 23:26:46 +04:00
|
|
|
void nl80211_send_scan_start(struct cfg80211_registered_device *rdev,
|
2012-06-18 21:17:03 +04:00
|
|
|
struct wireless_dev *wdev);
|
cfg80211: send scan results from work queue
Due to the previous commit, when a scan finishes, it is in theory
possible to hit the following sequence:
1. interface starts being removed
2. scan is cancelled by driver and cfg80211 is notified
3. scan done work is scheduled
4. interface is removed completely, rdev->scan_req is freed,
event sent to userspace but scan done work remains pending
5. new scan is requested on another virtual interface
6. scan done work runs, freeing the still-running scan
To fix this situation, hang on to the scan done message and block
new scans while that is the case, and only send the message from
the work function, regardless of whether the scan_req is already
freed from interface removal. This makes step 5 above impossible
and changes step 6 to be
5. scan done work runs, sending the scan done message
As this can't work for wext, so we send the message immediately,
but this shouldn't be an issue since we still return -EBUSY.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
2014-01-22 13:14:19 +04:00
|
|
|
struct sk_buff *nl80211_build_scan_msg(struct cfg80211_registered_device *rdev,
|
|
|
|
struct wireless_dev *wdev, bool aborted);
|
2016-12-16 14:21:54 +03:00
|
|
|
void nl80211_send_scan_msg(struct cfg80211_registered_device *rdev,
|
|
|
|
struct sk_buff *msg);
|
2017-04-13 15:06:27 +03:00
|
|
|
void nl80211_send_sched_scan(struct cfg80211_sched_scan_request *req, u32 cmd);
|
2014-12-15 20:26:00 +03:00
|
|
|
void nl80211_common_reg_change_event(enum nl80211_commands cmd_id,
|
|
|
|
struct regulatory_request *request);
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
nl80211_send_reg_change_event(struct regulatory_request *request)
|
|
|
|
{
|
|
|
|
nl80211_common_reg_change_event(NL80211_CMD_REG_CHANGE, request);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline void
|
|
|
|
nl80211_send_wiphy_reg_change_event(struct regulatory_request *request)
|
|
|
|
{
|
|
|
|
nl80211_common_reg_change_event(NL80211_CMD_WIPHY_REG_CHANGE, request);
|
|
|
|
}
|
|
|
|
|
2009-07-01 23:26:46 +04:00
|
|
|
void nl80211_send_rx_auth(struct cfg80211_registered_device *rdev,
|
|
|
|
struct net_device *netdev,
|
2009-07-01 23:26:47 +04:00
|
|
|
const u8 *buf, size_t len, gfp_t gfp);
|
2009-07-01 23:26:46 +04:00
|
|
|
void nl80211_send_rx_assoc(struct cfg80211_registered_device *rdev,
|
|
|
|
struct net_device *netdev,
|
2014-09-09 18:09:45 +04:00
|
|
|
const u8 *buf, size_t len, gfp_t gfp,
|
|
|
|
int uapsd_queues);
|
2009-07-01 23:26:46 +04:00
|
|
|
void nl80211_send_deauth(struct cfg80211_registered_device *rdev,
|
|
|
|
struct net_device *netdev,
|
2009-07-01 23:26:47 +04:00
|
|
|
const u8 *buf, size_t len, gfp_t gfp);
|
2009-07-01 23:26:46 +04:00
|
|
|
void nl80211_send_disassoc(struct cfg80211_registered_device *rdev,
|
|
|
|
struct net_device *netdev,
|
2009-07-01 23:26:47 +04:00
|
|
|
const u8 *buf, size_t len, gfp_t gfp);
|
2009-07-01 23:26:46 +04:00
|
|
|
void nl80211_send_auth_timeout(struct cfg80211_registered_device *rdev,
|
|
|
|
struct net_device *netdev,
|
2009-07-01 23:26:47 +04:00
|
|
|
const u8 *addr, gfp_t gfp);
|
2009-07-01 23:26:46 +04:00
|
|
|
void nl80211_send_assoc_timeout(struct cfg80211_registered_device *rdev,
|
2009-03-27 21:53:56 +03:00
|
|
|
struct net_device *netdev,
|
2009-07-01 23:26:47 +04:00
|
|
|
const u8 *addr, gfp_t gfp);
|
2009-07-01 23:26:54 +04:00
|
|
|
void nl80211_send_connect_result(struct cfg80211_registered_device *rdev,
|
2017-03-31 00:22:33 +03:00
|
|
|
struct net_device *netdev,
|
|
|
|
struct cfg80211_connect_resp_params *params,
|
2017-01-13 02:12:21 +03:00
|
|
|
gfp_t gfp);
|
2009-07-01 23:26:54 +04:00
|
|
|
void nl80211_send_roamed(struct cfg80211_registered_device *rdev,
|
2017-04-26 10:58:49 +03:00
|
|
|
struct net_device *netdev,
|
|
|
|
struct cfg80211_roam_info *info, gfp_t gfp);
|
2017-09-29 15:21:49 +03:00
|
|
|
void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev,
|
|
|
|
struct net_device *netdev, const u8 *bssid);
|
2009-07-01 23:26:54 +04:00
|
|
|
void nl80211_send_disconnected(struct cfg80211_registered_device *rdev,
|
|
|
|
struct net_device *netdev, u16 reason,
|
2009-07-07 05:56:11 +04:00
|
|
|
const u8 *ie, size_t ie_len, bool from_ap);
|
2009-07-01 23:26:54 +04:00
|
|
|
|
2009-07-01 23:26:46 +04:00
|
|
|
void
|
2009-03-27 22:59:49 +03:00
|
|
|
nl80211_michael_mic_failure(struct cfg80211_registered_device *rdev,
|
|
|
|
struct net_device *netdev, const u8 *addr,
|
|
|
|
enum nl80211_key_type key_type,
|
2009-07-01 23:26:47 +04:00
|
|
|
int key_id, const u8 *tsc, gfp_t gfp);
|
2007-09-20 21:09:35 +04:00
|
|
|
|
2009-07-01 23:26:46 +04:00
|
|
|
void
|
2009-04-02 22:08:09 +04:00
|
|
|
nl80211_send_beacon_hint_event(struct wiphy *wiphy,
|
|
|
|
struct ieee80211_channel *channel_before,
|
|
|
|
struct ieee80211_channel *channel_after);
|
|
|
|
|
2009-04-19 23:24:32 +04:00
|
|
|
void nl80211_send_ibss_bssid(struct cfg80211_registered_device *rdev,
|
|
|
|
struct net_device *netdev, const u8 *bssid,
|
|
|
|
gfp_t gfp);
|
|
|
|
|
2010-08-12 17:38:38 +04:00
|
|
|
int nl80211_send_mgmt(struct cfg80211_registered_device *rdev,
|
2012-06-15 17:30:18 +04:00
|
|
|
struct wireless_dev *wdev, u32 nlpid,
|
2012-03-06 01:18:41 +04:00
|
|
|
int freq, int sig_dbm,
|
2013-08-15 15:51:28 +04:00
|
|
|
const u8 *buf, size_t len, u32 flags, gfp_t gfp);
|
2013-02-08 21:16:19 +04:00
|
|
|
|
|
|
|
void
|
|
|
|
nl80211_radar_notify(struct cfg80211_registered_device *rdev,
|
2013-11-06 16:55:51 +04:00
|
|
|
const struct cfg80211_chan_def *chandef,
|
2013-02-08 21:16:19 +04:00
|
|
|
enum nl80211_radar_event event,
|
|
|
|
struct net_device *netdev, gfp_t gfp);
|
|
|
|
|
2014-01-24 17:06:29 +04:00
|
|
|
void nl80211_send_ap_stopped(struct wireless_dev *wdev);
|
|
|
|
|
2013-06-28 22:51:26 +04:00
|
|
|
void cfg80211_rdev_free_coalesce(struct cfg80211_registered_device *rdev);
|
|
|
|
|
2007-09-20 21:09:35 +04:00
|
|
|
#endif /* __NET_WIRELESS_NL80211_H */
|