hc
2024-10-12 a5969cabbb4660eab42b6ef0412cbbd1200cf14d
kernel/Documentation/process/license-rules.rst
....@@ -1,5 +1,7 @@
11 .. SPDX-License-Identifier: GPL-2.0
22
3
+.. _kernel_licensing:
4
+
35 Linux kernel licensing rules
46 ============================
57
....@@ -60,7 +62,7 @@
6062
6163 The SPDX license identifier in kernel files shall be added at the first
6264 possible line in a file which can contain a comment. For the majority
63
- or files this is the first line, except for scripts which require the
65
+ of files this is the first line, except for scripts which require the
6466 '#!PATH_TO_INTERPRETER' in the first line. For those scripts the SPDX
6567 identifier goes into the second line.
6668
....@@ -232,13 +234,13 @@
232234
233235 |
234236
235
-2. Not recommended licenses:
237
+2. Deprecated licenses:
236238
237239 These licenses should only be used for existing code or for importing
238240 code from a different project. These licenses are available from the
239241 directory::
240242
241
- LICENSES/other/
243
+ LICENSES/deprecated/
242244
243245 in the kernel source tree.
244246
....@@ -248,14 +250,14 @@
248250
249251 Examples::
250252
251
- LICENSES/other/ISC
253
+ LICENSES/deprecated/ISC
252254
253255 Contains the Internet Systems Consortium license text and the required
254256 metatags::
255257
256
- LICENSES/other/ZLib
258
+ LICENSES/deprecated/GPL-1.0
257259
258
- Contains the ZLIB license text and the required metatags.
260
+ Contains the GPL version 1 license text and the required metatags.
259261
260262 Metatags:
261263
....@@ -279,7 +281,56 @@
279281
280282 |
281283
282
-3. _`Exceptions`:
284
+3. Dual Licensing Only
285
+
286
+ These licenses should only be used to dual license code with another
287
+ license in addition to a preferred license. These licenses are available
288
+ from the directory::
289
+
290
+ LICENSES/dual/
291
+
292
+ in the kernel source tree.
293
+
294
+ The files in this directory contain the full license text and
295
+ `Metatags`_. The file names are identical to the SPDX license
296
+ identifier which shall be used for the license in source files.
297
+
298
+ Examples::
299
+
300
+ LICENSES/dual/MPL-1.1
301
+
302
+ Contains the Mozilla Public License version 1.1 license text and the
303
+ required metatags::
304
+
305
+ LICENSES/dual/Apache-2.0
306
+
307
+ Contains the Apache License version 2.0 license text and the required
308
+ metatags.
309
+
310
+ Metatags:
311
+
312
+ The metatag requirements for 'other' licenses are identical to the
313
+ requirements of the `Preferred licenses`_.
314
+
315
+ File format example::
316
+
317
+ Valid-License-Identifier: MPL-1.1
318
+ SPDX-URL: https://spdx.org/licenses/MPL-1.1.html
319
+ Usage-Guide:
320
+ Do NOT use. The MPL-1.1 is not GPL2 compatible. It may only be used for
321
+ dual-licensed files where the other license is GPL2 compatible.
322
+ If you end up using this it MUST be used together with a GPL2 compatible
323
+ license using "OR".
324
+ To use the Mozilla Public License version 1.1 put the following SPDX
325
+ tag/value pair into a comment according to the placement guidelines in
326
+ the licensing rules documentation:
327
+ SPDX-License-Identifier: MPL-1.1
328
+ License-Text:
329
+ Full license text
330
+
331
+|
332
+
333
+4. _`Exceptions`:
283334
284335 Some licenses can be amended with exceptions which grant certain rights
285336 which the original license does not. These exceptions are available
....@@ -366,7 +417,69 @@
366417
367418
368419 All SPDX license identifiers and exceptions must have a corresponding file
369
-in the LICENSE subdirectories. This is required to allow tool
420
+in the LICENSES subdirectories. This is required to allow tool
370421 verification (e.g. checkpatch.pl) and to have the licenses ready to read
371422 and extract right from the source, which is recommended by various FOSS
372423 organizations, e.g. the `FSFE REUSE initiative <https://reuse.software/>`_.
424
+
425
+_`MODULE_LICENSE`
426
+-----------------
427
+
428
+ Loadable kernel modules also require a MODULE_LICENSE() tag. This tag is
429
+ neither a replacement for proper source code license information
430
+ (SPDX-License-Identifier) nor in any way relevant for expressing or
431
+ determining the exact license under which the source code of the module
432
+ is provided.
433
+
434
+ The sole purpose of this tag is to provide sufficient information
435
+ whether the module is free software or proprietary for the kernel
436
+ module loader and for user space tools.
437
+
438
+ The valid license strings for MODULE_LICENSE() are:
439
+
440
+ ============================= =============================================
441
+ "GPL" Module is licensed under GPL version 2. This
442
+ does not express any distinction between
443
+ GPL-2.0-only or GPL-2.0-or-later. The exact
444
+ license information can only be determined
445
+ via the license information in the
446
+ corresponding source files.
447
+
448
+ "GPL v2" Same as "GPL". It exists for historic
449
+ reasons.
450
+
451
+ "GPL and additional rights" Historical variant of expressing that the
452
+ module source is dual licensed under a
453
+ GPL v2 variant and MIT license. Please do
454
+ not use in new code.
455
+
456
+ "Dual MIT/GPL" The correct way of expressing that the
457
+ module is dual licensed under a GPL v2
458
+ variant or MIT license choice.
459
+
460
+ "Dual BSD/GPL" The module is dual licensed under a GPL v2
461
+ variant or BSD license choice. The exact
462
+ variant of the BSD license can only be
463
+ determined via the license information
464
+ in the corresponding source files.
465
+
466
+ "Dual MPL/GPL" The module is dual licensed under a GPL v2
467
+ variant or Mozilla Public License (MPL)
468
+ choice. The exact variant of the MPL
469
+ license can only be determined via the
470
+ license information in the corresponding
471
+ source files.
472
+
473
+ "Proprietary" The module is under a proprietary license.
474
+ This string is solely for proprietary third
475
+ party modules and cannot be used for modules
476
+ which have their source code in the kernel
477
+ tree. Modules tagged that way are tainting
478
+ the kernel with the 'P' flag when loaded and
479
+ the kernel module loader refuses to link such
480
+ modules against symbols which are exported
481
+ with EXPORT_SYMBOL_GPL().
482
+ ============================= =============================================
483
+
484
+
485
+