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
|
2005-04-17 05:20:36 +07:00
|
|
|
#
|
2011-03-30 08:25:21 +07:00
|
|
|
# Makefile for the Linux network device drivers.
|
2005-04-17 05:20:36 +07:00
|
|
|
#
|
|
|
|
|
|
|
|
#
|
2011-08-23 14:42:10 +07:00
|
|
|
# Networking Core Drivers
|
2005-04-17 05:20:36 +07:00
|
|
|
#
|
2011-08-23 14:42:10 +07:00
|
|
|
obj-$(CONFIG_BONDING) += bonding/
|
2014-11-24 14:07:46 +07:00
|
|
|
obj-$(CONFIG_IPVLAN) += ipvlan/
|
2017-02-11 07:03:52 +07:00
|
|
|
obj-$(CONFIG_IPVTAP) += ipvlan/
|
2005-04-17 05:20:36 +07:00
|
|
|
obj-$(CONFIG_DUMMY) += dummy.o
|
net: WireGuard secure network tunnel
WireGuard is a layer 3 secure networking tunnel made specifically for
the kernel, that aims to be much simpler and easier to audit than IPsec.
Extensive documentation and description of the protocol and
considerations, along with formal proofs of the cryptography, are
available at:
* https://www.wireguard.com/
* https://www.wireguard.com/papers/wireguard.pdf
This commit implements WireGuard as a simple network device driver,
accessible in the usual RTNL way used by virtual network drivers. It
makes use of the udp_tunnel APIs, GRO, GSO, NAPI, and the usual set of
networking subsystem APIs. It has a somewhat novel multicore queueing
system designed for maximum throughput and minimal latency of encryption
operations, but it is implemented modestly using workqueues and NAPI.
Configuration is done via generic Netlink, and following a review from
the Netlink maintainer a year ago, several high profile userspace tools
have already implemented the API.
This commit also comes with several different tests, both in-kernel
tests and out-of-kernel tests based on network namespaces, taking profit
of the fact that sockets used by WireGuard intentionally stay in the
namespace the WireGuard interface was originally created, exactly like
the semantics of userspace tun devices. See wireguard.com/netns/ for
pictures and examples.
The source code is fairly short, but rather than combining everything
into a single file, WireGuard is developed as cleanly separable files,
making auditing and comprehension easier. Things are laid out as
follows:
* noise.[ch], cookie.[ch], messages.h: These implement the bulk of the
cryptographic aspects of the protocol, and are mostly data-only in
nature, taking in buffers of bytes and spitting out buffers of
bytes. They also handle reference counting for their various shared
pieces of data, like keys and key lists.
* ratelimiter.[ch]: Used as an integral part of cookie.[ch] for
ratelimiting certain types of cryptographic operations in accordance
with particular WireGuard semantics.
* allowedips.[ch], peerlookup.[ch]: The main lookup structures of
WireGuard, the former being trie-like with particular semantics, an
integral part of the design of the protocol, and the latter just
being nice helper functions around the various hashtables we use.
* device.[ch]: Implementation of functions for the netdevice and for
rtnl, responsible for maintaining the life of a given interface and
wiring it up to the rest of WireGuard.
* peer.[ch]: Each interface has a list of peers, with helper functions
available here for creation, destruction, and reference counting.
* socket.[ch]: Implementation of functions related to udp_socket and
the general set of kernel socket APIs, for sending and receiving
ciphertext UDP packets, and taking care of WireGuard-specific sticky
socket routing semantics for the automatic roaming.
* netlink.[ch]: Userspace API entry point for configuring WireGuard
peers and devices. The API has been implemented by several userspace
tools and network management utility, and the WireGuard project
distributes the basic wg(8) tool.
* queueing.[ch]: Shared function on the rx and tx path for handling
the various queues used in the multicore algorithms.
* send.c: Handles encrypting outgoing packets in parallel on
multiple cores, before sending them in order on a single core, via
workqueues and ring buffers. Also handles sending handshake and cookie
messages as part of the protocol, in parallel.
* receive.c: Handles decrypting incoming packets in parallel on
multiple cores, before passing them off in order to be ingested via
the rest of the networking subsystem with GRO via the typical NAPI
poll function. Also handles receiving handshake and cookie messages
as part of the protocol, in parallel.
* timers.[ch]: Uses the timer wheel to implement protocol particular
event timeouts, and gives a set of very simple event-driven entry
point functions for callers.
* main.c, version.h: Initialization and deinitialization of the module.
* selftest/*.h: Runtime unit tests for some of the most security
sensitive functions.
* tools/testing/selftests/wireguard/netns.sh: Aforementioned testing
script using network namespaces.
This commit aims to be as self-contained as possible, implementing
WireGuard as a standalone module not needing much special handling or
coordination from the network subsystem. I expect for future
optimizations to the network stack to positively improve WireGuard, and
vice-versa, but for the time being, this exists as intentionally
standalone.
We introduce a menu option for CONFIG_WIREGUARD, as well as providing a
verbose debug log and self-tests via CONFIG_WIREGUARD_DEBUG.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Cc: David Miller <davem@davemloft.net>
Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
2019-12-09 06:27:34 +07:00
|
|
|
obj-$(CONFIG_WIREGUARD) += wireguard/
|
2011-08-23 14:42:10 +07:00
|
|
|
obj-$(CONFIG_EQUALIZER) += eql.o
|
2006-01-09 13:34:25 +07:00
|
|
|
obj-$(CONFIG_IFB) += ifb.o
|
2016-03-12 00:07:33 +07:00
|
|
|
obj-$(CONFIG_MACSEC) += macsec.o
|
2007-07-15 08:55:06 +07:00
|
|
|
obj-$(CONFIG_MACVLAN) += macvlan.o
|
2010-01-30 19:24:26 +07:00
|
|
|
obj-$(CONFIG_MACVTAP) += macvtap.o
|
2011-08-23 14:42:10 +07:00
|
|
|
obj-$(CONFIG_MII) += mii.o
|
|
|
|
obj-$(CONFIG_MDIO) += mdio.o
|
|
|
|
obj-$(CONFIG_NET) += Space.o loopback.o
|
|
|
|
obj-$(CONFIG_NETCONSOLE) += netconsole.o
|
2017-03-29 02:57:09 +07:00
|
|
|
obj-y += phy/
|
2011-08-23 14:42:10 +07:00
|
|
|
obj-$(CONFIG_RIONET) += rionet.o
|
2011-11-12 05:16:48 +07:00
|
|
|
obj-$(CONFIG_NET_TEAM) += team/
|
2005-04-17 05:20:36 +07:00
|
|
|
obj-$(CONFIG_TUN) += tun.o
|
2017-02-11 07:03:51 +07:00
|
|
|
obj-$(CONFIG_TAP) += tap.o
|
2007-09-26 06:14:46 +07:00
|
|
|
obj-$(CONFIG_VETH) += veth.o
|
2011-08-23 14:42:10 +07:00
|
|
|
obj-$(CONFIG_VIRTIO_NET) += virtio_net.o
|
2012-10-01 19:32:35 +07:00
|
|
|
obj-$(CONFIG_VXLAN) += vxlan.o
|
2015-05-13 23:57:30 +07:00
|
|
|
obj-$(CONFIG_GENEVE) += geneve.o
|
2020-02-24 12:27:50 +07:00
|
|
|
obj-$(CONFIG_BAREUDP) += bareudp.o
|
2016-05-09 05:55:48 +07:00
|
|
|
obj-$(CONFIG_GTP) += gtp.o
|
packet: nlmon: virtual netlink monitoring device for packet sockets
Currently, there is no good possibility to debug netlink traffic that
is being exchanged between kernel and user space. Therefore, this patch
implements a netlink virtual device, so that netlink messages will be
made visible to PF_PACKET sockets. Once there was an approach with a
similar idea [1], but it got forgotten somehow.
I think it makes most sense to accept the "overhead" of an extra netlink
net device over implementing the same functionality from PF_PACKET
sockets once again into netlink sockets. We have BPF filters that can
already be easily applied which even have netlink extensions, we have
RX_RING zero-copy between kernel- and user space that can be reused,
and much more features. So instead of re-implementing all of this, we
simply pass the skb to a given PF_PACKET socket for further analysis.
Another nice benefit that comes from that is that no code needs to be
changed in user space packet analyzers (maybe adding a dissector, but
not more), thus out of the box, we can already capture pcap files of
netlink traffic to debug/troubleshoot netlink problems.
Also thanks goes to Thomas Graf, Flavio Leitner, Jesper Dangaard Brouer.
[1] http://marc.info/?l=linux-netdev&m=113813401516110
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-06-22 00:38:08 +07:00
|
|
|
obj-$(CONFIG_NLMON) += nlmon.o
|
2015-08-14 03:59:10 +07:00
|
|
|
obj-$(CONFIG_NET_VRF) += vrf.o
|
2017-04-21 16:10:45 +07:00
|
|
|
obj-$(CONFIG_VSOCKMON) += vsockmon.o
|
2005-04-17 05:20:36 +07:00
|
|
|
|
2011-08-23 14:42:10 +07:00
|
|
|
#
|
|
|
|
# Networking Drivers
|
|
|
|
#
|
|
|
|
obj-$(CONFIG_ARCNET) += arcnet/
|
2005-04-17 05:20:36 +07:00
|
|
|
obj-$(CONFIG_DEV_APPLETALK) += appletalk/
|
2011-08-23 14:42:10 +07:00
|
|
|
obj-$(CONFIG_CAIF) += caif/
|
|
|
|
obj-$(CONFIG_CAN) += can/
|
2019-05-14 04:06:24 +07:00
|
|
|
obj-y += dsa/
|
2011-03-30 17:47:06 +07:00
|
|
|
obj-$(CONFIG_ETHERNET) += ethernet/
|
2011-07-31 14:06:29 +07:00
|
|
|
obj-$(CONFIG_FDDI) += fddi/
|
2011-08-02 12:48:13 +07:00
|
|
|
obj-$(CONFIG_HIPPI) += hippi/
|
2011-08-23 14:42:10 +07:00
|
|
|
obj-$(CONFIG_HAMRADIO) += hamradio/
|
2020-03-06 11:28:29 +07:00
|
|
|
obj-$(CONFIG_QCOM_IPA) += ipa/
|
2011-08-03 17:01:58 +07:00
|
|
|
obj-$(CONFIG_PLIP) += plip/
|
2011-08-30 01:49:40 +07:00
|
|
|
obj-$(CONFIG_PPP) += ppp/
|
2011-07-31 16:38:19 +07:00
|
|
|
obj-$(CONFIG_PPP_ASYNC) += ppp/
|
|
|
|
obj-$(CONFIG_PPP_BSDCOMP) += ppp/
|
|
|
|
obj-$(CONFIG_PPP_DEFLATE) += ppp/
|
|
|
|
obj-$(CONFIG_PPP_MPPE) += ppp/
|
|
|
|
obj-$(CONFIG_PPP_SYNC_TTY) += ppp/
|
|
|
|
obj-$(CONFIG_PPPOE) += ppp/
|
|
|
|
obj-$(CONFIG_PPPOL2TP) += ppp/
|
|
|
|
obj-$(CONFIG_PPTP) += ppp/
|
2011-08-30 01:49:40 +07:00
|
|
|
obj-$(CONFIG_SLIP) += slip/
|
2011-08-03 17:17:13 +07:00
|
|
|
obj-$(CONFIG_SLHC) += slip/
|
2011-08-23 14:42:10 +07:00
|
|
|
obj-$(CONFIG_NET_SB1000) += sb1000.o
|
|
|
|
obj-$(CONFIG_SUNGEM_PHY) += sungem_phy.o
|
2005-04-17 05:20:36 +07:00
|
|
|
obj-$(CONFIG_WAN) += wan/
|
2011-08-23 14:42:10 +07:00
|
|
|
obj-$(CONFIG_WLAN) += wireless/
|
|
|
|
obj-$(CONFIG_WIMAX) += wimax/
|
2012-08-26 12:10:11 +07:00
|
|
|
obj-$(CONFIG_IEEE802154) += ieee802154/
|
2011-08-23 14:42:10 +07:00
|
|
|
|
|
|
|
obj-$(CONFIG_VMXNET3) += vmxnet3/
|
|
|
|
obj-$(CONFIG_XEN_NETDEV_FRONTEND) += xen-netfront.o
|
|
|
|
obj-$(CONFIG_XEN_NETDEV_BACKEND) += xen-netback/
|
2007-05-10 08:31:55 +07:00
|
|
|
|
2014-08-06 04:10:52 +07:00
|
|
|
obj-$(CONFIG_USB_NET_DRIVERS) += usb/
|
2011-11-29 04:35:35 +07:00
|
|
|
|
|
|
|
obj-$(CONFIG_HYPERV_NET) += hyperv/
|
2012-11-17 09:27:13 +07:00
|
|
|
obj-$(CONFIG_NTB_NETDEV) += ntb_netdev.o
|
2015-08-21 15:29:17 +07:00
|
|
|
|
|
|
|
obj-$(CONFIG_FUJITSU_ES) += fjes/
|
2017-10-02 17:38:45 +07:00
|
|
|
|
|
|
|
thunderbolt-net-y += thunderbolt.o
|
2019-12-17 19:33:41 +07:00
|
|
|
obj-$(CONFIG_USB4_NET) += thunderbolt-net.o
|
2017-12-02 06:08:58 +07:00
|
|
|
obj-$(CONFIG_NETDEVSIM) += netdevsim/
|
2018-05-24 23:55:15 +07:00
|
|
|
obj-$(CONFIG_NET_FAILOVER) += net_failover.o
|