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 21:07:57 +07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2009-03-26 21:24:01 +07:00
|
|
|
/*
|
|
|
|
* Machine check handler definitions
|
|
|
|
*
|
2012-07-20 16:15:04 +07:00
|
|
|
* Copyright IBM Corp. 2000, 2009
|
2009-03-26 21:24:01 +07:00
|
|
|
* Author(s): Ingo Adlung <adlung@de.ibm.com>,
|
|
|
|
* Martin Schwidefsky <schwidefsky@de.ibm.com>,
|
|
|
|
* Cornelia Huck <cornelia.huck@de.ibm.com>,
|
|
|
|
* Heiko Carstens <heiko.carstens@de.ibm.com>,
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _ASM_S390_NMI_H
|
|
|
|
#define _ASM_S390_NMI_H
|
|
|
|
|
2015-10-01 22:02:48 +07:00
|
|
|
#include <linux/const.h>
|
2009-03-26 21:24:01 +07:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
2017-06-07 16:30:42 +07:00
|
|
|
#define MCIC_SUBCLASS_MASK (1ULL<<63 | 1ULL<<62 | 1ULL<<61 | \
|
|
|
|
1ULL<<59 | 1ULL<<58 | 1ULL<<56 | \
|
|
|
|
1ULL<<55 | 1ULL<<54 | 1ULL<<53 | \
|
|
|
|
1ULL<<52 | 1ULL<<47 | 1ULL<<46 | \
|
|
|
|
1ULL<<45 | 1ULL<<44)
|
2015-10-01 22:02:48 +07:00
|
|
|
#define MCCK_CODE_SYSTEM_DAMAGE _BITUL(63)
|
2017-06-07 16:30:42 +07:00
|
|
|
#define MCCK_CODE_EXT_DAMAGE _BITUL(63 - 5)
|
|
|
|
#define MCCK_CODE_CP _BITUL(63 - 9)
|
2015-10-01 22:02:48 +07:00
|
|
|
#define MCCK_CODE_CPU_TIMER_VALID _BITUL(63 - 46)
|
|
|
|
#define MCCK_CODE_PSW_MWP_VALID _BITUL(63 - 20)
|
|
|
|
#define MCCK_CODE_PSW_IA_VALID _BITUL(63 - 23)
|
2017-10-12 18:24:48 +07:00
|
|
|
#define MCCK_CODE_CR_VALID _BITUL(63 - 29)
|
|
|
|
#define MCCK_CODE_GS_VALID _BITUL(63 - 36)
|
|
|
|
#define MCCK_CODE_FC_VALID _BITUL(63 - 43)
|
KVM: s390: Inject machine check into the guest
If the exit flag of SIE indicates that a machine check has happened
during guest's running and needs to be injected, inject it to the guest
accordingly.
But some machine checks, e.g. Channel Report Pending (CRW), refer to
host conditions only (the guest's channel devices are not managed by
the kernel directly) and are therefore not injected into the guest.
External Damage (ED) is also not reinjected into the guest because ETR
conditions are gone in Linux and STP conditions are not enabled in the
guest, and ED contains only these 8 ETR and STP conditions.
In general, instruction-processing damage, system recovery,
storage error, service-processor damage and channel subsystem damage
will be reinjected into the guest, and the remain (System damage,
timing-facility damage, warning, ED and CRW) will be handled on the host.
Signed-off-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
2017-06-07 17:03:05 +07:00
|
|
|
|
2015-10-01 22:02:48 +07:00
|
|
|
#ifndef __ASSEMBLY__
|
|
|
|
|
2015-10-12 18:00:39 +07:00
|
|
|
union mci {
|
|
|
|
unsigned long val;
|
|
|
|
struct {
|
|
|
|
u64 sd : 1; /* 00 system damage */
|
|
|
|
u64 pd : 1; /* 01 instruction-processing damage */
|
|
|
|
u64 sr : 1; /* 02 system recovery */
|
|
|
|
u64 : 1; /* 03 */
|
|
|
|
u64 cd : 1; /* 04 timing-facility damage */
|
|
|
|
u64 ed : 1; /* 05 external damage */
|
|
|
|
u64 : 1; /* 06 */
|
|
|
|
u64 dg : 1; /* 07 degradation */
|
|
|
|
u64 w : 1; /* 08 warning pending */
|
|
|
|
u64 cp : 1; /* 09 channel-report pending */
|
|
|
|
u64 sp : 1; /* 10 service-processor damage */
|
|
|
|
u64 ck : 1; /* 11 channel-subsystem damage */
|
|
|
|
u64 : 2; /* 12-13 */
|
|
|
|
u64 b : 1; /* 14 backed up */
|
|
|
|
u64 : 1; /* 15 */
|
|
|
|
u64 se : 1; /* 16 storage error uncorrected */
|
|
|
|
u64 sc : 1; /* 17 storage error corrected */
|
|
|
|
u64 ke : 1; /* 18 storage-key error uncorrected */
|
|
|
|
u64 ds : 1; /* 19 storage degradation */
|
|
|
|
u64 wp : 1; /* 20 psw mwp validity */
|
|
|
|
u64 ms : 1; /* 21 psw mask and key validity */
|
|
|
|
u64 pm : 1; /* 22 psw program mask and cc validity */
|
|
|
|
u64 ia : 1; /* 23 psw instruction address validity */
|
|
|
|
u64 fa : 1; /* 24 failing storage address validity */
|
|
|
|
u64 vr : 1; /* 25 vector register validity */
|
|
|
|
u64 ec : 1; /* 26 external damage code validity */
|
|
|
|
u64 fp : 1; /* 27 floating point register validity */
|
|
|
|
u64 gr : 1; /* 28 general register validity */
|
|
|
|
u64 cr : 1; /* 29 control register validity */
|
|
|
|
u64 : 1; /* 30 */
|
|
|
|
u64 st : 1; /* 31 storage logical validity */
|
|
|
|
u64 ie : 1; /* 32 indirect storage error */
|
|
|
|
u64 ar : 1; /* 33 access register validity */
|
|
|
|
u64 da : 1; /* 34 delayed access exception */
|
2016-01-26 20:10:34 +07:00
|
|
|
u64 : 1; /* 35 */
|
2017-08-01 12:50:10 +07:00
|
|
|
u64 gs : 1; /* 36 guarded storage registers validity */
|
2016-01-26 20:10:34 +07:00
|
|
|
u64 : 5; /* 37-41 */
|
2015-10-12 18:00:39 +07:00
|
|
|
u64 pr : 1; /* 42 tod programmable register validity */
|
|
|
|
u64 fc : 1; /* 43 fp control register validity */
|
|
|
|
u64 ap : 1; /* 44 ancillary report */
|
|
|
|
u64 : 1; /* 45 */
|
|
|
|
u64 ct : 1; /* 46 cpu timer validity */
|
|
|
|
u64 cc : 1; /* 47 clock comparator validity */
|
|
|
|
u64 : 16; /* 47-63 */
|
|
|
|
};
|
2009-03-26 21:24:01 +07:00
|
|
|
};
|
|
|
|
|
2016-01-26 20:10:34 +07:00
|
|
|
#define MCESA_ORIGIN_MASK (~0x3ffUL)
|
|
|
|
#define MCESA_LC_MASK (0xfUL)
|
2017-10-12 18:24:47 +07:00
|
|
|
#define MCESA_MIN_SIZE (1024)
|
|
|
|
#define MCESA_MAX_SIZE (2048)
|
2016-01-26 20:10:34 +07:00
|
|
|
|
|
|
|
struct mcesa {
|
|
|
|
u8 vector_save_area[1024];
|
|
|
|
u8 guarded_storage_save_area[32];
|
|
|
|
};
|
|
|
|
|
2009-03-26 21:24:01 +07:00
|
|
|
struct pt_regs;
|
|
|
|
|
2017-10-12 18:24:47 +07:00
|
|
|
void nmi_alloc_boot_cpu(struct lowcore *lc);
|
|
|
|
int nmi_alloc_per_cpu(struct lowcore *lc);
|
|
|
|
void nmi_free_per_cpu(struct lowcore *lc);
|
|
|
|
|
|
|
|
void s390_handle_mcck(void);
|
|
|
|
void s390_do_machine_check(struct pt_regs *regs);
|
2009-03-26 21:24:01 +07:00
|
|
|
|
2015-10-01 22:02:48 +07:00
|
|
|
#endif /* __ASSEMBLY__ */
|
2009-03-26 21:24:01 +07:00
|
|
|
#endif /* _ASM_S390_NMI_H */
|