Re: [PATCH] remove CONFIG_ANDROID

2022-06-29 Thread Greg Kroah-Hartman
On Wed, Jun 29, 2022 at 07:10:43PM +0200, Jason A. Donenfeld wrote:
> On Wed, Jun 29, 2022 at 07:00:25PM +0200, Greg Kroah-Hartman wrote:
> > I think that by the time the next kernel release comes out, and
> > percolates to a real Android device, the years gone by will have caused
> > those who care about this to fix it.
> 
> You assume that there aren't Android devices using kernels outside of
> the ones you're referring to. That's a rather Google-centric
> perspective. It's still breakage, even if Google has the ability to fix
> it locally after "years gone by". If you want Android things to be
> upstream, this is the way you must think about it; otherwise, what's the
> point? By your logic, upstream should probably remove the Android code
> everywhere and let Google handle it downstream. Except nobody wants
> that; we want Android upstream. So let's keep it working upstream, not
> intentionally break it.

I would be totally and completly amazed if there are any Android kernels
in real devices in the world that are not at the very least, based on
LTS releases.  But maybe there is, this patch series isn't going to land
until 5.20, and by then, I think the "define behavior, not hardware" fix
for random and wg will be properly resolved :)

> > In the meantime, this might actually fix issues in desktop distros that
> > were enabling this option, thinking it only affected the building of a
> > driver
> 
> That sounds like a false dichotomy. It's not about "fix Android" vs "fix
> distros". What I'm suggesting is fixing Android AND fixing distros, by
> looking at the problem holistically. Trading a bad problem on Android
> (wg connections are broken) for a manageable problem on distros (something
> something theoretical warm boot attack something) doesn't sound like a
> nice trade off. Let's instead get this all fixed at the same time.

Agreed, so what should we use instead in the wg code?  What userspace
functionality are you trying to trigger off of here in the current
CONFIG_ANDROID check?

The RCU stuff is already handled as Paul has stated, so that's not an
issue.

thanks,

greg k-h


Re: [PATCH] remove CONFIG_ANDROID

2022-06-29 Thread Greg Kroah-Hartman
On Wed, Jun 29, 2022 at 06:52:08PM +0200, Jason A. Donenfeld wrote:
> On Wed, Jun 29, 2022 at 6:45 PM Christoph Hellwig  wrote:
> >
> > On Wed, Jun 29, 2022 at 06:38:09PM +0200, Jason A. Donenfeld wrote:
> > > On the technical topic, an Android developer friend following this
> > > thread just pointed out to me that Android doesn't use PM_AUTOSLEEP and
> > > just has userspace causing suspend frequently. So by his rough
> > > estimation your patch actually *will* break Android devices. Zoinks.
> > > Maybe he's right, maybe he's not -- I don't know -- but you should
> > > probably look into this if you want this patch to land without breakage.
> >
> > And it will also "break" anyone else doing frequent suspends from
> > userspace, as that behavior is still in no way related to
> > CONFIG_ANDROID.
> 
> I don't know of any actual systems that do this for which
> CONFIG_PM_AUTOSLEEP and CONFIG_ANDROID are both disabled. At least
> that was what I concluded back in 2017-2018 when I looked at this
> last. And so far, no other-handset-users have reported bugs.
> 
> But of course I agree that this all could be improved with something
> more granular somehow, somewhere. I don't really have any developed
> opinions on what that looks like or what form that should take.
> 
> However, the thing I do have a strong opinion on is that the change
> you're proposing shouldn't break things. And that's what your patch
> currently might do (or not!).

I think that by the time the next kernel release comes out, and
percolates to a real Android device, the years gone by will have caused
those who care about this to fix it.

In the meantime, this might actually fix issues in desktop distros that
were enabling this option, thinking it only affected the building of a
driver, not core power management functionality.

So it's nothing to worry about now, I agree with Christoph, this config
option should not be used for power management policy decisions like
this.  This should be controlled by userspace properly in the Android
userspace framework, like all other Linux distros/systems do this.

And worst case, Android kernels sometimes _do_ have a not-upstream
config option that you can use to trigger off of horrible hacks like
this.  I'll leave the answer to what that is as an exercise for the
reader :)

thanks,

greg k-h


Re: [PATCH] remove CONFIG_ANDROID

2022-06-29 Thread Greg Kroah-Hartman
On Wed, Jun 29, 2022 at 05:01:02PM +0200, Christoph Hellwig wrote:
> The ANDROID config symbol is only used to guard the binder config
> symbol and to inject completely random config changes.  Remove it
> as it is obviously a bad idea.

Ick, rcu and random driver changes?  That's not ok, I'll go queue this
up, if Android devices need to make these core changes, they can do that
in their kernel or submit a patch that makes sense for everyone.

Also, one meta-comment:

>  kernel/configs/android-base.config  | 1 -

This whole file can be deleted now, with the way Android kernels are now
being managed it makes no sense anymore.  I'll write up a patch to do
that later tonight.

thanks,

greg k-h


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

2017-12-01 Thread Greg Kroah-Hartman
On Thu, Nov 30, 2017 at 07:02:24PM +0100, Jason A. Donenfeld wrote:
> On Thu, Nov 30, 2017 at 4:23 PM, Greg Kroah-Hartman
> <gre...@linuxfoundation.org> wrote:
> > 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?

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.

> 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
___
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard


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

2017-12-01 Thread Greg Kroah-Hartman
On Thu, Nov 30, 2017 at 06:57:20PM +0100, Jason A. Donenfeld wrote:
> On Thu, Nov 30, 2017 at 4:23 PM, Greg Kroah-Hartman
> <gre...@linuxfoundation.org> wrote:
> > It's good to have SPDX identifiers in all files as the Linux kernel
> > diff --git a/src/tools/config.c b/src/tools/config.c
> > index 6ff03767f9e6..312cbcdd7a85 100644
> > --- a/src/tools/config.c
> > +++ b/src/tools/config.c
> > @@ -1,3 +1,4 @@
> > +// SPDX-License-Identifier: GPL-2.0
> >  /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All 
> > Rights Reserved. */
> >
> >  #include 
> > diff --git a/src/tools/config.h b/src/tools/config.h
> > index 63a272cc1285..e3ad9f87404b 100644
> > --- a/src/tools/config.h
> > +++ b/src/tools/config.h
> > @@ -1,3 +1,4 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> >  /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. 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
___
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard


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

2017-11-30 Thread 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/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.

Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 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(+)

diff --git a/src/tools/completion/wg-quick.bash-completion 
b/src/tools/completion/wg-quick.bash-completion
index b9313236b0c1..a05e60dc4aec 100644
--- a/src/tools/completion/wg-quick.bash-completion
+++ b/src/tools/completion/wg-quick.bash-completion
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (C) 2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights Reserved.
 
 _wg_quick_completion() {
diff --git a/src/tools/completion/wg.bash-completion 
b/src/tools/completion/wg.bash-completion
index 5401bc332163..090daa0a66f6 100644
--- a/src/tools/completion/wg.bash-completion
+++ b/src/tools/completion/wg.bash-completion
@@ -1,3 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
 # Copyright (C) 2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights Reserved.
 
 _wg_completion() {
diff --git a/src/tools/config.c b/src/tools/config.c
index 6ff03767f9e6..312cbcdd7a85 100644
--- a/src/tools/config.c
+++ b/src/tools/config.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #include 
diff --git a/src/tools/config.h b/src/tools/config.h
index 63a272cc1285..e3ad9f87404b 100644
--- a/src/tools/config.h
+++ b/src/tools/config.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #ifndef CONFIG_H
diff --git a/src/tools/containers.h b/src/tools/containers.h
index 31eabea2ce4b..8ccc183f63d5 100644
--- a/src/tools/containers.h
+++ b/src/tools/containers.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 
diff --git a/src/tools/curve25519.c b/src/tools/curve25519.c
index 71bd09564b5b..98ed4af5ce33 100644
--- a/src/tools/curve25519.c
+++ b/src/tools/curve25519.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: (GPL-2.0 OR OpenSSL)
 /* Original author: Adam Langley <a...@imperialviolet.org>
  *
  * Copyright 2008 Google Inc. All Rights Reserved.
diff --git a/src/tools/curve25519.h b/src/tools/curve25519.h
index 6e651e9f498a..458c5f156ef1 100644
--- a/src/tools/curve25519.h
+++ b/src/tools/curve25519.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #ifndef CURVE25519_H
diff --git a/src/tools/encoding.c b/src/tools/encoding.c
index da5ccef6715e..11ba885e6321 100644
--- a/src/tools/encoding.c
+++ b/src/tools/encoding.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved.
  *
  * This is a specialized constant-time base64/hex implementation that resists 
side-channel attacks.
diff --git a/src/tools/encoding.h b/src/tools/encoding.h
index 1f79a2a7d1c7..f43a026a9376 100644
--- a/src/tools/encoding.h
+++ b/src/tools/encoding.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #ifndef ENCODING_H
diff --git a/src/tools/genkey.c b/src/tools/genkey.c
inde

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

2017-11-30 Thread 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)

Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 src/uapi/wireguard.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/uapi/wireguard.h b/src/uapi/wireguard.h
index 411d5a462f0e..37e2e7bf1402 100644
--- a/src/uapi/wireguard.h
+++ b/src/uapi/wireguard.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved.
  *
  * The following MIT license applies only to this file:
-- 
2.15.1

___
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard


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

2017-11-30 Thread 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.

Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 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(+)

diff --git a/src/allowedips.c b/src/allowedips.c
index 8ad3291d7380..c20c158a360d 100644
--- a/src/allowedips.c
+++ b/src/allowedips.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #include "allowedips.h"
diff --git a/src/allowedips.h b/src/allowedips.h
index 53e674bee19f..0d5c5f885913 100644
--- a/src/allowedips.h
+++ b/src/allowedips.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #ifndef _WG_ALLOWEDIPS_H
diff --git a/src/cookie.c b/src/cookie.c
index 7dffb8601260..8a75078b30cb 100644
--- a/src/cookie.c
+++ b/src/cookie.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #include "cookie.h"
diff --git a/src/cookie.h b/src/cookie.h
index e264e354d1c7..61a2a1f60b32 100644
--- a/src/cookie.h
+++ b/src/cookie.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #ifndef _WG_COOKIE_H
diff --git a/src/device.c b/src/device.c
index d5dc93cde8b7..f6be267b90ae 100644
--- a/src/device.c
+++ b/src/device.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #include "queueing.h"
diff --git a/src/device.h b/src/device.h
index 7b305a3eba1c..bc6e42337c04 100644
--- a/src/device.h
+++ b/src/device.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #ifndef _WG_DEVICE_H
diff --git a/src/hashtables.c b/src/hashtables.c
index 8d61f4c8a740..8554d3f4fb95 100644
--- a/src/hashtables.c
+++ b/src/hashtables.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #include "hashtables.h"
diff --git a/src/hashtables.h b/src/hashtables.h
index 55f608a908dc..d5f5826ca68c 100644
--- a/src/hashtables.h
+++ b/src/hashtables.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #ifndef _WG_HASHTABLES_H
diff --git a/src/main.c b/src/main.c
index fea8c652e6e1..249ea5b01bf9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #include "version.h"
diff --git a/src/messages.h b/src/messages.h
index 927b487043bf..6a183d279b00 100644
--- a/src/messages.h
+++ b/src/messages.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved.
  *
diff --git a/src/netlink.c b/src/netlink.c
index 7faaa1a74d3c..7a5951438b54 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #include "netlink.h"
diff --git a/src/netlink.h b/src/netlink.h
index 750b87452542..fdda823e7161 100644
--- a/src/netlink.h
+++ b/src/netlink.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #ifndef _WG_NETLINK_H
diff --git a/src/noise.c b/src/noise.c
index 9d99bfa3cd12..8587027d4e67 100644
--- a/src/noise.c
+++ b/src/noise.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier:

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

2017-11-30 Thread 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.

Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 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(+)

diff --git a/src/crypto/blake2s-x86_64.S b/src/crypto/blake2s-x86_64.S
index d1e0c0390be7..ba31766d3ce0 100644
--- a/src/crypto/blake2s-x86_64.S
+++ b/src/crypto/blake2s-x86_64.S
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved.
  * Based on algorithms from Samuel Neves <sne...@dei.uc.pt>
diff --git a/src/crypto/blake2s.c b/src/crypto/blake2s.c
index d0a121aaf182..06ce3fc81d45 100644
--- a/src/crypto/blake2s.c
+++ b/src/crypto/blake2s.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
 /* Original author: Samuel Neves <sne...@dei.uc.pt>
  *
  * Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved.
diff --git a/src/crypto/blake2s.h b/src/crypto/blake2s.h
index 9ed53ea2f8a8..636ec3dc4996 100644
--- a/src/crypto/blake2s.h
+++ b/src/crypto/blake2s.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #ifndef _WG_BLAKE2S_H
diff --git a/src/crypto/chacha20-arm.S b/src/crypto/chacha20-arm.S
index 62b7eeb8ea2b..c16bf655285d 100644
--- a/src/crypto/chacha20-arm.S
+++ b/src/crypto/chacha20-arm.S
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR OpenSSL) */
 /* Copyright 2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights Reserved.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
  * Redistribution and use in source and binary forms, with or without
diff --git a/src/crypto/chacha20-arm64.S b/src/crypto/chacha20-arm64.S
index 6347adba642a..96b7693b4a93 100644
--- a/src/crypto/chacha20-arm64.S
+++ b/src/crypto/chacha20-arm64.S
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR OpenSSL) */
 /* Copyright 2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights Reserved.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
  * Redistribution and use in source and binary forms, with or without
diff --git a/src/crypto/chacha20-x86_64.S b/src/crypto/chacha20-x86_64.S
index 4a017611e2d8..a9c7d287b3ed 100644
--- a/src/crypto/chacha20-x86_64.S
+++ b/src/crypto/chacha20-x86_64.S
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: (GPL-2.0 OR OpenSSL) */
 /* Copyright 2017 Samuel Neves <sne...@dei.uc.pt>. All Rights Reserved.
  * Copyright 2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights Reserved.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
diff --git a/src/crypto/chacha20poly1305.c b/src/crypto/chacha20poly1305.c
index e795d2f23829..4f3885eae6da 100644
--- a/src/crypto/chacha20poly1305.c
+++ b/src/crypto/chacha20poly1305.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: (GPL-2.0 OR OpenSSL)
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved.
  * Copyright 2015 Martin Willi.
  * Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
diff --git a/src/crypto/chacha20poly1305.h b/src/crypto/chacha20poly1305.h
index 991755de79c8..b654800a9986 100644
--- a/src/crypto/chacha20poly1305.h
+++ b/src/crypto/chacha20poly1305.h
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #ifndef _WG_CHACHA20POLY1305_H
diff --git a/src/crypto/curve25519-arm.S b/src/crypto/curve25519-arm.S
index 165675a6bc1a..8c903bb00325 100644
--- a/src/crypto/curve25519-arm.S
+++ b/src/crypto/curve25519-arm.S
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /*
  * Copyright (C) 2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved.
  * Based on algorithms from Daniel J. Bernstein and Peter Schwabe.
diff --git a/src/crypto/curve25519-x86_64.S b/src/crypto/curve25519-x86_64.S
index 2407ff4ca50d..31c57cf555b7 100644
--- a/src/crypto/curve25519-x86_64.S
++

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

2017-11-30 Thread 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.

Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>
---
 src/tests/netns.sh| 1 +
 src/tests/qemu/init.c | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/tests/netns.sh b/src/tests/netns.sh
index 8118b024aee3..9296cc7b502c 100755
--- a/src/tests/netns.sh
+++ b/src/tests/netns.sh
@@ -1,4 +1,5 @@
 #!/bin/bash
+# SPDX-License-Identifier: GPL-2.0
 
 # Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved.
 
diff --git a/src/tests/qemu/init.c b/src/tests/qemu/init.c
index 8bccf3cb9857..0b8efe277271 100644
--- a/src/tests/qemu/init.c
+++ b/src/tests/qemu/init.c
@@ -1,3 +1,4 @@
+/* SPDX-License-Identifier: GPL-2.0 */
 /* Copyright (C) 2015-2017 Jason A. Donenfeld <ja...@zx2c4.com>. All Rights 
Reserved. */
 
 #define _GNU_SOURCE
-- 
2.15.1

___
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard


[PATCH 0/6] wireguard: add SPDX tags

2017-11-30 Thread Greg Kroah-Hartman
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| 

[PATCH] Kconfig: remove trailing whitespace

2017-11-01 Thread Greg Kroah-Hartman
Git complains when applying this Kconfig file as part of a patch to the
kernel tree, so drop the trailing whitespace.

Signed-off-by: Greg Kroah-Hartman <gre...@linuxfoundation.org>

diff --git a/src/Kconfig b/src/Kconfig
index 811d1e230531..4385995d61c5 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -26,5 +26,5 @@ config WIREGUARD_DEBUG
  that occur for a WireGuard interface. It will also perform some
  extra validation checks and unit tests at various points. This is
  only useful for debugging.
- 
+
  Say N here unless you know what you're doing.
___
WireGuard mailing list
WireGuard@lists.zx2c4.com
https://lists.zx2c4.com/mailman/listinfo/wireguard