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
|
|
|
|
2017-03-21 16:01:30 +08:00
|
|
|
config EARLY_PRINTK_USB
|
|
|
|
bool
|
|
|
|
|
2008-06-19 02:04:35 +08:00
|
|
|
config X86_VERBOSE_BOOTUP
|
|
|
|
bool "Enable verbose x86 bootup info messages"
|
|
|
|
default y
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2008-06-19 02:04:35 +08: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-17 06:20:36 +08:00
|
|
|
config EARLY_PRINTK
|
2011-01-21 06:44:16 +08:00
|
|
|
bool "Early printk" if EXPERT
|
2005-04-17 06:20:36 +08:00
|
|
|
default y
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2005-04-17 06:20:36 +08: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 16:01:30 +08:00
|
|
|
with klogd/syslogd or the X server. You should normally say N here,
|
2005-04-17 06:20:36 +08:00
|
|
|
unless you want to debug such a crash.
|
|
|
|
|
2008-07-25 08:29:40 +08:00
|
|
|
config EARLY_PRINTK_DBGP
|
|
|
|
bool "Early printk via EHCI debug port"
|
2008-07-26 23:28:11 +08:00
|
|
|
depends on EARLY_PRINTK && PCI
|
2017-03-21 16:01:30 +08:00
|
|
|
select EARLY_PRINTK_USB
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2008-07-25 08:29:40 +08: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 16:01:30 +08:00
|
|
|
with klogd/syslogd or the X server. You should normally say N here,
|
2008-07-25 08:29:40 +08:00
|
|
|
unless you want to debug such a crash. You need usb debug device.
|
|
|
|
|
2017-03-21 16:01:30 +08: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-14 00:50:22 +08:00
|
|
|
help
|
2017-03-21 16:01:30 +08: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 19:48:15 +08:00
|
|
|
config EFI_PGT_DUMP
|
|
|
|
bool "Dump the EFI pagetable"
|
2015-10-06 00:55:20 +08:00
|
|
|
depends on EFI
|
2020-02-04 09:36:24 +08:00
|
|
|
select PTDUMP_CORE
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2014-01-18 19:48:15 +08: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 09:02:20 +08:00
|
|
|
config DEBUG_TLBFLUSH
|
|
|
|
bool "Set upper limit of TLB entries to flush one-by-one"
|
2013-03-14 19:54:37 +08:00
|
|
|
depends on DEBUG_KERNEL
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2022-05-25 21:32:03 +08:00
|
|
|
X86-only for now.
|
2012-06-28 09:02:20 +08:00
|
|
|
|
2022-05-25 21:32:03 +08: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 09:02:20 +08:00
|
|
|
|
2022-05-25 21:32:03 +08:00
|
|
|
flush_entries <= active_tlb_entries / 2^tlb_flushall_shift
|
2012-06-28 09:02:20 +08:00
|
|
|
|
2022-05-25 21:32:03 +08:00
|
|
|
If in doubt, say "N".
|
2012-06-28 09:02:20 +08:00
|
|
|
|
2007-10-25 06:50:43 +08:00
|
|
|
config IOMMU_DEBUG
|
|
|
|
bool "Enable IOMMU debugging"
|
2007-10-24 18:49:48 +08:00
|
|
|
depends on GART_IOMMU && DEBUG_KERNEL
|
2007-10-25 06:50:43 +08:00
|
|
|
depends on X86_64
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2007-10-25 06:50:43 +08: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-15 07:06:44 +08:00
|
|
|
options. See Documentation/arch/x86/x86_64/boot-options.rst for more
|
2007-10-25 06:50:43 +08:00
|
|
|
details.
|
|
|
|
|
|
|
|
config IOMMU_LEAK
|
|
|
|
bool "IOMMU leak tracing"
|
2009-04-14 08:43:19 +08:00
|
|
|
depends on IOMMU_DEBUG && DMA_API_DEBUG
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2007-10-25 06:50:43 +08: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-04 03:23:51 +08:00
|
|
|
config HAVE_MMIOTRACE_SUPPORT
|
|
|
|
def_bool y
|
2008-05-13 03:20:56 +08:00
|
|
|
|
2009-08-14 04:34:21 +08:00
|
|
|
config X86_DECODER_SELFTEST
|
2009-12-06 19:14:29 +08:00
|
|
|
bool "x86 instruction decoder selftest"
|
2019-09-01 11:03:08 +08:00
|
|
|
depends on DEBUG_KERNEL && INSTRUCTION_DECODER
|
2014-02-05 13:51:37 +08:00
|
|
|
depends on !COMPILE_TEST
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2022-05-25 21:32:03 +08: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-14 04:34:21 +08:00
|
|
|
|
2008-01-30 20:30:05 +08:00
|
|
|
choice
|
|
|
|
prompt "IO delay type"
|
2008-02-18 03:20:24 +08:00
|
|
|
default IO_DELAY_0X80
|
2008-01-30 20:30:05 +08:00
|
|
|
|
|
|
|
config IO_DELAY_0X80
|
|
|
|
bool "port 0x80 based port-IO delay [recommended]"
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2008-01-30 20:30:05 +08: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-14 00:50:22 +08:00
|
|
|
help
|
2008-01-30 20:30:05 +08: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-14 00:50:22 +08:00
|
|
|
help
|
2008-01-30 20:30:05 +08: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-14 00:50:22 +08:00
|
|
|
help
|
2008-01-30 20:30:05 +08: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 20:32:51 +08:00
|
|
|
config DEBUG_BOOT_PARAMS
|
|
|
|
bool "Debug boot parameters"
|
|
|
|
depends on DEBUG_KERNEL
|
|
|
|
depends on DEBUG_FS
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2008-01-30 20:32:51 +08:00
|
|
|
This option will cause struct boot_params to be exported via debugfs.
|
|
|
|
|
2008-01-30 20:33:42 +08:00
|
|
|
config CPA_DEBUG
|
2008-02-07 05:39:45 +08:00
|
|
|
bool "CPA self-test code"
|
2008-01-30 20:34:04 +08:00
|
|
|
depends on DEBUG_KERNEL
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2008-02-07 05:39:45 +08:00
|
|
|
Do change_page_attr() self-tests every 30 seconds.
|
2008-01-30 20:33:42 +08:00
|
|
|
|
2015-07-16 01:29:41 +08:00
|
|
|
config DEBUG_ENTRY
|
|
|
|
bool "Debug low-level entry code"
|
|
|
|
depends on DEBUG_KERNEL
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2015-07-16 01:29:41 +08: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-14 03:14:26 +08:00
|
|
|
config DEBUG_NMI_SELFTEST
|
|
|
|
bool "NMI Selftest"
|
2011-12-08 05:06:30 +08:00
|
|
|
depends on DEBUG_KERNEL && X86_LOCAL_APIC
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2011-10-14 03:14:26 +08: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-31 00:29:38 +08:00
|
|
|
config DEBUG_IMR_SELFTEST
|
|
|
|
bool "Isolated Memory Region self test"
|
|
|
|
depends on INTEL_IMR
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2015-01-31 00:29:38 +08: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 17:34:49 +08:00
|
|
|
config X86_DEBUG_FPU
|
|
|
|
bool "Debug the x86 FPU code"
|
|
|
|
depends on DEBUG_KERNEL
|
|
|
|
default y
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2015-05-05 17:34:49 +08: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-07 03:15:54 +08:00
|
|
|
config PUNIT_ATOM_DEBUG
|
|
|
|
tristate "ATOM Punit debug driver"
|
2017-07-19 20:53:05 +08:00
|
|
|
depends on PCI
|
2015-05-07 03:15:54 +08:00
|
|
|
select DEBUG_FS
|
|
|
|
select IOSF_MBI
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2015-05-07 03:15:54 +08: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 21:54:24 +08:00
|
|
|
choice
|
|
|
|
prompt "Choose kernel unwinder"
|
2017-10-14 04:02:01 +08:00
|
|
|
default UNWINDER_ORC if X86_64
|
|
|
|
default UNWINDER_FRAME_POINTER if X86_32
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2017-07-25 21:54:24 +08: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-14 04:02:00 +08:00
|
|
|
config UNWINDER_ORC
|
2017-07-25 07:36:57 +08:00
|
|
|
bool "ORC unwinder"
|
2017-07-25 21:54:24 +08:00
|
|
|
depends on X86_64
|
2022-04-19 00:50:36 +08:00
|
|
|
select OBJTOOL
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2017-07-25 07:36:57 +08: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-25 07:36:58 +08:00
|
|
|
frame pointer unwinder. It also enables a 5-10% performance
|
|
|
|
improvement across the entire kernel compared to frame pointers.
|
2017-07-25 07:36:57 +08:00
|
|
|
|
|
|
|
Enabling this option will increase the kernel's runtime memory usage
|
|
|
|
by roughly 2-4MB, depending on your kernel config.
|
|
|
|
|
2017-10-14 04:02:01 +08:00
|
|
|
config UNWINDER_FRAME_POINTER
|
|
|
|
bool "Frame pointer unwinder"
|
2024-02-04 20:20:03 +08:00
|
|
|
select ARCH_WANT_FRAME_POINTERS
|
2017-10-14 04:02:01 +08:00
|
|
|
select FRAME_POINTER
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2017-10-14 04:02:01 +08: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-14 04:02:00 +08:00
|
|
|
config UNWINDER_GUESS
|
2017-07-25 21:54:24 +08:00
|
|
|
bool "Guess unwinder"
|
|
|
|
depends on EXPERT
|
2017-11-30 20:35:54 +08:00
|
|
|
depends on !STACKDEPOT
|
2020-06-14 00:50:22 +08:00
|
|
|
help
|
2017-07-25 21:54:24 +08: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
|