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
|
|
|
|
2017-03-21 08:01:30 +00:00
|
|
|
config EARLY_PRINTK_USB
|
|
|
|
bool
|
|
|
|
|
2008-06-18 18:04:35 +00:00
|
|
|
config X86_VERBOSE_BOOTUP
|
|
|
|
bool "Enable verbose x86 bootup info messages"
|
|
|
|
default y
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2008-06-18 18:04:35 +00:00
|
|
|
Enables the informational output from the decompression stage
|
|
|
|
(e.g. bzImage) of the boot. If you disable this you will still
|
|
|
|
see errors. Disable this if you want silent bootup.
|
|
|
|
|
2005-04-16 22:20:36 +00:00
|
|
|
config EARLY_PRINTK
|
2011-01-20 22:44:16 +00:00
|
|
|
bool "Early printk" if EXPERT
|
2005-04-16 22:20:36 +00:00
|
|
|
default y
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2005-04-16 22:20:36 +00:00
|
|
|
Write kernel log output directly into the VGA buffer or to a serial
|
|
|
|
port.
|
|
|
|
|
|
|
|
This is useful for kernel debugging when your machine crashes very
|
|
|
|
early before the console code is initialized. For normal operation
|
|
|
|
it is not recommended because it looks ugly and doesn't cooperate
|
2017-03-21 08:01:30 +00:00
|
|
|
with klogd/syslogd or the X server. You should normally say N here,
|
2005-04-16 22:20:36 +00:00
|
|
|
unless you want to debug such a crash.
|
|
|
|
|
2008-07-25 00:29:40 +00:00
|
|
|
config EARLY_PRINTK_DBGP
|
|
|
|
bool "Early printk via EHCI debug port"
|
2008-07-26 15:28:11 +00:00
|
|
|
depends on EARLY_PRINTK && PCI
|
2017-03-21 08:01:30 +00:00
|
|
|
select EARLY_PRINTK_USB
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2008-07-25 00:29:40 +00:00
|
|
|
Write kernel log output directly into the EHCI debug port.
|
|
|
|
|
|
|
|
This is useful for kernel debugging when your machine crashes very
|
|
|
|
early before the console code is initialized. For normal operation
|
|
|
|
it is not recommended because it looks ugly and doesn't cooperate
|
2017-03-21 08:01:30 +00:00
|
|
|
with klogd/syslogd or the X server. You should normally say N here,
|
2008-07-25 00:29:40 +00:00
|
|
|
unless you want to debug such a crash. You need usb debug device.
|
|
|
|
|
2017-03-21 08:01:30 +00:00
|
|
|
config EARLY_PRINTK_USB_XDBC
|
|
|
|
bool "Early printk via the xHCI debug port"
|
|
|
|
depends on EARLY_PRINTK && PCI
|
|
|
|
select EARLY_PRINTK_USB
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2017-03-21 08:01:30 +00:00
|
|
|
Write kernel log output directly into the xHCI debug port.
|
|
|
|
|
|
|
|
One use for this feature is kernel debugging, for example when your
|
|
|
|
machine crashes very early before the regular console code is
|
|
|
|
initialized. Other uses include simpler, lockless logging instead of
|
|
|
|
a full-blown printk console driver + klogd.
|
|
|
|
|
|
|
|
For normal production environments this is normally not recommended,
|
|
|
|
because it doesn't feed events into klogd/syslogd and doesn't try to
|
|
|
|
print anything on the screen.
|
|
|
|
|
|
|
|
You should normally say N here, unless you want to debug early
|
|
|
|
crashes or need a very simple printk logging facility.
|
|
|
|
|
2014-01-18 11:48:15 +00:00
|
|
|
config EFI_PGT_DUMP
|
|
|
|
bool "Dump the EFI pagetable"
|
2015-10-05 16:55:20 +00:00
|
|
|
depends on EFI
|
2020-02-04 01:36:24 +00:00
|
|
|
select PTDUMP_CORE
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2014-01-18 11:48:15 +00:00
|
|
|
Enable this if you want to dump the EFI page table before
|
|
|
|
enabling virtual mode. This can be used to debug miscellaneous
|
|
|
|
issues with the mapping of the EFI runtime regions into that
|
|
|
|
table.
|
|
|
|
|
2012-06-28 01:02:20 +00:00
|
|
|
config DEBUG_TLBFLUSH
|
|
|
|
bool "Set upper limit of TLB entries to flush one-by-one"
|
2013-03-14 11:54:37 +00:00
|
|
|
depends on DEBUG_KERNEL
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2022-05-25 13:32:03 +00:00
|
|
|
X86-only for now.
|
2012-06-28 01:02:20 +00:00
|
|
|
|
2022-05-25 13:32:03 +00:00
|
|
|
This option allows the user to tune the amount of TLB entries the
|
|
|
|
kernel flushes one-by-one instead of doing a full TLB flush. In
|
|
|
|
certain situations, the former is cheaper. This is controlled by the
|
|
|
|
tlb_flushall_shift knob under /sys/kernel/debug/x86. If you set it
|
|
|
|
to -1, the code flushes the whole TLB unconditionally. Otherwise,
|
|
|
|
for positive values of it, the kernel will use single TLB entry
|
|
|
|
invalidating instructions according to the following formula:
|
2012-06-28 01:02:20 +00:00
|
|
|
|
2022-05-25 13:32:03 +00:00
|
|
|
flush_entries <= active_tlb_entries / 2^tlb_flushall_shift
|
2012-06-28 01:02:20 +00:00
|
|
|
|
2022-05-25 13:32:03 +00:00
|
|
|
If in doubt, say "N".
|
2012-06-28 01:02:20 +00:00
|
|
|
|
2007-10-24 22:50:43 +00:00
|
|
|
config IOMMU_DEBUG
|
|
|
|
bool "Enable IOMMU debugging"
|
2007-10-24 10:49:48 +00:00
|
|
|
depends on GART_IOMMU && DEBUG_KERNEL
|
2007-10-24 22:50:43 +00:00
|
|
|
depends on X86_64
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2007-10-24 22:50:43 +00:00
|
|
|
Force the IOMMU to on even when you have less than 4GB of
|
|
|
|
memory and add debugging code. On overflow always panic. And
|
|
|
|
allow to enable IOMMU leak tracing. Can be disabled at boot
|
|
|
|
time with iommu=noforce. This will also enable scatter gather
|
|
|
|
list merging. Currently not recommended for production
|
|
|
|
code. When you use it make sure you have a big enough
|
|
|
|
IOMMU/AGP aperture. Most of the options enabled by this can
|
|
|
|
be set more finegrained using the iommu= command line
|
2023-03-14 23:06:44 +00:00
|
|
|
options. See Documentation/arch/x86/x86_64/boot-options.rst for more
|
2007-10-24 22:50:43 +00:00
|
|
|
details.
|
|
|
|
|
|
|
|
config IOMMU_LEAK
|
|
|
|
bool "IOMMU leak tracing"
|
2009-04-14 00:43:19 +00:00
|
|
|
depends on IOMMU_DEBUG && DMA_API_DEBUG
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2007-10-24 22:50:43 +00:00
|
|
|
Add a simple leak tracer to the IOMMU code. This is useful when you
|
|
|
|
are debugging a buggy device driver that leaks IOMMU mappings.
|
|
|
|
|
2009-01-03 19:23:51 +00:00
|
|
|
config HAVE_MMIOTRACE_SUPPORT
|
|
|
|
def_bool y
|
2008-05-12 19:20:56 +00:00
|
|
|
|
2009-08-13 20:34:21 +00:00
|
|
|
config X86_DECODER_SELFTEST
|
2009-12-06 11:14:29 +00:00
|
|
|
bool "x86 instruction decoder selftest"
|
2019-09-01 03:03:08 +00:00
|
|
|
depends on DEBUG_KERNEL && INSTRUCTION_DECODER
|
2014-02-05 05:51:37 +00:00
|
|
|
depends on !COMPILE_TEST
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2022-05-25 13:32:03 +00:00
|
|
|
Perform x86 instruction decoder selftests at build time.
|
|
|
|
This option is useful for checking the sanity of x86 instruction
|
|
|
|
decoder code.
|
|
|
|
If unsure, say "N".
|
2009-08-13 20:34:21 +00:00
|
|
|
|
2008-01-30 12:30:05 +00:00
|
|
|
choice
|
|
|
|
prompt "IO delay type"
|
2008-02-17 19:20:24 +00:00
|
|
|
default IO_DELAY_0X80
|
2008-01-30 12:30:05 +00:00
|
|
|
|
|
|
|
config IO_DELAY_0X80
|
|
|
|
bool "port 0x80 based port-IO delay [recommended]"
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2008-01-30 12:30:05 +00:00
|
|
|
This is the traditional Linux IO delay used for in/out_p.
|
|
|
|
It is the most tested hence safest selection here.
|
|
|
|
|
|
|
|
config IO_DELAY_0XED
|
|
|
|
bool "port 0xed based port-IO delay"
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2008-01-30 12:30:05 +00:00
|
|
|
Use port 0xed as the IO delay. This frees up port 0x80 which is
|
|
|
|
often used as a hardware-debug port.
|
|
|
|
|
|
|
|
config IO_DELAY_UDELAY
|
|
|
|
bool "udelay based port-IO delay"
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2008-01-30 12:30:05 +00:00
|
|
|
Use udelay(2) as the IO delay method. This provides the delay
|
|
|
|
while not having any side-effect on the IO port space.
|
|
|
|
|
|
|
|
config IO_DELAY_NONE
|
|
|
|
bool "no port-IO delay"
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2008-01-30 12:30:05 +00:00
|
|
|
No port-IO delay. Will break on old boxes that require port-IO
|
|
|
|
delay for certain operations. Should work on most new machines.
|
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2008-01-30 12:32:51 +00:00
|
|
|
config DEBUG_BOOT_PARAMS
|
|
|
|
bool "Debug boot parameters"
|
|
|
|
depends on DEBUG_KERNEL
|
|
|
|
depends on DEBUG_FS
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2008-01-30 12:32:51 +00:00
|
|
|
This option will cause struct boot_params to be exported via debugfs.
|
|
|
|
|
2008-01-30 12:33:42 +00:00
|
|
|
config CPA_DEBUG
|
2008-02-06 21:39:45 +00:00
|
|
|
bool "CPA self-test code"
|
2008-01-30 12:34:04 +00:00
|
|
|
depends on DEBUG_KERNEL
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2008-02-06 21:39:45 +00:00
|
|
|
Do change_page_attr() self-tests every 30 seconds.
|
2008-01-30 12:33:42 +00:00
|
|
|
|
2015-07-15 17:29:41 +00:00
|
|
|
config DEBUG_ENTRY
|
|
|
|
bool "Debug low-level entry code"
|
|
|
|
depends on DEBUG_KERNEL
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2015-07-15 17:29:41 +00:00
|
|
|
This option enables sanity checks in x86's low-level entry code.
|
|
|
|
Some of these sanity checks may slow down kernel entries and
|
|
|
|
exits or otherwise impact performance.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
2011-10-13 19:14:26 +00:00
|
|
|
config DEBUG_NMI_SELFTEST
|
|
|
|
bool "NMI Selftest"
|
2011-12-07 21:06:30 +00:00
|
|
|
depends on DEBUG_KERNEL && X86_LOCAL_APIC
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2011-10-13 19:14:26 +00:00
|
|
|
Enabling this option turns on a quick NMI selftest to verify
|
|
|
|
that the NMI behaves correctly.
|
|
|
|
|
|
|
|
This might help diagnose strange hangs that rely on NMI to
|
|
|
|
function properly.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
2015-01-30 16:29:38 +00:00
|
|
|
config DEBUG_IMR_SELFTEST
|
|
|
|
bool "Isolated Memory Region self test"
|
|
|
|
depends on INTEL_IMR
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2015-01-30 16:29:38 +00:00
|
|
|
This option enables automated sanity testing of the IMR code.
|
|
|
|
Some simple tests are run to verify IMR bounds checking, alignment
|
|
|
|
and overlapping. This option is really only useful if you are
|
|
|
|
debugging an IMR memory map or are modifying the IMR code and want to
|
|
|
|
test your changes.
|
|
|
|
|
|
|
|
If unsure say N here.
|
|
|
|
|
2015-05-05 09:34:49 +00:00
|
|
|
config X86_DEBUG_FPU
|
|
|
|
bool "Debug the x86 FPU code"
|
|
|
|
depends on DEBUG_KERNEL
|
|
|
|
default y
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2015-05-05 09:34:49 +00:00
|
|
|
If this option is enabled then there will be extra sanity
|
|
|
|
checks and (boot time) debug printouts added to the kernel.
|
|
|
|
This debugging adds some small amount of runtime overhead
|
|
|
|
to the kernel.
|
|
|
|
|
|
|
|
If unsure, say N.
|
|
|
|
|
2015-05-06 19:15:54 +00:00
|
|
|
config PUNIT_ATOM_DEBUG
|
|
|
|
tristate "ATOM Punit debug driver"
|
2017-07-19 12:53:05 +00:00
|
|
|
depends on PCI
|
2015-05-06 19:15:54 +00:00
|
|
|
select DEBUG_FS
|
|
|
|
select IOSF_MBI
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2015-05-06 19:15:54 +00:00
|
|
|
This is a debug driver, which gets the power states
|
|
|
|
of all Punit North Complex devices. The power states of
|
|
|
|
each device is exposed as part of the debugfs interface.
|
|
|
|
The current power state can be read from
|
|
|
|
/sys/kernel/debug/punit_atom/dev_power_state
|
|
|
|
|
2017-07-25 13:54:24 +00:00
|
|
|
choice
|
|
|
|
prompt "Choose kernel unwinder"
|
2017-10-13 20:02:01 +00:00
|
|
|
default UNWINDER_ORC if X86_64
|
|
|
|
default UNWINDER_FRAME_POINTER if X86_32
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2017-07-25 13:54:24 +00:00
|
|
|
This determines which method will be used for unwinding kernel stack
|
|
|
|
traces for panics, oopses, bugs, warnings, perf, /proc/<pid>/stack,
|
|
|
|
livepatch, lockdep, and more.
|
|
|
|
|
2017-10-13 20:02:00 +00:00
|
|
|
config UNWINDER_ORC
|
2017-07-24 23:36:57 +00:00
|
|
|
bool "ORC unwinder"
|
2017-07-25 13:54:24 +00:00
|
|
|
depends on X86_64
|
2022-04-18 16:50:36 +00:00
|
|
|
select OBJTOOL
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2017-07-24 23:36:57 +00:00
|
|
|
This option enables the ORC (Oops Rewind Capability) unwinder for
|
|
|
|
unwinding kernel stack traces. It uses a custom data format which is
|
|
|
|
a simplified version of the DWARF Call Frame Information standard.
|
|
|
|
|
|
|
|
This unwinder is more accurate across interrupt entry frames than the
|
2017-07-24 23:36:58 +00:00
|
|
|
frame pointer unwinder. It also enables a 5-10% performance
|
|
|
|
improvement across the entire kernel compared to frame pointers.
|
2017-07-24 23:36:57 +00:00
|
|
|
|
|
|
|
Enabling this option will increase the kernel's runtime memory usage
|
|
|
|
by roughly 2-4MB, depending on your kernel config.
|
|
|
|
|
2017-10-13 20:02:01 +00:00
|
|
|
config UNWINDER_FRAME_POINTER
|
|
|
|
bool "Frame pointer unwinder"
|
2024-02-04 12:20:03 +00:00
|
|
|
select ARCH_WANT_FRAME_POINTERS
|
2017-10-13 20:02:01 +00:00
|
|
|
select FRAME_POINTER
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2017-10-13 20:02:01 +00:00
|
|
|
This option enables the frame pointer unwinder for unwinding kernel
|
|
|
|
stack traces.
|
|
|
|
|
|
|
|
The unwinder itself is fast and it uses less RAM than the ORC
|
|
|
|
unwinder, but the kernel text size will grow by ~3% and the kernel's
|
|
|
|
overall performance will degrade by roughly 5-10%.
|
|
|
|
|
2017-10-13 20:02:00 +00:00
|
|
|
config UNWINDER_GUESS
|
2017-07-25 13:54:24 +00:00
|
|
|
bool "Guess unwinder"
|
|
|
|
depends on EXPERT
|
2017-11-30 12:35:54 +00:00
|
|
|
depends on !STACKDEPOT
|
2020-06-13 16:50:22 +00:00
|
|
|
help
|
2017-07-25 13:54:24 +00:00
|
|
|
This option enables the "guess" unwinder for unwinding kernel stack
|
|
|
|
traces. It scans the stack and reports every kernel text address it
|
|
|
|
finds. Some of the addresses it reports may be incorrect.
|
|
|
|
|
|
|
|
While this option often produces false positives, it can still be
|
|
|
|
useful in many cases. Unlike the other unwinders, it has no runtime
|
|
|
|
overhead.
|
|
|
|
|
|
|
|
endchoice
|