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 22:07:57 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2005-04-17 06:20:36 +08:00
|
|
|
#
|
2011-03-30 09:25:21 +08:00
|
|
|
# Makefile for the Linux network device drivers.
|
2005-04-17 06:20:36 +08:00
|
|
|
#
|
|
|
|
|
|
|
|
#
|
2011-08-23 15:42:10 +08:00
|
|
|
# Networking Core Drivers
|
2005-04-17 06:20:36 +08:00
|
|
|
#
|
2011-08-23 15:42:10 +08:00
|
|
|
obj-$(CONFIG_BONDING) += bonding/
|
2014-11-24 15:07:46 +08:00
|
|
|
obj-$(CONFIG_IPVLAN) += ipvlan/
|
2017-02-11 08:03:52 +08:00
|
|
|
obj-$(CONFIG_IPVTAP) += ipvlan/
|
2005-04-17 06:20:36 +08: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 07:27:34 +08:00
|
|
|
obj-$(CONFIG_WIREGUARD) += wireguard/
|
2011-08-23 15:42:10 +08:00
|
|
|
obj-$(CONFIG_EQUALIZER) += eql.o
|
2006-01-09 14:34:25 +08:00
|
|
|
obj-$(CONFIG_IFB) += ifb.o
|
2016-03-12 01:07:33 +08:00
|
|
|
obj-$(CONFIG_MACSEC) += macsec.o
|
2007-07-15 09:55:06 +08:00
|
|
|
obj-$(CONFIG_MACVLAN) += macvlan.o
|
2010-01-30 20:24:26 +08:00
|
|
|
obj-$(CONFIG_MACVTAP) += macvtap.o
|
2011-08-23 15:42:10 +08: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 03:57:09 +08:00
|
|
|
obj-y += phy/
|
2020-08-27 10:00:31 +08:00
|
|
|
obj-y += mdio/
|
2020-08-27 10:00:28 +08:00
|
|
|
obj-y += pcs/
|
2011-08-23 15:42:10 +08:00
|
|
|
obj-$(CONFIG_RIONET) += rionet.o
|
2011-11-12 06:16:48 +08:00
|
|
|
obj-$(CONFIG_NET_TEAM) += team/
|
2005-04-17 06:20:36 +08:00
|
|
|
obj-$(CONFIG_TUN) += tun.o
|
2017-02-11 08:03:51 +08:00
|
|
|
obj-$(CONFIG_TAP) += tap.o
|
2007-09-26 07:14:46 +08:00
|
|
|
obj-$(CONFIG_VETH) += veth.o
|
2011-08-23 15:42:10 +08:00
|
|
|
obj-$(CONFIG_VIRTIO_NET) += virtio_net.o
|
2012-10-01 20:32:35 +08:00
|
|
|
obj-$(CONFIG_VXLAN) += vxlan.o
|
2015-05-14 00:57:30 +08:00
|
|
|
obj-$(CONFIG_GENEVE) += geneve.o
|
2020-02-24 13:27:50 +08:00
|
|
|
obj-$(CONFIG_BAREUDP) += bareudp.o
|
2016-05-09 06:55:48 +08: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 01:38:08 +08:00
|
|
|
obj-$(CONFIG_NLMON) += nlmon.o
|
2015-08-14 04:59:10 +08:00
|
|
|
obj-$(CONFIG_NET_VRF) += vrf.o
|
2017-04-21 17:10:45 +08:00
|
|
|
obj-$(CONFIG_VSOCKMON) += vsockmon.o
|
2021-02-09 17:05:55 +08:00
|
|
|
obj-$(CONFIG_MHI_NET) += mhi/
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2011-08-23 15:42:10 +08:00
|
|
|
#
|
|
|
|
# Networking Drivers
|
|
|
|
#
|
|
|
|
obj-$(CONFIG_ARCNET) += arcnet/
|
2005-04-17 06:20:36 +08:00
|
|
|
obj-$(CONFIG_DEV_APPLETALK) += appletalk/
|
2011-08-23 15:42:10 +08:00
|
|
|
obj-$(CONFIG_CAIF) += caif/
|
|
|
|
obj-$(CONFIG_CAN) += can/
|
2021-03-19 23:46:30 +08:00
|
|
|
obj-$(CONFIG_NET_DSA) += dsa/
|
2011-03-30 18:47:06 +08:00
|
|
|
obj-$(CONFIG_ETHERNET) += ethernet/
|
2011-07-31 15:06:29 +08:00
|
|
|
obj-$(CONFIG_FDDI) += fddi/
|
2011-08-02 13:48:13 +08:00
|
|
|
obj-$(CONFIG_HIPPI) += hippi/
|
2011-08-23 15:42:10 +08:00
|
|
|
obj-$(CONFIG_HAMRADIO) += hamradio/
|
2020-03-06 12:28:29 +08:00
|
|
|
obj-$(CONFIG_QCOM_IPA) += ipa/
|
2011-08-03 18:01:58 +08:00
|
|
|
obj-$(CONFIG_PLIP) += plip/
|
2011-08-30 02:49:40 +08:00
|
|
|
obj-$(CONFIG_PPP) += ppp/
|
2011-07-31 17:38:19 +08: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 02:49:40 +08:00
|
|
|
obj-$(CONFIG_SLIP) += slip/
|
2011-08-03 18:17:13 +08:00
|
|
|
obj-$(CONFIG_SLHC) += slip/
|
2011-08-23 15:42:10 +08:00
|
|
|
obj-$(CONFIG_NET_SB1000) += sb1000.o
|
|
|
|
obj-$(CONFIG_SUNGEM_PHY) += sungem_phy.o
|
2005-04-17 06:20:36 +08:00
|
|
|
obj-$(CONFIG_WAN) += wan/
|
2011-08-23 15:42:10 +08:00
|
|
|
obj-$(CONFIG_WLAN) += wireless/
|
2012-08-26 13:10:11 +08:00
|
|
|
obj-$(CONFIG_IEEE802154) += ieee802154/
|
net: Add a WWAN subsystem
This change introduces initial support for a WWAN framework. Given the
complexity and heterogeneity of existing WWAN hardwares and interfaces,
there is no strict definition of what a WWAN device is and how it should
be represented. It's often a collection of multiple devices that perform
the global WWAN feature (netdev, tty, chardev, etc).
One usual way to expose modem controls and configuration is via high
level protocols such as the well known AT command protocol, MBIM or
QMI. The USB modems started to expose them as character devices, and
user daemons such as ModemManager learnt to use them.
This initial version adds the concept of WWAN port, which is a logical
pipe to a modem control protocol. The protocols are rawly exposed to
user via character device, allowing straigthforward support in existing
tools (ModemManager, ofono...). The WWAN core takes care of the generic
part, including character device management, and relies on port driver
operations to receive/submit protocol data.
Since the different devices exposing protocols for a same WWAN hardware
do not necessarily know about each others (e.g. two different USB
interfaces, PCI/MHI channel devices...) and can be created/removed in
different orders, the WWAN core ensures that all WAN ports contributing
to the 'whole' WWAN feature are grouped under the same virtual WWAN
device, relying on the provided parent device (e.g. mhi controller,
USB device). It's a 'trick' I copied from Johannes's earlier WWAN
subsystem proposal.
This initial version is purposely minimalist, it's essentially moving
the generic part of the previously proposed mhi_wwan_ctrl driver inside
a common WWAN framework, but the implementation is open and flexible
enough to allow extension for further drivers.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-04-16 16:36:33 +08:00
|
|
|
obj-$(CONFIG_WWAN) += wwan/
|
2011-08-23 15:42:10 +08:00
|
|
|
|
|
|
|
obj-$(CONFIG_VMXNET3) += vmxnet3/
|
|
|
|
obj-$(CONFIG_XEN_NETDEV_FRONTEND) += xen-netfront.o
|
|
|
|
obj-$(CONFIG_XEN_NETDEV_BACKEND) += xen-netback/
|
2007-05-10 09:31:55 +08:00
|
|
|
|
2014-08-06 05:10:52 +08:00
|
|
|
obj-$(CONFIG_USB_NET_DRIVERS) += usb/
|
2011-11-29 05:35:35 +08:00
|
|
|
|
|
|
|
obj-$(CONFIG_HYPERV_NET) += hyperv/
|
2012-11-17 10:27:13 +08:00
|
|
|
obj-$(CONFIG_NTB_NETDEV) += ntb_netdev.o
|
2015-08-21 16:29:17 +08:00
|
|
|
|
|
|
|
obj-$(CONFIG_FUJITSU_ES) += fjes/
|
2017-10-02 18:38:45 +08:00
|
|
|
|
|
|
|
thunderbolt-net-y += thunderbolt.o
|
2019-12-17 20:33:41 +08:00
|
|
|
obj-$(CONFIG_USB4_NET) += thunderbolt-net.o
|
2017-12-02 07:08:58 +08:00
|
|
|
obj-$(CONFIG_NETDEVSIM) += netdevsim/
|
2018-05-25 00:55:15 +08:00
|
|
|
obj-$(CONFIG_NET_FAILOVER) += net_failover.o
|