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 14:07:57 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2005-04-16 22:20:36 +00:00
|
|
|
#
|
|
|
|
# Makefile for the kernel software RAID and LVM drivers.
|
|
|
|
#
|
|
|
|
|
2009-03-31 03:27:02 +00:00
|
|
|
dm-mod-y += dm.o dm-table.o dm-target.o dm-linear.o dm-stripe.o \
|
2016-05-12 20:28:10 +00:00
|
|
|
dm-ioctl.o dm-io.o dm-kcopyd.o dm-sysfs.o dm-stats.o \
|
|
|
|
dm-rq.o
|
2009-03-31 03:27:02 +00:00
|
|
|
dm-multipath-y += dm-path-selector.o dm-mpath.o
|
2020-11-10 18:41:53 +00:00
|
|
|
dm-historical-service-time-y += dm-ps-historical-service-time.o
|
|
|
|
dm-io-affinity-y += dm-ps-io-affinity.o
|
|
|
|
dm-queue-length-y += dm-ps-queue-length.o
|
|
|
|
dm-round-robin-y += dm-ps-round-robin.o
|
|
|
|
dm-service-time-y += dm-ps-service-time.o
|
2009-03-31 03:27:02 +00:00
|
|
|
dm-snapshot-y += dm-snap.o dm-exception-store.o dm-snap-transient.o \
|
2009-01-06 03:05:17 +00:00
|
|
|
dm-snap-persistent.o
|
2009-03-31 03:27:02 +00:00
|
|
|
dm-mirror-y += dm-raid1.o
|
2020-11-10 18:41:53 +00:00
|
|
|
dm-log-userspace-y += dm-log-userspace-base.o dm-log-userspace-transfer.o
|
2016-10-21 14:06:40 +00:00
|
|
|
dm-bio-prison-y += dm-bio-prison-v1.o dm-bio-prison-v2.o
|
2011-10-31 20:21:18 +00:00
|
|
|
dm-thin-pool-y += dm-thin.o dm-thin-metadata.o
|
2016-12-15 09:57:31 +00:00
|
|
|
dm-cache-y += dm-cache-target.o dm-cache-metadata.o dm-cache-policy.o \
|
|
|
|
dm-cache-background-tracker.o
|
2020-11-10 18:41:53 +00:00
|
|
|
dm-cache-smq-y += dm-cache-policy-smq.o
|
2020-03-09 22:26:38 +00:00
|
|
|
dm-ebs-y += dm-ebs-target.o
|
2014-03-03 15:23:15 +00:00
|
|
|
dm-era-y += dm-era-target.o
|
dm: add clone target
Add the dm-clone target, which allows cloning of arbitrary block
devices.
dm-clone produces a one-to-one copy of an existing, read-only source
device into a writable destination device: It presents a virtual block
device which makes all data appear immediately, and redirects reads and
writes accordingly.
The main use case of dm-clone is to clone a potentially remote,
high-latency, read-only, archival-type block device into a writable,
fast, primary-type device for fast, low-latency I/O. The cloned device
is visible/mountable immediately and the copy of the source device to
the destination device happens in the background, in parallel with user
I/O.
When the cloning completes, the dm-clone table can be removed altogether
and be replaced, e.g., by a linear table, mapping directly to the
destination device.
For further information and examples of how to use dm-clone, please read
Documentation/admin-guide/device-mapper/dm-clone.rst
Suggested-by: Vangelis Koukis <vkoukis@arrikto.com>
Co-developed-by: Ilias Tsitsimpis <iliastsi@arrikto.com>
Signed-off-by: Ilias Tsitsimpis <iliastsi@arrikto.com>
Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2019-09-11 14:36:40 +00:00
|
|
|
dm-clone-y += dm-clone-target.o dm-clone-metadata.o
|
2015-12-03 20:36:00 +00:00
|
|
|
dm-verity-y += dm-verity-target.o
|
2020-11-10 18:41:53 +00:00
|
|
|
dm-zoned-y += dm-zoned-target.o dm-zoned-metadata.o dm-zoned-reclaim.o
|
|
|
|
|
2017-10-10 21:02:41 +00:00
|
|
|
md-mod-y += md.o md-bitmap.o
|
2017-03-09 08:59:59 +00:00
|
|
|
raid456-y += raid5.o raid5-cache.o raid5-ppl.o
|
2017-10-10 21:02:41 +00:00
|
|
|
linear-y += md-linear.o
|
|
|
|
multipath-y += md-multipath.o
|
|
|
|
faulty-y += md-faulty.o
|
2005-04-16 22:20:36 +00:00
|
|
|
|
|
|
|
# Note: link order is important. All raid personalities
|
2007-07-09 18:56:42 +00:00
|
|
|
# and must come before md.o, as they each initialise
|
2005-04-16 22:20:36 +00:00
|
|
|
# themselves, and md.o may use the personalities when it
|
|
|
|
# auto-initialised.
|
|
|
|
|
|
|
|
obj-$(CONFIG_MD_LINEAR) += linear.o
|
|
|
|
obj-$(CONFIG_MD_RAID0) += raid0.o
|
|
|
|
obj-$(CONFIG_MD_RAID1) += raid1.o
|
|
|
|
obj-$(CONFIG_MD_RAID10) += raid10.o
|
2007-07-09 18:56:42 +00:00
|
|
|
obj-$(CONFIG_MD_RAID456) += raid456.o
|
2005-04-16 22:20:36 +00:00
|
|
|
obj-$(CONFIG_MD_MULTIPATH) += multipath.o
|
|
|
|
obj-$(CONFIG_MD_FAULTY) += faulty.o
|
2014-03-07 17:21:15 +00:00
|
|
|
obj-$(CONFIG_MD_CLUSTER) += md-cluster.o
|
2013-03-23 23:11:31 +00:00
|
|
|
obj-$(CONFIG_BCACHE) += bcache/
|
2005-06-22 00:17:14 +00:00
|
|
|
obj-$(CONFIG_BLK_DEV_MD) += md-mod.o
|
2020-06-07 14:18:59 +00:00
|
|
|
ifeq ($(CONFIG_BLK_DEV_MD),y)
|
|
|
|
obj-y += md-autodetect.o
|
|
|
|
endif
|
2005-04-16 22:20:36 +00:00
|
|
|
obj-$(CONFIG_BLK_DEV_DM) += dm-mod.o
|
2014-01-14 00:37:54 +00:00
|
|
|
obj-$(CONFIG_BLK_DEV_DM_BUILTIN) += dm-builtin.o
|
2017-12-18 17:28:08 +00:00
|
|
|
obj-$(CONFIG_DM_UNSTRIPED) += dm-unstripe.o
|
2011-10-31 20:19:09 +00:00
|
|
|
obj-$(CONFIG_DM_BUFIO) += dm-bufio.o
|
2012-10-12 20:02:13 +00:00
|
|
|
obj-$(CONFIG_DM_BIO_PRISON) += dm-bio-prison.o
|
2005-04-16 22:20:36 +00:00
|
|
|
obj-$(CONFIG_DM_CRYPT) += dm-crypt.o
|
2007-05-09 09:33:06 +00:00
|
|
|
obj-$(CONFIG_DM_DELAY) += dm-delay.o
|
dm: add dust target
Add the dm-dust target, which simulates the behavior of bad sectors
at arbitrary locations, and the ability to enable the emulation of
the read failures at an arbitrary time.
This target behaves similarly to a linear target. At a given time,
the user can send a message to the target to start failing read
requests on specific blocks. When the failure behavior is enabled,
reads of blocks configured "bad" will fail with EIO.
Writes of blocks configured "bad" will result in the following:
1. Remove the block from the "bad block list".
2. Successfully complete the write.
After this point, the block will successfully contain the written
data, and will service reads and writes normally. This emulates the
behavior of a "remapped sector" on a hard disk drive.
dm-dust provides logging of which blocks have been added or removed
to the "bad block list", as well as logging when a block has been
removed from the bad block list. These messages can be used
alongside the messages from the driver using a dm-dust device to
analyze the driver's behavior when a read fails at a given time.
(This logging can be reduced via a "quiet" mode, if desired.)
NOTE: If the block size is larger than 512 bytes, only the first sector
of each "dust block" is detected. Placing a limiting layer above a dust
target, to limit the minimum I/O size to the dust block size, will
ensure proper emulation of the given large block size.
Signed-off-by: Bryan Gurney <bgurney@redhat.com>
Co-developed-by: Joe Shimkus <jshimkus@redhat.com>
Co-developed-by: John Dorminy <jdorminy@redhat.com>
Co-developed-by: John Pittman <jpittman@redhat.com>
Co-developed-by: Thomas Jaskiewicz <tjaskiew@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2019-03-07 20:42:39 +00:00
|
|
|
obj-$(CONFIG_DM_DUST) += dm-dust.o
|
2011-03-24 13:54:24 +00:00
|
|
|
obj-$(CONFIG_DM_FLAKEY) += dm-flakey.o
|
2005-04-16 22:20:36 +00:00
|
|
|
obj-$(CONFIG_DM_MULTIPATH) += dm-multipath.o dm-round-robin.o
|
2009-06-22 09:12:27 +00:00
|
|
|
obj-$(CONFIG_DM_MULTIPATH_QL) += dm-queue-length.o
|
2009-06-22 09:12:28 +00:00
|
|
|
obj-$(CONFIG_DM_MULTIPATH_ST) += dm-service-time.o
|
2020-04-30 20:48:30 +00:00
|
|
|
obj-$(CONFIG_DM_MULTIPATH_HST) += dm-historical-service-time.o
|
2020-10-23 00:27:50 +00:00
|
|
|
obj-$(CONFIG_DM_MULTIPATH_IOA) += dm-io-affinity.o
|
2013-07-10 22:41:19 +00:00
|
|
|
obj-$(CONFIG_DM_SWITCH) += dm-switch.o
|
2005-04-16 22:20:36 +00:00
|
|
|
obj-$(CONFIG_DM_SNAPSHOT) += dm-snapshot.o
|
2020-11-10 18:41:53 +00:00
|
|
|
obj-$(CONFIG_DM_PERSISTENT_DATA) += persistent-data/
|
2008-10-21 16:45:06 +00:00
|
|
|
obj-$(CONFIG_DM_MIRROR) += dm-mirror.o dm-log.o dm-region-hash.o
|
2009-06-22 09:12:35 +00:00
|
|
|
obj-$(CONFIG_DM_LOG_USERSPACE) += dm-log-userspace.o
|
2005-04-16 22:20:36 +00:00
|
|
|
obj-$(CONFIG_DM_ZERO) += dm-zero.o
|
2020-11-10 18:41:53 +00:00
|
|
|
obj-$(CONFIG_DM_RAID) += dm-raid.o
|
|
|
|
obj-$(CONFIG_DM_THIN_PROVISIONING) += dm-thin-pool.o
|
2012-03-28 17:43:38 +00:00
|
|
|
obj-$(CONFIG_DM_VERITY) += dm-verity.o
|
2013-03-01 22:45:51 +00:00
|
|
|
obj-$(CONFIG_DM_CACHE) += dm-cache.o
|
2015-05-15 14:33:34 +00:00
|
|
|
obj-$(CONFIG_DM_CACHE_SMQ) += dm-cache-smq.o
|
2020-03-09 22:26:38 +00:00
|
|
|
obj-$(CONFIG_DM_EBS) += dm-ebs.o
|
2014-03-03 15:23:15 +00:00
|
|
|
obj-$(CONFIG_DM_ERA) += dm-era.o
|
dm: add clone target
Add the dm-clone target, which allows cloning of arbitrary block
devices.
dm-clone produces a one-to-one copy of an existing, read-only source
device into a writable destination device: It presents a virtual block
device which makes all data appear immediately, and redirects reads and
writes accordingly.
The main use case of dm-clone is to clone a potentially remote,
high-latency, read-only, archival-type block device into a writable,
fast, primary-type device for fast, low-latency I/O. The cloned device
is visible/mountable immediately and the copy of the source device to
the destination device happens in the background, in parallel with user
I/O.
When the cloning completes, the dm-clone table can be removed altogether
and be replaced, e.g., by a linear table, mapping directly to the
destination device.
For further information and examples of how to use dm-clone, please read
Documentation/admin-guide/device-mapper/dm-clone.rst
Suggested-by: Vangelis Koukis <vkoukis@arrikto.com>
Co-developed-by: Ilias Tsitsimpis <iliastsi@arrikto.com>
Signed-off-by: Ilias Tsitsimpis <iliastsi@arrikto.com>
Signed-off-by: Nikos Tsironis <ntsironis@arrikto.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2019-09-11 14:36:40 +00:00
|
|
|
obj-$(CONFIG_DM_CLONE) += dm-clone.o
|
2015-03-20 14:50:37 +00:00
|
|
|
obj-$(CONFIG_DM_LOG_WRITES) += dm-log-writes.o
|
2017-01-04 19:23:53 +00:00
|
|
|
obj-$(CONFIG_DM_INTEGRITY) += dm-integrity.o
|
2017-06-07 06:55:39 +00:00
|
|
|
obj-$(CONFIG_DM_ZONED) += dm-zoned.o
|
2018-03-08 13:25:24 +00:00
|
|
|
obj-$(CONFIG_DM_WRITECACHE) += dm-writecache.o
|
2005-04-16 22:20:36 +00:00
|
|
|
|
dm: add support to directly boot to a mapped device
Add a "create" module parameter, which allows device-mapper targets to
be configured at boot time. This enables early use of DM targets in the
boot process (as the root device or otherwise) without the need of an
initramfs.
The syntax used in the boot param is based on the concise format from
the dmsetup tool to follow the rule of least surprise:
dmsetup table --concise /dev/mapper/lroot
Which is:
dm-mod.create=<name>,<uuid>,<minor>,<flags>,<table>[,<table>+][;<name>,<uuid>,<minor>,<flags>,<table>[,<table>+]+]
Where,
<name> ::= The device name.
<uuid> ::= xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx | ""
<minor> ::= The device minor number | ""
<flags> ::= "ro" | "rw"
<table> ::= <start_sector> <num_sectors> <target_type> <target_args>
<target_type> ::= "verity" | "linear" | ...
For example, the following could be added in the boot parameters:
dm-mod.create="lroot,,,rw, 0 4096 linear 98:16 0, 4096 4096 linear 98:32 0" root=/dev/dm-0
Only the targets that were tested are allowed and the ones that don't
change any block device when the device is create as read-only. For
example, mirror and cache targets are not allowed. The rationale behind
this is that if the user makes a mistake, choosing the wrong device to
be the mirror or the cache can corrupt data.
The only targets initially allowed are:
* crypt
* delay
* linear
* snapshot-origin
* striped
* verity
Co-developed-by: Will Drewry <wad@chromium.org>
Co-developed-by: Kees Cook <keescook@chromium.org>
Co-developed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2019-02-21 20:33:34 +00:00
|
|
|
ifeq ($(CONFIG_DM_INIT),y)
|
|
|
|
dm-mod-objs += dm-init.o
|
|
|
|
endif
|
|
|
|
|
2007-10-19 21:48:00 +00:00
|
|
|
ifeq ($(CONFIG_DM_UEVENT),y)
|
|
|
|
dm-mod-objs += dm-uevent.o
|
|
|
|
endif
|
2015-12-03 14:26:30 +00:00
|
|
|
|
2021-05-25 21:24:56 +00:00
|
|
|
ifeq ($(CONFIG_BLK_DEV_ZONED),y)
|
|
|
|
dm-mod-objs += dm-zone.o
|
|
|
|
endif
|
|
|
|
|
dm ima: measure data on table load
DM configures a block device with various target specific attributes
passed to it as a table. DM loads the table, and calls each target’s
respective constructors with the attributes as input parameters.
Some of these attributes are critical to ensure the device meets
certain security bar. Thus, IMA should measure these attributes, to
ensure they are not tampered with, during the lifetime of the device.
So that the external services can have high confidence in the
configuration of the block-devices on a given system.
Some devices may have large tables. And a given device may change its
state (table-load, suspend, resume, rename, remove, table-clear etc.)
many times. Measuring these attributes each time when the device
changes its state will significantly increase the size of the IMA logs.
Further, once configured, these attributes are not expected to change
unless a new table is loaded, or a device is removed and recreated.
Therefore the clear-text of the attributes should only be measured
during table load, and the hash of the active/inactive table should be
measured for the remaining device state changes.
Export IMA function ima_measure_critical_data() to allow measurement
of DM device parameters, as well as target specific attributes, during
table load. Compute the hash of the inactive table and store it for
measurements during future state change. If a load is called multiple
times, update the inactive table hash with the hash of the latest
populated table. So that the correct inactive table hash is measured
when the device transitions to different states like resume, remove,
rename, etc.
Signed-off-by: Tushar Sugandhi <tusharsu@linux.microsoft.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com> # leak fix
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2021-07-13 00:48:58 +00:00
|
|
|
ifeq ($(CONFIG_IMA),y)
|
|
|
|
dm-mod-objs += dm-ima.o
|
|
|
|
endif
|
|
|
|
|
2015-12-03 14:26:30 +00:00
|
|
|
ifeq ($(CONFIG_DM_VERITY_FEC),y)
|
|
|
|
dm-verity-objs += dm-verity-fec.o
|
|
|
|
endif
|
2019-07-18 00:46:15 +00:00
|
|
|
|
|
|
|
ifeq ($(CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG),y)
|
|
|
|
dm-verity-objs += dm-verity-verify-sig.o
|
|
|
|
endif
|
2021-09-04 09:59:28 +00:00
|
|
|
|
2022-06-27 15:35:24 +00:00
|
|
|
ifeq ($(CONFIG_DM_VERITY),y)
|
|
|
|
ifeq ($(CONFIG_SECURITY_LOADPIN),y)
|
|
|
|
dm-verity-objs += dm-verity-loadpin.o
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2021-09-04 09:59:28 +00:00
|
|
|
ifeq ($(CONFIG_DM_AUDIT),y)
|
|
|
|
dm-mod-objs += dm-audit.o
|
|
|
|
endif
|