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 */
|
2008-04-17 12:46:26 +07:00
|
|
|
#ifndef _ENTRY_H
|
|
|
|
#define _ENTRY_H
|
|
|
|
|
2016-05-07 17:15:21 +07:00
|
|
|
#include <linux/percpu.h>
|
2008-04-17 12:46:26 +07:00
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/signal.h>
|
|
|
|
#include <asm/ptrace.h>
|
2014-10-01 15:57:57 +07:00
|
|
|
#include <asm/idle.h>
|
2011-10-30 21:17:13 +07:00
|
|
|
|
|
|
|
extern void *restart_stack;
|
2013-04-08 21:09:31 +07:00
|
|
|
extern unsigned long suspend_zero_pages;
|
2011-10-30 21:17:13 +07:00
|
|
|
|
2012-03-11 22:59:26 +07:00
|
|
|
void system_call(void);
|
|
|
|
void pgm_check_handler(void);
|
|
|
|
void ext_int_handler(void);
|
|
|
|
void io_int_handler(void);
|
|
|
|
void mcck_int_handler(void);
|
|
|
|
void restart_int_handler(void);
|
|
|
|
void restart_call_handler(void);
|
|
|
|
|
2011-10-30 21:17:13 +07:00
|
|
|
asmlinkage long do_syscall_trace_enter(struct pt_regs *regs);
|
|
|
|
asmlinkage void do_syscall_trace_exit(struct pt_regs *regs);
|
|
|
|
|
2011-12-27 17:27:18 +07:00
|
|
|
void do_protection_exception(struct pt_regs *regs);
|
|
|
|
void do_dat_exception(struct pt_regs *regs);
|
2008-04-17 12:46:26 +07:00
|
|
|
|
2012-10-18 23:10:06 +07:00
|
|
|
void addressing_exception(struct pt_regs *regs);
|
|
|
|
void data_exception(struct pt_regs *regs);
|
|
|
|
void default_trap_handler(struct pt_regs *regs);
|
|
|
|
void divide_exception(struct pt_regs *regs);
|
|
|
|
void execute_exception(struct pt_regs *regs);
|
|
|
|
void hfp_divide_exception(struct pt_regs *regs);
|
|
|
|
void hfp_overflow_exception(struct pt_regs *regs);
|
|
|
|
void hfp_significance_exception(struct pt_regs *regs);
|
|
|
|
void hfp_sqrt_exception(struct pt_regs *regs);
|
|
|
|
void hfp_underflow_exception(struct pt_regs *regs);
|
|
|
|
void illegal_op(struct pt_regs *regs);
|
|
|
|
void operand_exception(struct pt_regs *regs);
|
|
|
|
void overflow_exception(struct pt_regs *regs);
|
|
|
|
void privileged_op(struct pt_regs *regs);
|
|
|
|
void space_switch_exception(struct pt_regs *regs);
|
|
|
|
void special_op_exception(struct pt_regs *regs);
|
|
|
|
void specification_exception(struct pt_regs *regs);
|
|
|
|
void transaction_exception(struct pt_regs *regs);
|
|
|
|
void translation_exception(struct pt_regs *regs);
|
2014-10-06 22:53:53 +07:00
|
|
|
void vector_exception(struct pt_regs *regs);
|
2012-10-18 23:10:06 +07:00
|
|
|
|
2011-01-05 18:48:10 +07:00
|
|
|
void do_per_trap(struct pt_regs *regs);
|
2014-09-22 21:39:06 +07:00
|
|
|
void do_report_trap(struct pt_regs *regs, int si_signo, int si_code, char *str);
|
2008-04-17 12:46:26 +07:00
|
|
|
void syscall_trace(struct pt_regs *regs, int entryexit);
|
|
|
|
void kernel_stack_overflow(struct pt_regs * regs);
|
|
|
|
void do_signal(struct pt_regs *regs);
|
2014-07-14 03:21:03 +07:00
|
|
|
void handle_signal32(struct ksignal *ksig, sigset_t *oldset,
|
|
|
|
struct pt_regs *regs);
|
2011-10-30 21:17:13 +07:00
|
|
|
void do_notify_resume(struct pt_regs *regs);
|
2008-04-17 12:46:26 +07:00
|
|
|
|
2013-09-07 00:10:48 +07:00
|
|
|
void __init init_IRQ(void);
|
|
|
|
void do_IRQ(struct pt_regs *regs, int irq);
|
2011-10-30 21:17:13 +07:00
|
|
|
void do_restart(void);
|
2018-05-04 18:22:12 +07:00
|
|
|
void __init startup_init_nobss(void);
|
2008-04-17 12:46:26 +07:00
|
|
|
void __init startup_init(void);
|
2011-12-27 17:27:18 +07:00
|
|
|
void die(struct pt_regs *regs, const char *str);
|
2013-09-07 00:10:48 +07:00
|
|
|
int setup_profiling_timer(unsigned int multiplier);
|
2011-10-30 21:17:13 +07:00
|
|
|
void __init time_init(void);
|
2013-09-07 00:10:48 +07:00
|
|
|
int pfn_is_nosave(unsigned long);
|
|
|
|
void s390_early_resume(void);
|
|
|
|
unsigned long prepare_ftrace_return(unsigned long parent, unsigned long ip);
|
2011-10-30 21:17:13 +07:00
|
|
|
|
2010-03-11 06:21:15 +07:00
|
|
|
struct s390_mmap_arg_struct;
|
2008-04-17 12:46:26 +07:00
|
|
|
struct fadvise64_64_args;
|
|
|
|
struct old_sigaction;
|
|
|
|
|
2014-12-12 19:11:08 +07:00
|
|
|
long sys_rt_sigreturn(void);
|
|
|
|
long sys_sigreturn(void);
|
|
|
|
|
2014-02-27 21:16:04 +07:00
|
|
|
long sys_s390_personality(unsigned int personality);
|
2014-03-01 18:18:46 +07:00
|
|
|
long sys_s390_runtime_instr(int command, int signum);
|
2016-01-26 20:10:34 +07:00
|
|
|
long sys_s390_guarded_storage(int command, struct gs_cb __user *);
|
2014-11-14 20:27:58 +07:00
|
|
|
long sys_s390_pci_mmio_write(unsigned long, const void __user *, size_t);
|
|
|
|
long sys_s390_pci_mmio_read(unsigned long, void __user *, size_t);
|
2017-09-29 17:41:52 +07:00
|
|
|
long sys_s390_sthyi(unsigned long function_code, void __user *buffer, u64 __user *return_code, unsigned long flags);
|
2016-05-07 17:15:21 +07:00
|
|
|
|
|
|
|
DECLARE_PER_CPU(u64, mt_cycles[8]);
|
|
|
|
|
2016-06-27 20:52:38 +07:00
|
|
|
void verify_facilities(void);
|
2016-01-26 20:10:34 +07:00
|
|
|
void gs_load_bc_cb(struct pt_regs *regs);
|
2017-02-17 14:13:28 +07:00
|
|
|
void set_fs_fixup(void);
|
2016-06-27 20:52:38 +07:00
|
|
|
|
2008-04-17 12:46:26 +07:00
|
|
|
#endif /* _ENTRY_H */
|