xref: /OK3568_Linux_fs/kernel/Documentation/process/license-rules.rst (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun.. SPDX-License-Identifier: GPL-2.0
2*4882a593Smuzhiyun
3*4882a593Smuzhiyun.. _kernel_licensing:
4*4882a593Smuzhiyun
5*4882a593SmuzhiyunLinux kernel licensing rules
6*4882a593Smuzhiyun============================
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunThe Linux Kernel is provided under the terms of the GNU General Public
9*4882a593SmuzhiyunLicense version 2 only (GPL-2.0), as provided in LICENSES/preferred/GPL-2.0,
10*4882a593Smuzhiyunwith an explicit syscall exception described in
11*4882a593SmuzhiyunLICENSES/exceptions/Linux-syscall-note, as described in the COPYING file.
12*4882a593Smuzhiyun
13*4882a593SmuzhiyunThis documentation file provides a description of how each source file
14*4882a593Smuzhiyunshould be annotated to make its license clear and unambiguous.
15*4882a593SmuzhiyunIt doesn't replace the Kernel's license.
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunThe license described in the COPYING file applies to the kernel source
18*4882a593Smuzhiyunas a whole, though individual source files can have a different license
19*4882a593Smuzhiyunwhich is required to be compatible with the GPL-2.0::
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun    GPL-1.0+  :  GNU General Public License v1.0 or later
22*4882a593Smuzhiyun    GPL-2.0+  :  GNU General Public License v2.0 or later
23*4882a593Smuzhiyun    LGPL-2.0  :  GNU Library General Public License v2 only
24*4882a593Smuzhiyun    LGPL-2.0+ :  GNU Library General Public License v2 or later
25*4882a593Smuzhiyun    LGPL-2.1  :  GNU Lesser General Public License v2.1 only
26*4882a593Smuzhiyun    LGPL-2.1+ :  GNU Lesser General Public License v2.1 or later
27*4882a593Smuzhiyun
28*4882a593SmuzhiyunAside from that, individual files can be provided under a dual license,
29*4882a593Smuzhiyune.g. one of the compatible GPL variants and alternatively under a
30*4882a593Smuzhiyunpermissive license like BSD, MIT etc.
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunThe User-space API (UAPI) header files, which describe the interface of
33*4882a593Smuzhiyunuser-space programs to the kernel are a special case.  According to the
34*4882a593Smuzhiyunnote in the kernel COPYING file, the syscall interface is a clear boundary,
35*4882a593Smuzhiyunwhich does not extend the GPL requirements to any software which uses it to
36*4882a593Smuzhiyuncommunicate with the kernel.  Because the UAPI headers must be includable
37*4882a593Smuzhiyuninto any source files which create an executable running on the Linux
38*4882a593Smuzhiyunkernel, the exception must be documented by a special license expression.
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunThe common way of expressing the license of a source file is to add the
41*4882a593Smuzhiyunmatching boilerplate text into the top comment of the file.  Due to
42*4882a593Smuzhiyunformatting, typos etc. these "boilerplates" are hard to validate for
43*4882a593Smuzhiyuntools which are used in the context of license compliance.
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunAn alternative to boilerplate text is the use of Software Package Data
46*4882a593SmuzhiyunExchange (SPDX) license identifiers in each source file.  SPDX license
47*4882a593Smuzhiyunidentifiers are machine parsable and precise shorthands for the license
48*4882a593Smuzhiyununder which the content of the file is contributed.  SPDX license
49*4882a593Smuzhiyunidentifiers are managed by the SPDX Workgroup at the Linux Foundation and
50*4882a593Smuzhiyunhave been agreed on by partners throughout the industry, tool vendors, and
51*4882a593Smuzhiyunlegal teams.  For further information see https://spdx.org/
52*4882a593Smuzhiyun
53*4882a593SmuzhiyunThe Linux kernel requires the precise SPDX identifier in all source files.
54*4882a593SmuzhiyunThe valid identifiers used in the kernel are explained in the section
55*4882a593Smuzhiyun`License identifiers`_ and have been retrieved from the official SPDX
56*4882a593Smuzhiyunlicense list at https://spdx.org/licenses/ along with the license texts.
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunLicense identifier syntax
59*4882a593Smuzhiyun-------------------------
60*4882a593Smuzhiyun
61*4882a593Smuzhiyun1. Placement:
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun   The SPDX license identifier in kernel files shall be added at the first
64*4882a593Smuzhiyun   possible line in a file which can contain a comment.  For the majority
65*4882a593Smuzhiyun   of files this is the first line, except for scripts which require the
66*4882a593Smuzhiyun   '#!PATH_TO_INTERPRETER' in the first line.  For those scripts the SPDX
67*4882a593Smuzhiyun   identifier goes into the second line.
68*4882a593Smuzhiyun
69*4882a593Smuzhiyun|
70*4882a593Smuzhiyun
71*4882a593Smuzhiyun2. Style:
72*4882a593Smuzhiyun
73*4882a593Smuzhiyun   The SPDX license identifier is added in form of a comment.  The comment
74*4882a593Smuzhiyun   style depends on the file type::
75*4882a593Smuzhiyun
76*4882a593Smuzhiyun      C source:	// SPDX-License-Identifier: <SPDX License Expression>
77*4882a593Smuzhiyun      C header:	/* SPDX-License-Identifier: <SPDX License Expression> */
78*4882a593Smuzhiyun      ASM:	/* SPDX-License-Identifier: <SPDX License Expression> */
79*4882a593Smuzhiyun      scripts:	# SPDX-License-Identifier: <SPDX License Expression>
80*4882a593Smuzhiyun      .rst:	.. SPDX-License-Identifier: <SPDX License Expression>
81*4882a593Smuzhiyun      .dts{i}:	// SPDX-License-Identifier: <SPDX License Expression>
82*4882a593Smuzhiyun
83*4882a593Smuzhiyun   If a specific tool cannot handle the standard comment style, then the
84*4882a593Smuzhiyun   appropriate comment mechanism which the tool accepts shall be used. This
85*4882a593Smuzhiyun   is the reason for having the "/\* \*/" style comment in C header
86*4882a593Smuzhiyun   files. There was build breakage observed with generated .lds files where
87*4882a593Smuzhiyun   'ld' failed to parse the C++ comment. This has been fixed by now, but
88*4882a593Smuzhiyun   there are still older assembler tools which cannot handle C++ style
89*4882a593Smuzhiyun   comments.
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun|
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun3. Syntax:
94*4882a593Smuzhiyun
95*4882a593Smuzhiyun   A <SPDX License Expression> is either an SPDX short form license
96*4882a593Smuzhiyun   identifier found on the SPDX License List, or the combination of two
97*4882a593Smuzhiyun   SPDX short form license identifiers separated by "WITH" when a license
98*4882a593Smuzhiyun   exception applies. When multiple licenses apply, an expression consists
99*4882a593Smuzhiyun   of keywords "AND", "OR" separating sub-expressions and surrounded by
100*4882a593Smuzhiyun   "(", ")" .
101*4882a593Smuzhiyun
102*4882a593Smuzhiyun   License identifiers for licenses like [L]GPL with the 'or later' option
103*4882a593Smuzhiyun   are constructed by using a "+" for indicating the 'or later' option.::
104*4882a593Smuzhiyun
105*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-2.0+
106*4882a593Smuzhiyun      // SPDX-License-Identifier: LGPL-2.1+
107*4882a593Smuzhiyun
108*4882a593Smuzhiyun   WITH should be used when there is a modifier to a license needed.
109*4882a593Smuzhiyun   For example, the linux kernel UAPI files use the expression::
110*4882a593Smuzhiyun
111*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note
112*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note
113*4882a593Smuzhiyun
114*4882a593Smuzhiyun   Other examples using WITH exceptions found in the kernel are::
115*4882a593Smuzhiyun
116*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-2.0 WITH mif-exception
117*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-2.0+ WITH GCC-exception-2.0
118*4882a593Smuzhiyun
119*4882a593Smuzhiyun   Exceptions can only be used with particular License identifiers. The
120*4882a593Smuzhiyun   valid License identifiers are listed in the tags of the exception text
121*4882a593Smuzhiyun   file. For details see the point `Exceptions`_ in the chapter `License
122*4882a593Smuzhiyun   identifiers`_.
123*4882a593Smuzhiyun
124*4882a593Smuzhiyun   OR should be used if the file is dual licensed and only one license is
125*4882a593Smuzhiyun   to be selected.  For example, some dtsi files are available under dual
126*4882a593Smuzhiyun   licenses::
127*4882a593Smuzhiyun
128*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause
129*4882a593Smuzhiyun
130*4882a593Smuzhiyun   Examples from the kernel for license expressions in dual licensed files::
131*4882a593Smuzhiyun
132*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-2.0 OR MIT
133*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
134*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-2.0 OR Apache-2.0
135*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-2.0 OR MPL-1.1
136*4882a593Smuzhiyun      // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) OR MIT
137*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-1.0+ OR BSD-3-Clause OR OpenSSL
138*4882a593Smuzhiyun
139*4882a593Smuzhiyun   AND should be used if the file has multiple licenses whose terms all
140*4882a593Smuzhiyun   apply to use the file. For example, if code is inherited from another
141*4882a593Smuzhiyun   project and permission has been given to put it in the kernel, but the
142*4882a593Smuzhiyun   original license terms need to remain in effect::
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun      // SPDX-License-Identifier: (GPL-2.0 WITH Linux-syscall-note) AND MIT
145*4882a593Smuzhiyun
146*4882a593Smuzhiyun   Another other example where both sets of license terms need to be
147*4882a593Smuzhiyun   adhered to is::
148*4882a593Smuzhiyun
149*4882a593Smuzhiyun      // SPDX-License-Identifier: GPL-1.0+ AND LGPL-2.1+
150*4882a593Smuzhiyun
151*4882a593SmuzhiyunLicense identifiers
152*4882a593Smuzhiyun-------------------
153*4882a593Smuzhiyun
154*4882a593SmuzhiyunThe licenses currently used, as well as the licenses for code added to the
155*4882a593Smuzhiyunkernel, can be broken down into:
156*4882a593Smuzhiyun
157*4882a593Smuzhiyun1. _`Preferred licenses`:
158*4882a593Smuzhiyun
159*4882a593Smuzhiyun   Whenever possible these licenses should be used as they are known to be
160*4882a593Smuzhiyun   fully compatible and widely used.  These licenses are available from the
161*4882a593Smuzhiyun   directory::
162*4882a593Smuzhiyun
163*4882a593Smuzhiyun      LICENSES/preferred/
164*4882a593Smuzhiyun
165*4882a593Smuzhiyun   in the kernel source tree.
166*4882a593Smuzhiyun
167*4882a593Smuzhiyun   The files in this directory contain the full license text and
168*4882a593Smuzhiyun   `Metatags`_.  The file names are identical to the SPDX license
169*4882a593Smuzhiyun   identifier which shall be used for the license in source files.
170*4882a593Smuzhiyun
171*4882a593Smuzhiyun   Examples::
172*4882a593Smuzhiyun
173*4882a593Smuzhiyun      LICENSES/preferred/GPL-2.0
174*4882a593Smuzhiyun
175*4882a593Smuzhiyun   Contains the GPL version 2 license text and the required metatags::
176*4882a593Smuzhiyun
177*4882a593Smuzhiyun      LICENSES/preferred/MIT
178*4882a593Smuzhiyun
179*4882a593Smuzhiyun   Contains the MIT license text and the required metatags
180*4882a593Smuzhiyun
181*4882a593Smuzhiyun   _`Metatags`:
182*4882a593Smuzhiyun
183*4882a593Smuzhiyun   The following meta tags must be available in a license file:
184*4882a593Smuzhiyun
185*4882a593Smuzhiyun   - Valid-License-Identifier:
186*4882a593Smuzhiyun
187*4882a593Smuzhiyun     One or more lines which declare which License Identifiers are valid
188*4882a593Smuzhiyun     inside the project to reference this particular license text.  Usually
189*4882a593Smuzhiyun     this is a single valid identifier, but e.g. for licenses with the 'or
190*4882a593Smuzhiyun     later' options two identifiers are valid.
191*4882a593Smuzhiyun
192*4882a593Smuzhiyun   - SPDX-URL:
193*4882a593Smuzhiyun
194*4882a593Smuzhiyun     The URL of the SPDX page which contains additional information related
195*4882a593Smuzhiyun     to the license.
196*4882a593Smuzhiyun
197*4882a593Smuzhiyun   - Usage-Guidance:
198*4882a593Smuzhiyun
199*4882a593Smuzhiyun     Freeform text for usage advice. The text must include correct examples
200*4882a593Smuzhiyun     for the SPDX license identifiers as they should be put into source
201*4882a593Smuzhiyun     files according to the `License identifier syntax`_ guidelines.
202*4882a593Smuzhiyun
203*4882a593Smuzhiyun   - License-Text:
204*4882a593Smuzhiyun
205*4882a593Smuzhiyun     All text after this tag is treated as the original license text
206*4882a593Smuzhiyun
207*4882a593Smuzhiyun   File format examples::
208*4882a593Smuzhiyun
209*4882a593Smuzhiyun      Valid-License-Identifier: GPL-2.0
210*4882a593Smuzhiyun      Valid-License-Identifier: GPL-2.0+
211*4882a593Smuzhiyun      SPDX-URL: https://spdx.org/licenses/GPL-2.0.html
212*4882a593Smuzhiyun      Usage-Guide:
213*4882a593Smuzhiyun        To use this license in source code, put one of the following SPDX
214*4882a593Smuzhiyun	tag/value pairs into a comment according to the placement
215*4882a593Smuzhiyun	guidelines in the licensing rules documentation.
216*4882a593Smuzhiyun	For 'GNU General Public License (GPL) version 2 only' use:
217*4882a593Smuzhiyun	  SPDX-License-Identifier: GPL-2.0
218*4882a593Smuzhiyun	For 'GNU General Public License (GPL) version 2 or any later version' use:
219*4882a593Smuzhiyun	  SPDX-License-Identifier: GPL-2.0+
220*4882a593Smuzhiyun      License-Text:
221*4882a593Smuzhiyun        Full license text
222*4882a593Smuzhiyun
223*4882a593Smuzhiyun   ::
224*4882a593Smuzhiyun
225*4882a593Smuzhiyun      SPDX-License-Identifier: MIT
226*4882a593Smuzhiyun      SPDX-URL: https://spdx.org/licenses/MIT.html
227*4882a593Smuzhiyun      Usage-Guide:
228*4882a593Smuzhiyun	To use this license in source code, put the following SPDX
229*4882a593Smuzhiyun	tag/value pair into a comment according to the placement
230*4882a593Smuzhiyun	guidelines in the licensing rules documentation.
231*4882a593Smuzhiyun	  SPDX-License-Identifier: MIT
232*4882a593Smuzhiyun      License-Text:
233*4882a593Smuzhiyun        Full license text
234*4882a593Smuzhiyun
235*4882a593Smuzhiyun|
236*4882a593Smuzhiyun
237*4882a593Smuzhiyun2. Deprecated licenses:
238*4882a593Smuzhiyun
239*4882a593Smuzhiyun   These licenses should only be used for existing code or for importing
240*4882a593Smuzhiyun   code from a different project.  These licenses are available from the
241*4882a593Smuzhiyun   directory::
242*4882a593Smuzhiyun
243*4882a593Smuzhiyun      LICENSES/deprecated/
244*4882a593Smuzhiyun
245*4882a593Smuzhiyun   in the kernel source tree.
246*4882a593Smuzhiyun
247*4882a593Smuzhiyun   The files in this directory contain the full license text and
248*4882a593Smuzhiyun   `Metatags`_.  The file names are identical to the SPDX license
249*4882a593Smuzhiyun   identifier which shall be used for the license in source files.
250*4882a593Smuzhiyun
251*4882a593Smuzhiyun   Examples::
252*4882a593Smuzhiyun
253*4882a593Smuzhiyun      LICENSES/deprecated/ISC
254*4882a593Smuzhiyun
255*4882a593Smuzhiyun   Contains the Internet Systems Consortium license text and the required
256*4882a593Smuzhiyun   metatags::
257*4882a593Smuzhiyun
258*4882a593Smuzhiyun      LICENSES/deprecated/GPL-1.0
259*4882a593Smuzhiyun
260*4882a593Smuzhiyun   Contains the GPL version 1 license text and the required metatags.
261*4882a593Smuzhiyun
262*4882a593Smuzhiyun   Metatags:
263*4882a593Smuzhiyun
264*4882a593Smuzhiyun   The metatag requirements for 'other' licenses are identical to the
265*4882a593Smuzhiyun   requirements of the `Preferred licenses`_.
266*4882a593Smuzhiyun
267*4882a593Smuzhiyun   File format example::
268*4882a593Smuzhiyun
269*4882a593Smuzhiyun      Valid-License-Identifier: ISC
270*4882a593Smuzhiyun      SPDX-URL: https://spdx.org/licenses/ISC.html
271*4882a593Smuzhiyun      Usage-Guide:
272*4882a593Smuzhiyun        Usage of this license in the kernel for new code is discouraged
273*4882a593Smuzhiyun	and it should solely be used for importing code from an already
274*4882a593Smuzhiyun	existing project.
275*4882a593Smuzhiyun        To use this license in source code, put the following SPDX
276*4882a593Smuzhiyun	tag/value pair into a comment according to the placement
277*4882a593Smuzhiyun	guidelines in the licensing rules documentation.
278*4882a593Smuzhiyun	  SPDX-License-Identifier: ISC
279*4882a593Smuzhiyun      License-Text:
280*4882a593Smuzhiyun        Full license text
281*4882a593Smuzhiyun
282*4882a593Smuzhiyun|
283*4882a593Smuzhiyun
284*4882a593Smuzhiyun3. Dual Licensing Only
285*4882a593Smuzhiyun
286*4882a593Smuzhiyun   These licenses should only be used to dual license code with another
287*4882a593Smuzhiyun   license in addition to a preferred license.  These licenses are available
288*4882a593Smuzhiyun   from the directory::
289*4882a593Smuzhiyun
290*4882a593Smuzhiyun      LICENSES/dual/
291*4882a593Smuzhiyun
292*4882a593Smuzhiyun   in the kernel source tree.
293*4882a593Smuzhiyun
294*4882a593Smuzhiyun   The files in this directory contain the full license text and
295*4882a593Smuzhiyun   `Metatags`_.  The file names are identical to the SPDX license
296*4882a593Smuzhiyun   identifier which shall be used for the license in source files.
297*4882a593Smuzhiyun
298*4882a593Smuzhiyun   Examples::
299*4882a593Smuzhiyun
300*4882a593Smuzhiyun      LICENSES/dual/MPL-1.1
301*4882a593Smuzhiyun
302*4882a593Smuzhiyun   Contains the Mozilla Public License version 1.1 license text and the
303*4882a593Smuzhiyun   required metatags::
304*4882a593Smuzhiyun
305*4882a593Smuzhiyun      LICENSES/dual/Apache-2.0
306*4882a593Smuzhiyun
307*4882a593Smuzhiyun   Contains the Apache License version 2.0 license text and the required
308*4882a593Smuzhiyun   metatags.
309*4882a593Smuzhiyun
310*4882a593Smuzhiyun   Metatags:
311*4882a593Smuzhiyun
312*4882a593Smuzhiyun   The metatag requirements for 'other' licenses are identical to the
313*4882a593Smuzhiyun   requirements of the `Preferred licenses`_.
314*4882a593Smuzhiyun
315*4882a593Smuzhiyun   File format example::
316*4882a593Smuzhiyun
317*4882a593Smuzhiyun      Valid-License-Identifier: MPL-1.1
318*4882a593Smuzhiyun      SPDX-URL: https://spdx.org/licenses/MPL-1.1.html
319*4882a593Smuzhiyun      Usage-Guide:
320*4882a593Smuzhiyun        Do NOT use. The MPL-1.1 is not GPL2 compatible. It may only be used for
321*4882a593Smuzhiyun        dual-licensed files where the other license is GPL2 compatible.
322*4882a593Smuzhiyun        If you end up using this it MUST be used together with a GPL2 compatible
323*4882a593Smuzhiyun        license using "OR".
324*4882a593Smuzhiyun        To use the Mozilla Public License version 1.1 put the following SPDX
325*4882a593Smuzhiyun        tag/value pair into a comment according to the placement guidelines in
326*4882a593Smuzhiyun        the licensing rules documentation:
327*4882a593Smuzhiyun      SPDX-License-Identifier: MPL-1.1
328*4882a593Smuzhiyun      License-Text:
329*4882a593Smuzhiyun        Full license text
330*4882a593Smuzhiyun
331*4882a593Smuzhiyun|
332*4882a593Smuzhiyun
333*4882a593Smuzhiyun4. _`Exceptions`:
334*4882a593Smuzhiyun
335*4882a593Smuzhiyun   Some licenses can be amended with exceptions which grant certain rights
336*4882a593Smuzhiyun   which the original license does not.  These exceptions are available
337*4882a593Smuzhiyun   from the directory::
338*4882a593Smuzhiyun
339*4882a593Smuzhiyun      LICENSES/exceptions/
340*4882a593Smuzhiyun
341*4882a593Smuzhiyun   in the kernel source tree.  The files in this directory contain the full
342*4882a593Smuzhiyun   exception text and the required `Exception Metatags`_.
343*4882a593Smuzhiyun
344*4882a593Smuzhiyun   Examples::
345*4882a593Smuzhiyun
346*4882a593Smuzhiyun      LICENSES/exceptions/Linux-syscall-note
347*4882a593Smuzhiyun
348*4882a593Smuzhiyun   Contains the Linux syscall exception as documented in the COPYING
349*4882a593Smuzhiyun   file of the Linux kernel, which is used for UAPI header files.
350*4882a593Smuzhiyun   e.g. /\* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note \*/::
351*4882a593Smuzhiyun
352*4882a593Smuzhiyun      LICENSES/exceptions/GCC-exception-2.0
353*4882a593Smuzhiyun
354*4882a593Smuzhiyun   Contains the GCC 'linking exception' which allows to link any binary
355*4882a593Smuzhiyun   independent of its license against the compiled version of a file marked
356*4882a593Smuzhiyun   with this exception. This is required for creating runnable executables
357*4882a593Smuzhiyun   from source code which is not compatible with the GPL.
358*4882a593Smuzhiyun
359*4882a593Smuzhiyun   _`Exception Metatags`:
360*4882a593Smuzhiyun
361*4882a593Smuzhiyun   The following meta tags must be available in an exception file:
362*4882a593Smuzhiyun
363*4882a593Smuzhiyun   - SPDX-Exception-Identifier:
364*4882a593Smuzhiyun
365*4882a593Smuzhiyun     One exception identifier which can be used with SPDX license
366*4882a593Smuzhiyun     identifiers.
367*4882a593Smuzhiyun
368*4882a593Smuzhiyun   - SPDX-URL:
369*4882a593Smuzhiyun
370*4882a593Smuzhiyun     The URL of the SPDX page which contains additional information related
371*4882a593Smuzhiyun     to the exception.
372*4882a593Smuzhiyun
373*4882a593Smuzhiyun   - SPDX-Licenses:
374*4882a593Smuzhiyun
375*4882a593Smuzhiyun     A comma separated list of SPDX license identifiers for which the
376*4882a593Smuzhiyun     exception can be used.
377*4882a593Smuzhiyun
378*4882a593Smuzhiyun   - Usage-Guidance:
379*4882a593Smuzhiyun
380*4882a593Smuzhiyun     Freeform text for usage advice. The text must be followed by correct
381*4882a593Smuzhiyun     examples for the SPDX license identifiers as they should be put into
382*4882a593Smuzhiyun     source files according to the `License identifier syntax`_ guidelines.
383*4882a593Smuzhiyun
384*4882a593Smuzhiyun   - Exception-Text:
385*4882a593Smuzhiyun
386*4882a593Smuzhiyun     All text after this tag is treated as the original exception text
387*4882a593Smuzhiyun
388*4882a593Smuzhiyun   File format examples::
389*4882a593Smuzhiyun
390*4882a593Smuzhiyun      SPDX-Exception-Identifier: Linux-syscall-note
391*4882a593Smuzhiyun      SPDX-URL: https://spdx.org/licenses/Linux-syscall-note.html
392*4882a593Smuzhiyun      SPDX-Licenses: GPL-2.0, GPL-2.0+, GPL-1.0+, LGPL-2.0, LGPL-2.0+, LGPL-2.1, LGPL-2.1+
393*4882a593Smuzhiyun      Usage-Guidance:
394*4882a593Smuzhiyun        This exception is used together with one of the above SPDX-Licenses
395*4882a593Smuzhiyun	to mark user-space API (uapi) header files so they can be included
396*4882a593Smuzhiyun	into non GPL compliant user-space application code.
397*4882a593Smuzhiyun        To use this exception add it with the keyword WITH to one of the
398*4882a593Smuzhiyun	identifiers in the SPDX-Licenses tag:
399*4882a593Smuzhiyun	  SPDX-License-Identifier: <SPDX-License> WITH Linux-syscall-note
400*4882a593Smuzhiyun      Exception-Text:
401*4882a593Smuzhiyun        Full exception text
402*4882a593Smuzhiyun
403*4882a593Smuzhiyun   ::
404*4882a593Smuzhiyun
405*4882a593Smuzhiyun      SPDX-Exception-Identifier: GCC-exception-2.0
406*4882a593Smuzhiyun      SPDX-URL: https://spdx.org/licenses/GCC-exception-2.0.html
407*4882a593Smuzhiyun      SPDX-Licenses: GPL-2.0, GPL-2.0+
408*4882a593Smuzhiyun      Usage-Guidance:
409*4882a593Smuzhiyun        The "GCC Runtime Library exception 2.0" is used together with one
410*4882a593Smuzhiyun	of the above SPDX-Licenses for code imported from the GCC runtime
411*4882a593Smuzhiyun	library.
412*4882a593Smuzhiyun        To use this exception add it with the keyword WITH to one of the
413*4882a593Smuzhiyun	identifiers in the SPDX-Licenses tag:
414*4882a593Smuzhiyun	  SPDX-License-Identifier: <SPDX-License> WITH GCC-exception-2.0
415*4882a593Smuzhiyun      Exception-Text:
416*4882a593Smuzhiyun        Full exception text
417*4882a593Smuzhiyun
418*4882a593Smuzhiyun
419*4882a593SmuzhiyunAll SPDX license identifiers and exceptions must have a corresponding file
420*4882a593Smuzhiyunin the LICENSES subdirectories. This is required to allow tool
421*4882a593Smuzhiyunverification (e.g. checkpatch.pl) and to have the licenses ready to read
422*4882a593Smuzhiyunand extract right from the source, which is recommended by various FOSS
423*4882a593Smuzhiyunorganizations, e.g. the `FSFE REUSE initiative <https://reuse.software/>`_.
424*4882a593Smuzhiyun
425*4882a593Smuzhiyun_`MODULE_LICENSE`
426*4882a593Smuzhiyun-----------------
427*4882a593Smuzhiyun
428*4882a593Smuzhiyun   Loadable kernel modules also require a MODULE_LICENSE() tag. This tag is
429*4882a593Smuzhiyun   neither a replacement for proper source code license information
430*4882a593Smuzhiyun   (SPDX-License-Identifier) nor in any way relevant for expressing or
431*4882a593Smuzhiyun   determining the exact license under which the source code of the module
432*4882a593Smuzhiyun   is provided.
433*4882a593Smuzhiyun
434*4882a593Smuzhiyun   The sole purpose of this tag is to provide sufficient information
435*4882a593Smuzhiyun   whether the module is free software or proprietary for the kernel
436*4882a593Smuzhiyun   module loader and for user space tools.
437*4882a593Smuzhiyun
438*4882a593Smuzhiyun   The valid license strings for MODULE_LICENSE() are:
439*4882a593Smuzhiyun
440*4882a593Smuzhiyun    ============================= =============================================
441*4882a593Smuzhiyun    "GPL"			  Module is licensed under GPL version 2. This
442*4882a593Smuzhiyun				  does not express any distinction between
443*4882a593Smuzhiyun				  GPL-2.0-only or GPL-2.0-or-later. The exact
444*4882a593Smuzhiyun				  license information can only be determined
445*4882a593Smuzhiyun				  via the license information in the
446*4882a593Smuzhiyun				  corresponding source files.
447*4882a593Smuzhiyun
448*4882a593Smuzhiyun    "GPL v2"			  Same as "GPL". It exists for historic
449*4882a593Smuzhiyun				  reasons.
450*4882a593Smuzhiyun
451*4882a593Smuzhiyun    "GPL and additional rights"   Historical variant of expressing that the
452*4882a593Smuzhiyun				  module source is dual licensed under a
453*4882a593Smuzhiyun				  GPL v2 variant and MIT license. Please do
454*4882a593Smuzhiyun				  not use in new code.
455*4882a593Smuzhiyun
456*4882a593Smuzhiyun    "Dual MIT/GPL"		  The correct way of expressing that the
457*4882a593Smuzhiyun				  module is dual licensed under a GPL v2
458*4882a593Smuzhiyun				  variant or MIT license choice.
459*4882a593Smuzhiyun
460*4882a593Smuzhiyun    "Dual BSD/GPL"		  The module is dual licensed under a GPL v2
461*4882a593Smuzhiyun				  variant or BSD license choice. The exact
462*4882a593Smuzhiyun				  variant of the BSD license can only be
463*4882a593Smuzhiyun				  determined via the license information
464*4882a593Smuzhiyun				  in the corresponding source files.
465*4882a593Smuzhiyun
466*4882a593Smuzhiyun    "Dual MPL/GPL"		  The module is dual licensed under a GPL v2
467*4882a593Smuzhiyun				  variant or Mozilla Public License (MPL)
468*4882a593Smuzhiyun				  choice. The exact variant of the MPL
469*4882a593Smuzhiyun				  license can only be determined via the
470*4882a593Smuzhiyun				  license information in the corresponding
471*4882a593Smuzhiyun				  source files.
472*4882a593Smuzhiyun
473*4882a593Smuzhiyun    "Proprietary"		  The module is under a proprietary license.
474*4882a593Smuzhiyun				  This string is solely for proprietary third
475*4882a593Smuzhiyun				  party modules and cannot be used for modules
476*4882a593Smuzhiyun				  which have their source code in the kernel
477*4882a593Smuzhiyun				  tree. Modules tagged that way are tainting
478*4882a593Smuzhiyun				  the kernel with the 'P' flag when loaded and
479*4882a593Smuzhiyun				  the kernel module loader refuses to link such
480*4882a593Smuzhiyun				  modules against symbols which are exported
481*4882a593Smuzhiyun				  with EXPORT_SYMBOL_GPL().
482*4882a593Smuzhiyun    ============================= =============================================
483*4882a593Smuzhiyun
484*4882a593Smuzhiyun
485*4882a593Smuzhiyun
486