Skip to contentSkip to conversation

wireguard: add SPDX tags

PATCH In review Greg Kroah-Hartman 2 participants 14 messages Nov 30, 2017 – Dec 3, 2017

lore
Share & tools
lore
#0 lore raw

cover wireguard: add SPDX tags

The Linux kernel developers are currently adding the correct SPDX tag to all of the in-tree files. This patch series adds the needed SPDX tags to all of the wireguard kernel files as well as a few others in src/ using the agreeded apon format and style for the different files.

No license was changed in any of these patches, except the last patch.

Note, the last patch in the series does change the license to be maybe what I think you want, but I could be wrong. Please see the changelog text for that patch for what you might want. In any case, only apply it if you really know what you are doing :)

On a side note, the whole "All rights reserved" is cargo-cult crud. As described by a developer who has done more license work than probably anyone else on the kernel mailing list today:
Side note a trailing "All Rights Reserved." in a copyright statement is never needed, even though customarily cargo culted by everyone, including me. Started in 1910, it become fully obsolete in 2000 thanks to Nicaragua [1] signing the Berne convention.
[1] https://en.wikipedia.org/wiki/All_rights_reserved

So you can remove those from the files as well if you want to, but I'll let you do that :)

Greg Kroah-Hartman (6):
src/tools: add SPDX tags to all files
src/selftest: add SPDX tags to all files
src/tests: add SPDX tags to all files
src/crypto: add SPDX tags to all files
src: add SPDX tags to all files
src/uapi/wireguard: add SPDX tag

 src/allowedips.c                              | 1 +
 src/allowedips.h                              | 1 +
 src/cookie.c                                  | 1 +
 src/cookie.h                                  | 1 +
 src/crypto/blake2s-x86_64.S                   | 1 +
 src/crypto/blake2s.c                          | 1 +
 src/crypto/blake2s.h                          | 1 +
 src/crypto/chacha20-arm.S                     | 1 +
 src/crypto/chacha20-arm64.S                   | 1 +
 src/crypto/chacha20-x86_64.S                  | 1 +
 src/crypto/chacha20poly1305.c                 | 1 +
 src/crypto/chacha20poly1305.h                 | 1 +
 src/crypto/curve25519-arm.S                   | 1 +
 src/crypto/curve25519-x86_64.S                | 1 +
 src/crypto/curve25519.c                       | 1 +
 src/crypto/curve25519.h                       | 1 +
 src/crypto/poly1305-arm.S                     | 1 +
 src/crypto/poly1305-arm64.S                   | 1 +
 src/crypto/poly1305-mips64.S                  | 1 +
 src/crypto/poly1305-x86_64.S                  | 1 +
 src/device.c                                  | 1 +
 src/device.h                                  | 1 +
 src/hashtables.c                              | 1 +
 src/hashtables.h                              | 1 +
 src/main.c                                    | 1 +
 src/messages.h                                | 1 +
 src/netlink.c                                 | 1 +
 src/netlink.h                                 | 1 +
 src/noise.c                                   | 1 +
 src/noise.h                                   | 1 +
 src/peer.c                                    | 1 +
 src/peer.h                                    | 1 +
 src/queueing.c                                | 1 +
 src/queueing.h                                | 1 +
 src/ratelimiter.c                             | 1 +
 src/ratelimiter.h                             | 1 +
 src/receive.c                                 | 1 +
 src/selftest/allowedips.h                     | 1 +
 src/selftest/blake2s.h                        | 1 +
 src/selftest/chacha20poly1305.h               | 1 +
 src/selftest/counter.h                        | 1 +
 src/selftest/curve25519.h                     | 1 +
 src/selftest/ratelimiter.h                    | 1 +
 src/send.c                                    | 1 +
 src/socket.c                                  | 1 +
 src/socket.h                                  | 1 +
 src/tests/netns.sh                            | 1 +
 src/tests/qemu/init.c                         | 1 +
 src/timers.c                                  | 1 +
 src/timers.h                                  | 1 +
 src/tools/completion/wg-quick.bash-completion | 1 +
 src/tools/completion/wg.bash-completion       | 1 +
 src/tools/config.c                            | 1 +
 src/tools/config.h                            | 1 +
 src/tools/containers.h                        | 1 +
 src/tools/curve25519.c                        | 1 +
 src/tools/curve25519.h                        | 1 +
 src/tools/encoding.c                          | 1 +
 src/tools/encoding.h                          | 1 +
 src/tools/genkey.c                            | 1 +
 src/tools/ipc.c                               | 1 +
 src/tools/ipc.h                               | 1 +
 src/tools/mnlg.c                              | 1 +
 src/tools/mnlg.h                              | 1 +
 src/tools/pubkey.c                            | 1 +
 src/tools/set.c                               | 1 +
 src/tools/setconf.c                           | 1 +
 src/tools/show.c                              | 1 +
 src/tools/showconf.c                          | 1 +
 src/tools/subcommands.h                       | 1 +
 src/tools/terminal.c                          | 1 +
 src/tools/terminal.h                          | 1 +
 src/tools/wg-quick.bash                       | 1 +
 src/tools/wg.c                                | 1 +
 src/uapi/wireguard.h                          | 1 +
 src/version.h                                 | 1 +
 76 files changed, 76 insertions(+)
Signature · 1 line
2.15.1
#1 lore raw

PATCH 1/6 src/tools: add SPDX tags to all files

It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files.

Update the src/tools/ files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text.

---
 src/tools/completion/wg-quick.bash-completion | 1 +
 src/tools/completion/wg.bash-completion       | 1 +
 src/tools/config.c                            | 1 +
 src/tools/config.h                            | 1 +
 src/tools/containers.h                        | 1 +
 src/tools/curve25519.c                        | 1 +
 src/tools/curve25519.h                        | 1 +
 src/tools/encoding.c                          | 1 +
 src/tools/encoding.h                          | 1 +
 src/tools/genkey.c                            | 1 +
 src/tools/ipc.c                               | 1 +
 src/tools/ipc.h                               | 1 +
 src/tools/mnlg.c                              | 1 +
 src/tools/mnlg.h                              | 1 +
 src/tools/pubkey.c                            | 1 +
 src/tools/set.c                               | 1 +
 src/tools/setconf.c                           | 1 +
 src/tools/show.c                              | 1 +
 src/tools/showconf.c                          | 1 +
 src/tools/subcommands.h                       | 1 +
 src/tools/terminal.c                          | 1 +
 src/tools/terminal.h                          | 1 +
 src/tools/wg-quick.bash                       | 1 +
 src/tools/wg.c                                | 1 +
 24 files changed, 24 insertions(+)
src/tools/completion/wg-quick.bash-completion +1 -0
index b9313236b0c1..a05e60dc4aec 100644
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (C) 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
 
 _wg_quick_completion() {
src/tools/completion/wg.bash-completion +1 -0
index 5401bc332163..090daa0a66f6 100644
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (C) 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
 
 _wg_completion() {
src/tools/config.c +1 -0
index 6ff03767f9e6..312cbcdd7a85 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include <arpa/inet.h>
src/tools/config.h +1 -0
index 63a272cc1285..e3ad9f87404b 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef CONFIG_H
src/tools/containers.h +1 -0
index 31eabea2ce4b..8ccc183f63d5 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 
src/tools/curve25519.c +1 -0
index 71bd09564b5b..98ed4af5ce33 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: (GPL-2.0 OR OpenSSL)
 /* Original author: Adam Langley <[email protected]>
  *
  * Copyright 2008 Google Inc. All Rights Reserved.
src/tools/curve25519.h +1 -0
index 6e651e9f498a..458c5f156ef1 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef CURVE25519_H
src/tools/encoding.c +1 -0
index da5ccef6715e..11ba885e6321 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  *
  * This is a specialized constant-time base64/hex implementation that resists side-channel attacks.
src/tools/encoding.h +1 -0
index 1f79a2a7d1c7..f43a026a9376 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef ENCODING_H
src/tools/genkey.c +1 -0
index 9a6206029470..fee7e0673459 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include <errno.h>
src/tools/ipc.c +1 -0
index a88672fd2eb8..dd226a671947 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifdef __linux__
src/tools/ipc.h +1 -0
index cb660bb121c4..cfba8a79e530 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef IPC_H
src/tools/mnlg.c +1 -0
index 8a2b4cc98e76..7efd40237e19 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  *
  * Original author: Jiri Pirko <[email protected]>
src/tools/mnlg.h +1 -0
index b27a18cca77a..ebfc1ec79a3a 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  *
  * Original author: Jiri Pirko <[email protected]>
src/tools/pubkey.c +1 -0
index 6cced491ae0c..b1e406462a9b 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include <errno.h>
src/tools/set.c +1 -0
index 57a64288fa34..3c895cdd2fb1 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include <stdio.h>
src/tools/setconf.c +1 -0
index 1857ff606cce..e65f5e6e38cb 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include <stddef.h>
src/tools/show.c +1 -0
index ebfdf5b7f406..1a6646f25b83 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include <arpa/inet.h>
src/tools/showconf.c +1 -0
index e780d784b8e7..15e63ec08372 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include <arpa/inet.h>
src/tools/subcommands.h +1 -0
index 7bbf70a58c98..b6dc0a87bbd6 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef SUBCOMMANDS_H
src/tools/terminal.c +1 -0
index 703c75f4cf11..b450889b2dec 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include <ctype.h>
src/tools/terminal.h +1 -0
index 2c1fb3711c02..6b8dea62fe1b 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef TERMINAL_H
src/tools/wg-quick.bash +1 -0
index 42bf26514315..b2acbff041cd 100755
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 #
 # Copyright (C) 2016-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
 #
src/tools/wg.c +1 -0
index 98342719a14f..7a3776874f5d 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include <stddef.h>
Signature · 1 line
2.15.1
#2 lore raw

Re: [PATCH 1/6] src/tools: add SPDX tags to all files

Quoted 15 lines · Greg Kroah-Hartman

It's good to have SPDX identifiers in all files as the Linux kernel

src/tools/config.c +1 -0
index 6ff03767f9e6..312cbcdd7a85 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include <arpa/inet.h>
src/tools/config.h +0 -0
index 63a272cc1285..e3ad9f87404b 100644

src/tools/config.h line 2

Quoted 2 lines
src/tools/config.h +1 -0
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */

It looks like you're giving .h a /* style comment and .c a // style comment. Is there a reason for this, or did you just have two different sed commands by accident?

#3 lore raw

Re: [PATCH 1/6] src/tools: add SPDX tags to all files

Quoted 11 lines · Jason A. Donenfeld
Quoted 9 lines · Greg Kroah-Hartman

It's good to have SPDX identifiers in all files as the Linux kernel

src/tools/config.c +1 -0
index 6ff03767f9e6..312cbcdd7a85 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
Quoted 12 lines

src/tools/config.h line 2

Quoted 8 lines
src/tools/config.c +0 -0
 #include <arpa/inet.h>
src/tools/config.h +1 -0
index 63a272cc1285..e3ad9f87404b 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */

It looks like you're giving .h a /* style comment and .c a // style comment. Is there a reason for this, or did you just have two different sed commands by accident?

zx2c4@thinkpad ~/Projects/linux $ grep -rl '/* SPDX-' | sed 's/.*\/\([^/]\+\)$/\1/;s/.*\.\(.\+\)$/\1/' | sort | uniq -c | sort -nr | head -n 5
7621 h
3671 c
1193 Makefile
486 S
221 dts
zx2c4@thinkpad ~/Projects/linux $ grep -rl '// SPDX-' | sed 's/.*\/\([^/]\+\)$/\1/;s/.*\.\(.\+\)$/\1/' | sort | uniq -c | sort -nr | head -n 5
3655 c
326 h
187 dts
147 dtsi
8 cocci

Doesn't seem like there's much rhyme or reason to it.

#4 lore raw

Re: [PATCH 1/6] src/tools: add SPDX tags to all files

In reply to Jason A. Donenfeld
Quoted 11 lines · Jason A. Donenfeld
Quoted 9 lines · Greg Kroah-Hartman

It's good to have SPDX identifiers in all files as the Linux kernel

src/tools/config.c +1 -0
index 6ff03767f9e6..312cbcdd7a85 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
Quoted 12 lines

src/tools/config.h line 2

Quoted 8 lines
src/tools/config.c +0 -0
 #include <arpa/inet.h>
src/tools/config.h +1 -0
index 63a272cc1285..e3ad9f87404b 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */

It looks like you're giving .h a /* style comment and .c a // style comment. Is there a reason for this, or did you just have two different sed commands by accident?

There's is a reason for it, please see:

	https://lwn.net/Articles/739183/

and the email thread on lkml about this, specifically the email with
this subject:
Subject: [patch V4 01/11] Documentation: Add license-rules.rst to describe how to properly identify file licenses

It goes into why .c files should use // and why .h files should use /* */

thanks,

greg k-h

#5 lore raw

PATCH 2/6 src/selftest: add SPDX tags to all files

In reply to Greg Kroah-Hartman

It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files.

Update the src/selftest/ files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text.

---
 src/selftest/allowedips.h       | 1 +
 src/selftest/blake2s.h          | 1 +
 src/selftest/chacha20poly1305.h | 1 +
 src/selftest/counter.h          | 1 +
 src/selftest/curve25519.h       | 1 +
 src/selftest/ratelimiter.h      | 1 +
 6 files changed, 6 insertions(+)
src/selftest/allowedips.h +1 -0
index 8a568c8e67a2..26d2591d7c6f 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifdef DEBUG
src/selftest/blake2s.h +1 -0
index 94dda274cb85..ae00a24eb232 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifdef DEBUG
src/selftest/chacha20poly1305.h +1 -0
index a9ccd66ae1a3..e9f89d419b8f 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifdef DEBUG
src/selftest/counter.h +1 -0
index 56d6006e01ea..7c0d23af4a7a 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifdef DEBUG
src/selftest/curve25519.h +1 -0
index 17ff57a19570..7772e928dd44 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifdef DEBUG
src/selftest/ratelimiter.h +1 -0
index 202c573b2333..607dc7d0f4e3 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifdef DEBUG
Signature · 1 line
2.15.1
#6 lore raw

PATCH 3/6 src/tests: add SPDX tags to all files

In reply to Greg Kroah-Hartman

It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files.

Update the src/tests/ files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text.

---
 src/tests/netns.sh    | 1 +
 src/tests/qemu/init.c | 1 +
 2 files changed, 2 insertions(+)
src/tests/netns.sh +1 -0
index 8118b024aee3..9296cc7b502c 100755
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 # Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
 
src/tests/qemu/init.c +1 -0
index 8bccf3cb9857..0b8efe277271 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #define _GNU_SOURCE
Signature · 1 line
2.15.1
#7 lore raw

PATCH 4/6 src/crypto: add SPDX tags to all files

In reply to Greg Kroah-Hartman

It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files.

Update the src/crypto/ files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text.

---
 src/crypto/blake2s-x86_64.S    | 1 +
 src/crypto/blake2s.c           | 1 +
 src/crypto/blake2s.h           | 1 +
 src/crypto/chacha20-arm.S      | 1 +
 src/crypto/chacha20-arm64.S    | 1 +
 src/crypto/chacha20-x86_64.S   | 1 +
 src/crypto/chacha20poly1305.c  | 1 +
 src/crypto/chacha20poly1305.h  | 1 +
 src/crypto/curve25519-arm.S    | 1 +
 src/crypto/curve25519-x86_64.S | 1 +
 src/crypto/curve25519.c        | 1 +
 src/crypto/curve25519.h        | 1 +
 src/crypto/poly1305-arm.S      | 1 +
 src/crypto/poly1305-arm64.S    | 1 +
 src/crypto/poly1305-mips64.S   | 1 +
 src/crypto/poly1305-x86_64.S   | 1 +
 16 files changed, 16 insertions(+)
src/crypto/blake2s-x86_64.S +1 -0
index d1e0c0390be7..ba31766d3ce0 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Based on algorithms from Samuel Neves <[email protected]>
src/crypto/blake2s.c +1 -0
index d0a121aaf182..06ce3fc81d45 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Original author: Samuel Neves <[email protected]>
  *
  * Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
src/crypto/blake2s.h +1 -0
index 9ed53ea2f8a8..636ec3dc4996 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_BLAKE2S_H
src/crypto/chacha20-arm.S +1 -0
index 62b7eeb8ea2b..c16bf655285d 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR OpenSSL) */
 /* Copyright 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
  * Redistribution and use in source and binary forms, with or without
src/crypto/chacha20-arm64.S +1 -0
index 6347adba642a..96b7693b4a93 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR OpenSSL) */
 /* Copyright 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
  * Redistribution and use in source and binary forms, with or without
src/crypto/chacha20-x86_64.S +1 -0
index 4a017611e2d8..a9c7d287b3ed 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR OpenSSL) */
 /* Copyright 2017 Samuel Neves <[email protected]>. All Rights Reserved.
  * Copyright 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
src/crypto/chacha20poly1305.c +1 -0
index e795d2f23829..4f3885eae6da 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: (GPL-2.0 OR OpenSSL)
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Copyright 2015 Martin Willi.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
src/crypto/chacha20poly1305.h +1 -0
index 991755de79c8..b654800a9986 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_CHACHA20POLY1305_H
src/crypto/curve25519-arm.S +1 -0
index 165675a6bc1a..8c903bb00325 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Based on algorithms from Daniel J. Bernstein and Peter Schwabe.
src/crypto/curve25519-x86_64.S +1 -0
index 2407ff4ca50d..31c57cf555b7 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Based on algorithms from Tung Chou <[email protected]>
src/crypto/curve25519.c +1 -0
index 6dbd74b51100..ee105e894682 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Original author: Adam Langley <[email protected]>
  *
  * Copyright 2008 Google Inc. All Rights Reserved.
src/crypto/curve25519.h +1 -0
index 800cefadb001..b76acf7ade45 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_CURVE25519_H
src/crypto/poly1305-arm.S +1 -0
index ca2248107e19..2653e864653e 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR OpenSSL) */
 /* Copyright 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
  * Redistribution and use in source and binary forms, with or without
src/crypto/poly1305-arm64.S +1 -0
index 13c7a6bcf120..6a2e0a44ab69 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR OpenSSL) */
 /* Copyright 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
  * Redistribution and use in source and binary forms, with or without
src/crypto/poly1305-mips64.S +1 -0
index 5275a8c067c0..c2619ef60c66 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR OpenSSL) */
 /* Copyright 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
  * Redistribution and use in source and binary forms, with or without
src/crypto/poly1305-x86_64.S +1 -0
index bff1d0e53e55..b0f782fb5b9b 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR OpenSSL) */
 /* Copyright 2017 Samuel Neves <[email protected]>. All Rights Reserved.
  * Copyright 2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
Signature · 1 line
2.15.1
#8 lore raw

PATCH 5/6 src: add SPDX tags to all files

In reply to Greg Kroah-Hartman

It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files.

Update the src/ files with the correct SPDX license identifier based on the license text of the project or based on the license in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text.

---
 src/allowedips.c  | 1 +
 src/allowedips.h  | 1 +
 src/cookie.c      | 1 +
 src/cookie.h      | 1 +
 src/device.c      | 1 +
 src/device.h      | 1 +
 src/hashtables.c  | 1 +
 src/hashtables.h  | 1 +
 src/main.c        | 1 +
 src/messages.h    | 1 +
 src/netlink.c     | 1 +
 src/netlink.h     | 1 +
 src/noise.c       | 1 +
 src/noise.h       | 1 +
 src/peer.c        | 1 +
 src/peer.h        | 1 +
 src/queueing.c    | 1 +
 src/queueing.h    | 1 +
 src/ratelimiter.c | 1 +
 src/ratelimiter.h | 1 +
 src/receive.c     | 1 +
 src/send.c        | 1 +
 src/socket.c      | 1 +
 src/socket.h      | 1 +
 src/timers.c      | 1 +
 src/timers.h      | 1 +
 src/version.h     | 1 +
 27 files changed, 27 insertions(+)
src/allowedips.c +1 -0
index 8ad3291d7380..c20c158a360d 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "allowedips.h"
src/allowedips.h +1 -0
index 53e674bee19f..0d5c5f885913 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_ALLOWEDIPS_H
src/cookie.c +1 -0
index 7dffb8601260..8a75078b30cb 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "cookie.h"
src/cookie.h +1 -0
index e264e354d1c7..61a2a1f60b32 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_COOKIE_H
src/device.c +1 -0
index d5dc93cde8b7..f6be267b90ae 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "queueing.h"
src/device.h +1 -0
index 7b305a3eba1c..bc6e42337c04 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_DEVICE_H
src/hashtables.c +1 -0
index 8d61f4c8a740..8554d3f4fb95 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "hashtables.h"
src/hashtables.h +1 -0
index 55f608a908dc..d5f5826ca68c 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_HASHTABLES_H
src/main.c +1 -0
index fea8c652e6e1..249ea5b01bf9 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "version.h"
src/messages.h +1 -0
index 927b487043bf..6a183d279b00 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  *
src/netlink.c +1 -0
index 7faaa1a74d3c..7a5951438b54 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "netlink.h"
src/netlink.h +1 -0
index 750b87452542..fdda823e7161 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_NETLINK_H
src/noise.c +1 -0
index 9d99bfa3cd12..8587027d4e67 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "noise.h"
src/noise.h +1 -0
index 01026a4aee3b..6754d3b8d14f 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  *
src/peer.c +1 -0
index 78ba5b0eb08b..24338d5185a1 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "peer.h"
src/peer.h +1 -0
index 1e3c1ae8bf86..db4671e3351a 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_PEER_H
src/queueing.c +1 -0
index bce406adce69..fb52bfcba0e5 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "queueing.h"
src/queueing.h +1 -0
index a385d67f1b86..b84dd83883bf 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_QUEUEING_H
src/ratelimiter.c +1 -0
index 8a73dd170e0b..5eb7ddb05b93 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "ratelimiter.h"
src/ratelimiter.h +1 -0
index d2fcb64a90fb..1cb264e65e17 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_RATELIMITER_H
src/receive.c +1 -0
index 080f6ba39178..62b5ad45c897 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "queueing.h"
src/send.c +1 -0
index 180d90988f60..6056dc1abd8f 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "queueing.h"
src/socket.c +1 -0
index 5bf5a9220429..f39653780e26 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "device.h"
src/socket.h +1 -0
index 161bd0b0f9f9..c3483b4dda77 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_SOCKET_H
src/timers.c +1 -0
index 5f2570f7f51a..6b453f4fa02f 100644
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #include "timers.h"
src/timers.h +1 -0
index 105193edca50..465fcbed4002 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved. */
 
 #ifndef _WG_TIMERS_H
src/version.h +1 -0
index 8ed54477cdfc..da18820bf3b2 100644
@@ -1 +1,2 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 #define WIREGUARD_VERSION "0.0.20171127"
Signature · 1 line
2.15.1
#9 lore raw

PATCH 6/6 src/uapi/wireguard: add SPDX tag

In reply to Greg Kroah-Hartman

It's good to have SPDX identifiers in all files as the Linux kernel developers are working to add these identifiers to all files.

Update the wireguard.h file with the currently convential GPL2+userspace exception tag.

Note, this is a different license than what the text itself says in the file, if you wish to stick with the MIT license for this file, that's fine, but then it should be listed as:
((GPL-2.0 WITH Linux-syscall-note) OR MIT)

---
 src/uapi/wireguard.h | 1 +
 1 file changed, 1 insertion(+)
src/uapi/wireguard.h +1 -0
index 411d5a462f0e..37e2e7bf1402 100644
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <[email protected]>. All Rights Reserved.
  *
  * The following MIT license applies only to this file:
Signature · 1 line
2.15.1
#10 lore raw

Re: [PATCH 6/6] src/uapi/wireguard: add SPDX tag

Quoted 7 lines · Greg Kroah-Hartman

Update the wireguard.h file with the currently convential GPL2+userspace exception tag.

Note, this is a different license than what the text itself says in the file, if you wish to stick with the MIT license for this file, that's fine, but then it should be listed as:
((GPL-2.0 WITH Linux-syscall-note) OR MIT)

I'd prefer doing only "GPL-2.0 WITH Linux-syscall-note", since it's more uniform, but I don't know if it covers a particular use use case:

I expect for many projects to wholesale copy and paste this file into their own projects, and those projects might not be GPL-friendly. Does the Linux-syscall-note allow for that? Or should I stick with GPL-2.0||MIT for the avoidance of doubt?

In terms of "intellectual property", the file itself is extremely boring, just defining some enums.

Jason

#11 lore raw

Re: [PATCH 6/6] src/uapi/wireguard: add SPDX tag

Quoted 10 lines · Jason A. Donenfeld
Quoted 7 lines · Greg Kroah-Hartman

Update the wireguard.h file with the currently convential GPL2+userspace exception tag.

Note, this is a different license than what the text itself says in the file, if you wish to stick with the MIT license for this file, that's fine, but then it should be listed as:
((GPL-2.0 WITH Linux-syscall-note) OR MIT)

Quoted 7 lines

I'd prefer doing only "GPL-2.0 WITH Linux-syscall-note", since it's more uniform, but I don't know if it covers a particular use use case:

I expect for many projects to wholesale copy and paste this file into their own projects, and those projects might not be GPL-friendly. Does the Linux-syscall-note allow for that? Or should I stick with GPL-2.0||MIT for the avoidance of doubt?

I think if you want others to be able to copy the file into different projects without any doubt at all, stick to:
((GPL-2.0 WITH Linux-syscall-note) OR MIT)
as that covers everything.

Quoted 2 lines

In terms of "intellectual property", the file itself is extremely boring, just defining some enums.

I'm not going to get into the argument of what is, and is not, a copyrightable work :)

But to be safe, put this on the top so that everyone knows your intention, which is the most important thing of all, as intent matters a lot to companies and to courts.

thanks,

greg k-h

#12 lore raw
In reply to Greg Kroah-Hartman

Hey Greg,

Thanks for the patch set. I'll review and possibly merge if no pressing concerns.

Quoted 5 lines · Greg Kroah-Hartman

On a side note, the whole "All rights reserved" is cargo-cult crud. As described by a developer who has done more license work than probably anyone else on the kernel mailing list today:
So you can remove those from the files as well if you want to, but I'll let you do that :)

I've been told a million different things about this from a million different "experts", and now I don't know what to believe, so for now I'm just taking the path of least resistance and keeping it "just in case." It's kind of like when you build a kernel and have no idea what you're doing, you just enable everything and hope for the best... At some point I'll talk to a real lawyer -- not a slashdot lawyer -- and get some clarification and make deliberate decisions. For now we're stuck on allyesconfig.

Jason

#13 lore raw

Hi Greg,

Thanks again for the series. I've merged it squashed together with a few small changes. WireGuard is now SPDX-compliant!

Jason