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
|
|
|
/*
|
|
|
|
* S390 version
|
2017-06-27 18:44:11 +08:00
|
|
|
* Copyright IBM Corp. 1999, 2017
|
2005-04-17 06:20:36 +08:00
|
|
|
*/
|
|
|
|
#ifndef _ASM_S390_SETUP_H
|
|
|
|
#define _ASM_S390_SETUP_H
|
|
|
|
|
2019-07-17 07:27:01 +08:00
|
|
|
#include <linux/bits.h>
|
2012-10-09 16:47:31 +08:00
|
|
|
#include <uapi/asm/setup.h>
|
2006-12-07 12:40:38 +08:00
|
|
|
|
2018-06-25 19:59:35 +08:00
|
|
|
#define EP_OFFSET 0x10008
|
|
|
|
#define EP_STRING "S390EP"
|
2005-04-17 06:20:36 +08:00
|
|
|
#define PARMAREA 0x10400
|
2019-04-08 18:49:58 +08:00
|
|
|
#define EARLY_SCCB_OFFSET 0x11000
|
|
|
|
#define HEAD_END 0x12000
|
|
|
|
|
|
|
|
#define EARLY_SCCB_SIZE PAGE_SIZE
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2015-10-01 23:02:48 +08:00
|
|
|
/*
|
2015-12-15 16:26:30 +08:00
|
|
|
* Machine features detected in early.c
|
2015-10-01 23:02:48 +08:00
|
|
|
*/
|
|
|
|
|
2019-07-17 07:27:01 +08:00
|
|
|
#define MACHINE_FLAG_VM BIT(0)
|
|
|
|
#define MACHINE_FLAG_KVM BIT(1)
|
|
|
|
#define MACHINE_FLAG_LPAR BIT(2)
|
|
|
|
#define MACHINE_FLAG_DIAG9C BIT(3)
|
|
|
|
#define MACHINE_FLAG_ESOP BIT(4)
|
|
|
|
#define MACHINE_FLAG_IDTE BIT(5)
|
|
|
|
#define MACHINE_FLAG_DIAG44 BIT(6)
|
|
|
|
#define MACHINE_FLAG_EDAT1 BIT(7)
|
|
|
|
#define MACHINE_FLAG_EDAT2 BIT(8)
|
|
|
|
#define MACHINE_FLAG_TOPOLOGY BIT(10)
|
|
|
|
#define MACHINE_FLAG_TE BIT(11)
|
|
|
|
#define MACHINE_FLAG_TLB_LC BIT(12)
|
|
|
|
#define MACHINE_FLAG_VX BIT(13)
|
|
|
|
#define MACHINE_FLAG_TLB_GUEST BIT(14)
|
|
|
|
#define MACHINE_FLAG_NX BIT(15)
|
|
|
|
#define MACHINE_FLAG_GS BIT(16)
|
|
|
|
#define MACHINE_FLAG_SCC BIT(17)
|
|
|
|
|
|
|
|
#define LPP_MAGIC BIT(31)
|
2016-03-08 21:00:23 +08:00
|
|
|
#define LPP_PID_MASK _AC(0xffffffff, UL)
|
2015-10-07 00:06:15 +08:00
|
|
|
|
2017-06-27 18:44:11 +08:00
|
|
|
/* Offsets to entry points in kernel/head.S */
|
|
|
|
|
|
|
|
#define STARTUP_NORMAL_OFFSET 0x10000
|
|
|
|
#define STARTUP_KDUMP_OFFSET 0x10010
|
|
|
|
|
|
|
|
/* Offsets to parameters in kernel/head.S */
|
|
|
|
|
|
|
|
#define IPL_DEVICE_OFFSET 0x10400
|
|
|
|
#define INITRD_START_OFFSET 0x10408
|
|
|
|
#define INITRD_SIZE_OFFSET 0x10410
|
|
|
|
#define OLDMEM_BASE_OFFSET 0x10418
|
|
|
|
#define OLDMEM_SIZE_OFFSET 0x10420
|
2019-07-15 21:30:33 +08:00
|
|
|
#define KERNEL_VERSION_OFFSET 0x10428
|
2017-06-27 18:44:11 +08:00
|
|
|
#define COMMAND_LINE_OFFSET 0x10480
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2010-02-27 05:37:43 +08:00
|
|
|
#include <asm/lowcore.h>
|
|
|
|
#include <asm/types.h>
|
|
|
|
|
2017-06-27 18:44:11 +08:00
|
|
|
#define IPL_DEVICE (*(unsigned long *) (IPL_DEVICE_OFFSET))
|
|
|
|
#define INITRD_START (*(unsigned long *) (INITRD_START_OFFSET))
|
|
|
|
#define INITRD_SIZE (*(unsigned long *) (INITRD_SIZE_OFFSET))
|
|
|
|
#define OLDMEM_BASE (*(unsigned long *) (OLDMEM_BASE_OFFSET))
|
|
|
|
#define OLDMEM_SIZE (*(unsigned long *) (OLDMEM_SIZE_OFFSET))
|
|
|
|
#define COMMAND_LINE ((char *) (COMMAND_LINE_OFFSET))
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2019-03-07 00:36:26 +08:00
|
|
|
struct parmarea {
|
|
|
|
unsigned long ipl_device; /* 0x10400 */
|
|
|
|
unsigned long initrd_start; /* 0x10408 */
|
|
|
|
unsigned long initrd_size; /* 0x10410 */
|
|
|
|
unsigned long oldmem_base; /* 0x10418 */
|
|
|
|
unsigned long oldmem_size; /* 0x10420 */
|
2019-07-15 21:30:33 +08:00
|
|
|
unsigned long kernel_version; /* 0x10428 */
|
|
|
|
char pad1[0x10480 - 0x10430]; /* 0x10430 - 0x10480 */
|
2019-03-07 00:36:26 +08:00
|
|
|
char command_line[ARCH_COMMAND_LINE_SIZE]; /* 0x10480 */
|
|
|
|
};
|
|
|
|
|
2017-11-18 01:44:28 +08:00
|
|
|
extern int noexec_disabled;
|
2009-02-19 22:19:01 +08:00
|
|
|
extern int memory_end_set;
|
|
|
|
extern unsigned long memory_end;
|
2019-08-02 18:28:20 +08:00
|
|
|
extern unsigned long vmalloc_size;
|
2014-01-30 01:16:01 +08:00
|
|
|
extern unsigned long max_physmem_end;
|
2019-07-18 01:38:42 +08:00
|
|
|
extern unsigned long __swsusp_reset_dma;
|
2006-12-04 22:40:38 +08:00
|
|
|
|
2009-04-14 21:36:16 +08:00
|
|
|
#define MACHINE_IS_VM (S390_lowcore.machine_flags & MACHINE_FLAG_VM)
|
|
|
|
#define MACHINE_IS_KVM (S390_lowcore.machine_flags & MACHINE_FLAG_KVM)
|
2010-02-27 05:37:38 +08:00
|
|
|
#define MACHINE_IS_LPAR (S390_lowcore.machine_flags & MACHINE_FLAG_LPAR)
|
|
|
|
|
2009-04-14 21:36:16 +08:00
|
|
|
#define MACHINE_HAS_DIAG9C (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG9C)
|
2012-11-07 20:17:37 +08:00
|
|
|
#define MACHINE_HAS_ESOP (S390_lowcore.machine_flags & MACHINE_FLAG_ESOP)
|
2009-04-14 21:36:16 +08:00
|
|
|
#define MACHINE_HAS_IDTE (S390_lowcore.machine_flags & MACHINE_FLAG_IDTE)
|
|
|
|
#define MACHINE_HAS_DIAG44 (S390_lowcore.machine_flags & MACHINE_FLAG_DIAG44)
|
2012-09-28 21:06:41 +08:00
|
|
|
#define MACHINE_HAS_EDAT1 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT1)
|
2012-09-27 16:45:06 +08:00
|
|
|
#define MACHINE_HAS_EDAT2 (S390_lowcore.machine_flags & MACHINE_FLAG_EDAT2)
|
2010-10-25 22:10:52 +08:00
|
|
|
#define MACHINE_HAS_TOPOLOGY (S390_lowcore.machine_flags & MACHINE_FLAG_TOPOLOGY)
|
2012-07-31 17:03:04 +08:00
|
|
|
#define MACHINE_HAS_TE (S390_lowcore.machine_flags & MACHINE_FLAG_TE)
|
2014-04-03 19:55:01 +08:00
|
|
|
#define MACHINE_HAS_TLB_LC (S390_lowcore.machine_flags & MACHINE_FLAG_TLB_LC)
|
2014-10-06 23:53:53 +08:00
|
|
|
#define MACHINE_HAS_VX (S390_lowcore.machine_flags & MACHINE_FLAG_VX)
|
2016-07-26 22:53:09 +08:00
|
|
|
#define MACHINE_HAS_TLB_GUEST (S390_lowcore.machine_flags & MACHINE_FLAG_TLB_GUEST)
|
2016-03-22 17:54:24 +08:00
|
|
|
#define MACHINE_HAS_NX (S390_lowcore.machine_flags & MACHINE_FLAG_NX)
|
2016-01-26 21:10:34 +08:00
|
|
|
#define MACHINE_HAS_GS (S390_lowcore.machine_flags & MACHINE_FLAG_GS)
|
2016-10-27 18:41:39 +08:00
|
|
|
#define MACHINE_HAS_SCC (S390_lowcore.machine_flags & MACHINE_FLAG_SCC)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Console mode. Override with conmode=
|
|
|
|
*/
|
|
|
|
extern unsigned int console_mode;
|
|
|
|
extern unsigned int console_devno;
|
|
|
|
extern unsigned int console_irq;
|
|
|
|
|
2007-02-06 04:16:47 +08:00
|
|
|
extern char vmhalt_cmd[];
|
|
|
|
extern char vmpoff_cmd[];
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#define CONSOLE_IS_UNDEFINED (console_mode == 0)
|
|
|
|
#define CONSOLE_IS_SCLP (console_mode == 1)
|
|
|
|
#define CONSOLE_IS_3215 (console_mode == 2)
|
|
|
|
#define CONSOLE_IS_3270 (console_mode == 3)
|
2016-07-07 13:52:38 +08:00
|
|
|
#define CONSOLE_IS_VT220 (console_mode == 4)
|
|
|
|
#define CONSOLE_IS_HVC (console_mode == 5)
|
2005-04-17 06:20:36 +08:00
|
|
|
#define SET_CONSOLE_SCLP do { console_mode = 1; } while (0)
|
|
|
|
#define SET_CONSOLE_3215 do { console_mode = 2; } while (0)
|
|
|
|
#define SET_CONSOLE_3270 do { console_mode = 3; } while (0)
|
2016-07-07 13:52:38 +08:00
|
|
|
#define SET_CONSOLE_VT220 do { console_mode = 4; } while (0)
|
|
|
|
#define SET_CONSOLE_HVC do { console_mode = 5; } while (0)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2012-03-29 01:30:02 +08:00
|
|
|
#ifdef CONFIG_PFAULT
|
|
|
|
extern int pfault_init(void);
|
|
|
|
extern void pfault_fini(void);
|
|
|
|
#else /* CONFIG_PFAULT */
|
|
|
|
#define pfault_init() ({-1;})
|
|
|
|
#define pfault_fini() do { } while (0)
|
|
|
|
#endif /* CONFIG_PFAULT */
|
|
|
|
|
2017-08-07 21:16:15 +08:00
|
|
|
#ifdef CONFIG_VMCP
|
|
|
|
void vmcp_cma_reserve(void);
|
|
|
|
#else
|
|
|
|
static inline void vmcp_cma_reserve(void) { }
|
|
|
|
#endif
|
|
|
|
|
2016-02-24 21:27:46 +08:00
|
|
|
void report_user_fault(struct pt_regs *regs, long signr, int is_mm_fault);
|
|
|
|
|
2016-06-14 18:56:01 +08:00
|
|
|
void cmma_init(void);
|
|
|
|
void cmma_init_nodat(void);
|
2012-03-29 01:30:02 +08:00
|
|
|
|
|
|
|
extern void (*_machine_restart)(char *command);
|
|
|
|
extern void (*_machine_halt)(void);
|
|
|
|
extern void (*_machine_power_off)(void);
|
|
|
|
|
2019-02-04 04:37:20 +08:00
|
|
|
extern unsigned long __kaslr_offset;
|
|
|
|
static inline unsigned long kaslr_offset(void)
|
|
|
|
{
|
|
|
|
return __kaslr_offset;
|
|
|
|
}
|
|
|
|
|
2006-02-12 09:56:03 +08:00
|
|
|
#else /* __ASSEMBLY__ */
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2017-06-27 18:44:11 +08:00
|
|
|
#define IPL_DEVICE (IPL_DEVICE_OFFSET)
|
|
|
|
#define INITRD_START (INITRD_START_OFFSET)
|
|
|
|
#define INITRD_SIZE (INITRD_SIZE_OFFSET)
|
|
|
|
#define OLDMEM_BASE (OLDMEM_BASE_OFFSET)
|
|
|
|
#define OLDMEM_SIZE (OLDMEM_SIZE_OFFSET)
|
|
|
|
#define COMMAND_LINE (COMMAND_LINE_OFFSET)
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2006-02-12 09:56:03 +08:00
|
|
|
#endif /* __ASSEMBLY__ */
|
|
|
|
#endif /* _ASM_S390_SETUP_H */
|