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
|
|
|
#ifndef _FPU_PROTO_H
|
|
|
|
#define _FPU_PROTO_H
|
|
|
|
|
|
|
|
/* errors.c */
|
|
|
|
extern void FPU_illegal(void);
|
|
|
|
extern void FPU_printall(void);
|
|
|
|
asmlinkage void FPU_exception(int n);
|
2008-01-30 20:30:12 +08:00
|
|
|
extern int real_1op_NaN(FPU_REG *a);
|
2005-04-17 06:20:36 +08:00
|
|
|
extern int real_2op_NaN(FPU_REG const *b, u_char tagb, int deststnr,
|
|
|
|
FPU_REG const *defaultNaN);
|
|
|
|
asmlinkage int arith_invalid(int deststnr);
|
|
|
|
asmlinkage int FPU_divide_by_zero(int deststnr, u_char sign);
|
|
|
|
extern int set_precision_flag(int flags);
|
|
|
|
asmlinkage void set_precision_flag_up(void);
|
|
|
|
asmlinkage void set_precision_flag_down(void);
|
|
|
|
asmlinkage int denormal_operand(void);
|
2008-01-30 20:30:12 +08:00
|
|
|
asmlinkage int arith_overflow(FPU_REG *dest);
|
|
|
|
asmlinkage int arith_underflow(FPU_REG *dest);
|
2005-04-17 06:20:36 +08:00
|
|
|
extern void FPU_stack_overflow(void);
|
|
|
|
extern void FPU_stack_underflow(void);
|
|
|
|
extern void FPU_stack_underflow_i(int i);
|
|
|
|
extern void FPU_stack_underflow_pop(int i);
|
|
|
|
/* fpu_arith.c */
|
|
|
|
extern void fadd__(void);
|
|
|
|
extern void fmul__(void);
|
|
|
|
extern void fsub__(void);
|
|
|
|
extern void fsubr_(void);
|
|
|
|
extern void fdiv__(void);
|
|
|
|
extern void fdivr_(void);
|
|
|
|
extern void fadd_i(void);
|
|
|
|
extern void fmul_i(void);
|
|
|
|
extern void fsubri(void);
|
|
|
|
extern void fsub_i(void);
|
|
|
|
extern void fdivri(void);
|
|
|
|
extern void fdiv_i(void);
|
|
|
|
extern void faddp_(void);
|
|
|
|
extern void fmulp_(void);
|
|
|
|
extern void fsubrp(void);
|
|
|
|
extern void fsubp_(void);
|
|
|
|
extern void fdivrp(void);
|
|
|
|
extern void fdivp_(void);
|
|
|
|
/* fpu_aux.c */
|
|
|
|
extern void finit(void);
|
|
|
|
extern void finit_(void);
|
|
|
|
extern void fstsw_(void);
|
|
|
|
extern void fp_nop(void);
|
|
|
|
extern void fld_i_(void);
|
|
|
|
extern void fxch_i(void);
|
2015-09-18 22:53:30 +08:00
|
|
|
extern void fcmovb(void);
|
|
|
|
extern void fcmove(void);
|
|
|
|
extern void fcmovbe(void);
|
|
|
|
extern void fcmovu(void);
|
|
|
|
extern void fcmovnb(void);
|
|
|
|
extern void fcmovne(void);
|
|
|
|
extern void fcmovnbe(void);
|
|
|
|
extern void fcmovnu(void);
|
2005-04-17 06:20:36 +08:00
|
|
|
extern void ffree_(void);
|
|
|
|
extern void ffreep(void);
|
|
|
|
extern void fst_i_(void);
|
|
|
|
extern void fstp_i(void);
|
|
|
|
/* fpu_entry.c */
|
2009-02-09 21:17:39 +08:00
|
|
|
extern void math_emulate(struct math_emu_info *info);
|
2009-02-09 21:17:39 +08:00
|
|
|
extern void math_abort(struct math_emu_info *info, unsigned int signal);
|
2005-04-17 06:20:36 +08:00
|
|
|
/* fpu_etc.c */
|
|
|
|
extern void FPU_etc(void);
|
|
|
|
/* fpu_tags.c */
|
|
|
|
extern int FPU_gettag0(void);
|
|
|
|
extern int FPU_gettagi(int stnr);
|
|
|
|
extern int FPU_gettag(int regnr);
|
|
|
|
extern void FPU_settag0(int tag);
|
|
|
|
extern void FPU_settagi(int stnr, int tag);
|
|
|
|
extern void FPU_settag(int regnr, int tag);
|
|
|
|
extern int FPU_Special(FPU_REG const *ptr);
|
|
|
|
extern int isNaN(FPU_REG const *ptr);
|
|
|
|
extern void FPU_pop(void);
|
|
|
|
extern int FPU_empty_i(int stnr);
|
2008-01-30 20:30:11 +08:00
|
|
|
extern int FPU_stackoverflow(FPU_REG ** st_new_ptr);
|
2005-04-17 06:20:36 +08:00
|
|
|
extern void FPU_copy_to_regi(FPU_REG const *r, u_char tag, int stnr);
|
|
|
|
extern void FPU_copy_to_reg1(FPU_REG const *r, u_char tag);
|
|
|
|
extern void FPU_copy_to_reg0(FPU_REG const *r, u_char tag);
|
|
|
|
/* fpu_trig.c */
|
|
|
|
extern void FPU_triga(void);
|
|
|
|
extern void FPU_trigb(void);
|
|
|
|
/* get_address.c */
|
|
|
|
extern void __user *FPU_get_address(u_char FPU_modrm, unsigned long *fpu_eip,
|
2008-01-30 20:30:11 +08:00
|
|
|
struct address *addr,
|
|
|
|
fpu_addr_modes addr_modes);
|
2005-04-17 06:20:36 +08:00
|
|
|
extern void __user *FPU_get_address_16(u_char FPU_modrm, unsigned long *fpu_eip,
|
2008-01-30 20:30:11 +08:00
|
|
|
struct address *addr,
|
|
|
|
fpu_addr_modes addr_modes);
|
2005-04-17 06:20:36 +08:00
|
|
|
/* load_store.c */
|
|
|
|
extern int FPU_load_store(u_char type, fpu_addr_modes addr_modes,
|
2008-01-30 20:30:11 +08:00
|
|
|
void __user * data_address);
|
2005-04-17 06:20:36 +08:00
|
|
|
/* poly_2xm1.c */
|
2008-01-30 20:30:12 +08:00
|
|
|
extern int poly_2xm1(u_char sign, FPU_REG * arg, FPU_REG *result);
|
2005-04-17 06:20:36 +08:00
|
|
|
/* poly_atan.c */
|
2008-01-30 20:30:12 +08:00
|
|
|
extern void poly_atan(FPU_REG * st0_ptr, u_char st0_tag, FPU_REG *st1_ptr,
|
2005-04-17 06:20:36 +08:00
|
|
|
u_char st1_tag);
|
|
|
|
/* poly_l2.c */
|
2008-01-30 20:30:12 +08:00
|
|
|
extern void poly_l2(FPU_REG *st0_ptr, FPU_REG *st1_ptr, u_char st1_sign);
|
|
|
|
extern int poly_l2p1(u_char s0, u_char s1, FPU_REG *r0, FPU_REG *r1,
|
2008-01-30 20:30:11 +08:00
|
|
|
FPU_REG * d);
|
2005-04-17 06:20:36 +08:00
|
|
|
/* poly_sin.c */
|
2008-01-30 20:30:12 +08:00
|
|
|
extern void poly_sine(FPU_REG *st0_ptr);
|
|
|
|
extern void poly_cos(FPU_REG *st0_ptr);
|
2005-04-17 06:20:36 +08:00
|
|
|
/* poly_tan.c */
|
2008-01-30 20:30:12 +08:00
|
|
|
extern void poly_tan(FPU_REG *st0_ptr);
|
2005-04-17 06:20:36 +08:00
|
|
|
/* reg_add_sub.c */
|
|
|
|
extern int FPU_add(FPU_REG const *b, u_char tagb, int destrnr, int control_w);
|
|
|
|
extern int FPU_sub(int flags, int rm, int control_w);
|
|
|
|
/* reg_compare.c */
|
|
|
|
extern int FPU_compare_st_data(FPU_REG const *loaded_data, u_char loaded_tag);
|
|
|
|
extern void fcom_st(void);
|
|
|
|
extern void fcompst(void);
|
|
|
|
extern void fcompp(void);
|
|
|
|
extern void fucom_(void);
|
|
|
|
extern void fucomp(void);
|
|
|
|
extern void fucompp(void);
|
2015-09-18 22:53:29 +08:00
|
|
|
extern void fcomi_(void);
|
|
|
|
extern void fcomip(void);
|
|
|
|
extern void fucomi_(void);
|
|
|
|
extern void fucomip(void);
|
2005-04-17 06:20:36 +08:00
|
|
|
/* reg_constant.c */
|
|
|
|
extern void fconst(void);
|
|
|
|
/* reg_ld_str.c */
|
2008-01-30 20:30:12 +08:00
|
|
|
extern int FPU_load_extended(long double __user *s, int stnr);
|
|
|
|
extern int FPU_load_double(double __user *dfloat, FPU_REG *loaded_data);
|
|
|
|
extern int FPU_load_single(float __user *single, FPU_REG *loaded_data);
|
|
|
|
extern int FPU_load_int64(long long __user *_s);
|
|
|
|
extern int FPU_load_int32(long __user *_s, FPU_REG *loaded_data);
|
|
|
|
extern int FPU_load_int16(short __user *_s, FPU_REG *loaded_data);
|
|
|
|
extern int FPU_load_bcd(u_char __user *s);
|
|
|
|
extern int FPU_store_extended(FPU_REG *st0_ptr, u_char st0_tag,
|
2008-01-30 20:30:11 +08:00
|
|
|
long double __user * d);
|
2008-01-30 20:30:12 +08:00
|
|
|
extern int FPU_store_double(FPU_REG *st0_ptr, u_char st0_tag,
|
2008-01-30 20:30:11 +08:00
|
|
|
double __user * dfloat);
|
2008-01-30 20:30:12 +08:00
|
|
|
extern int FPU_store_single(FPU_REG *st0_ptr, u_char st0_tag,
|
2008-01-30 20:30:11 +08:00
|
|
|
float __user * single);
|
2008-01-30 20:30:12 +08:00
|
|
|
extern int FPU_store_int64(FPU_REG *st0_ptr, u_char st0_tag,
|
2008-01-30 20:30:11 +08:00
|
|
|
long long __user * d);
|
2008-01-30 20:30:12 +08:00
|
|
|
extern int FPU_store_int32(FPU_REG *st0_ptr, u_char st0_tag, long __user *d);
|
|
|
|
extern int FPU_store_int16(FPU_REG *st0_ptr, u_char st0_tag, short __user *d);
|
|
|
|
extern int FPU_store_bcd(FPU_REG *st0_ptr, u_char st0_tag, u_char __user *d);
|
|
|
|
extern int FPU_round_to_int(FPU_REG *r, u_char tag);
|
|
|
|
extern u_char __user *fldenv(fpu_addr_modes addr_modes, u_char __user *s);
|
|
|
|
extern void frstor(fpu_addr_modes addr_modes, u_char __user *data_address);
|
|
|
|
extern u_char __user *fstenv(fpu_addr_modes addr_modes, u_char __user *d);
|
|
|
|
extern void fsave(fpu_addr_modes addr_modes, u_char __user *data_address);
|
|
|
|
extern int FPU_tagof(FPU_REG *ptr);
|
2005-04-17 06:20:36 +08:00
|
|
|
/* reg_mul.c */
|
|
|
|
extern int FPU_mul(FPU_REG const *b, u_char tagb, int deststnr, int control_w);
|
|
|
|
|
|
|
|
extern int FPU_div(int flags, int regrm, int control_w);
|
|
|
|
/* reg_convert.c */
|
2008-01-30 20:30:12 +08:00
|
|
|
extern int FPU_to_exp16(FPU_REG const *a, FPU_REG *x);
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif /* _FPU_PROTO_H */
|