2023-06-07 05:40:54

by Bagas Sanjaya

[permalink] [raw]
Subject: [PATCH 0/8] SPDX conversion for cryptographic algorithms

I prompted to create this series when reviewing trivial,
checkpatch-fixing patches from Franziska Naepelt [1]. When
reviewing crypto ones and looking on SPDX changes, I felt that
these could be better sent as separate patch series covering
whole crypto/ directory instead. So here is the series and
happy reviewing!

[1]: https://lore.kernel.org/all/?q=f%3A%22bagasdotme%40gmail.com%22+AND+tc%3A%22Franziska+Naepelt+%3Cfranziska.naepelt%40googlemail.com%3E%22

Bagas Sanjaya (8):
crypto: Convert dual BSD 3-Clause/GPL 2.0 boilerplate to SPDX
identifier
crypto: fcrypt: Replace dual BSD 3-Clause/GPL 2.0+ boilerplate with
SPDX identifier
crypto: drbg: Convert dual BSD 3-Clause/GPL-1.0 license boilerplate to
SPDX identifier
crypto: ecc: Replace BSD 2-Clause license boilerplate with SPDX
identifier
crypto: streebog_generic: Correct SPDX license identifier
crypto: Replace GPL 2.0 boilerplate with SPDX license identifier
crypto: ecrdsa: Remove GPL 2.0+ boilerplate
crypto: cts: Convert MIT boilerplate to corresponding SPDX license
identifier

crypto/aes_generic.c | 31 +------------------------------
crypto/algif_rng.c | 33 +--------------------------------
crypto/anubis.c | 6 +-----
crypto/crct10dif_common.c | 15 +--------------
crypto/crct10dif_generic.c | 15 +--------------
crypto/cts.c | 24 +-----------------------
crypto/drbg.c | 33 +--------------------------------
crypto/ecc.c | 21 +--------------------
crypto/ecrdsa.c | 4 ----
crypto/ecrdsa_defs.h | 4 ----
crypto/fcrypt.c | 32 +-------------------------------
crypto/jitterentropy-kcapi.c | 32 +-------------------------------
crypto/jitterentropy.c | 35 +----------------------------------
crypto/keywrap.c | 32 +-------------------------------
crypto/khazad.c | 6 +-----
crypto/md4.c | 6 +-----
crypto/md5.c | 6 +-----
crypto/poly1305_generic.c | 5 +----
crypto/streebog_generic.c | 6 +-----
crypto/vmac.c | 13 +------------
crypto/wp512.c | 6 +-----
21 files changed, 19 insertions(+), 346 deletions(-)


base-commit: 134e0dc6b73ab7e99464182356a8b3fa4ea3b499
--
An old man doll... just what I always wanted! - Clara



2023-06-07 05:40:58

by Bagas Sanjaya

[permalink] [raw]
Subject: [PATCH 4/8] crypto: ecc: Replace BSD 2-Clause license boilerplate with SPDX identifier

Convert boilerplate text for BSD 2-Clause to corresponding SPDX license
identifier.

Cc: Vitaly Chikunov <[email protected]>
Cc: Salvatore Benedetto <[email protected]>
Signed-off-by: Bagas Sanjaya <[email protected]>
---
crypto/ecc.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)

diff --git a/crypto/ecc.c b/crypto/ecc.c
index f53fb4d6af992b..9d86db24ca748c 100644
--- a/crypto/ecc.c
+++ b/crypto/ecc.c
@@ -1,27 +1,8 @@
+// SPDX-License-Identifier: BSD-2-Clause
/*
* Copyright (c) 2013, 2014 Kenneth MacKay. All rights reserved.
* Copyright (c) 2019 Vitaly Chikunov <[email protected]>
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#include <crypto/ecc_curve.h>
--
An old man doll... just what I always wanted! - Clara


2023-06-07 05:40:58

by Bagas Sanjaya

[permalink] [raw]
Subject: [PATCH 2/8] crypto: fcrypt: Replace dual BSD 3-Clause/GPL 2.0+ boilerplate with SPDX identifier

fcrypt implementation (crypto/fcrypt.c) have license boilerplate
for GPL 2.0+ (as implemented in the kernel) and BSD 3-Clause
(from original Royal Institute of Technology code). Replace the
boilerplate text with corresponding SPDX license tag. As there
is no wording that allows using either license alternatively,
use AND operator.

Cc: David Howells <[email protected]>
Signed-off-by: Bagas Sanjaya <[email protected]>
---
crypto/fcrypt.c | 32 +-------------------------------
1 file changed, 1 insertion(+), 31 deletions(-)

diff --git a/crypto/fcrypt.c b/crypto/fcrypt.c
index 95a16e88899baf..ecbd29d0deba6b 100644
--- a/crypto/fcrypt.c
+++ b/crypto/fcrypt.c
@@ -1,45 +1,15 @@
+// SPDX-License-Identifier: BSD-3-Clause AND GPL-2.0-or-later
/* FCrypt encryption algorithm
*
* Copyright (C) 2006 Red Hat, Inc. All Rights Reserved.
* Written by David Howells ([email protected])
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version
- * 2 of the License, or (at your option) any later version.
- *
* Based on code:
*
* Copyright (c) 1995 - 2000 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- *
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * 3. Neither the name of the Institute nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
*/

#include <asm/byteorder.h>
--
An old man doll... just what I always wanted! - Clara


2023-06-07 05:41:00

by Bagas Sanjaya

[permalink] [raw]
Subject: [PATCH 3/8] crypto: drbg: Convert dual BSD 3-Clause/GPL-1.0 license boilerplate to SPDX identifier

Replace the boilerplate with corresponding SPDX tag. Since there is no
explicit GPL version, assume GPL 1.0+.

Cc: Stephan Mueller <[email protected]>
Signed-off-by: Bagas Sanjaya <[email protected]>
---
crypto/drbg.c | 33 +--------------------------------
1 file changed, 1 insertion(+), 32 deletions(-)

diff --git a/crypto/drbg.c b/crypto/drbg.c
index ff4ebbc68efab1..f797deaf3952ef 100644
--- a/crypto/drbg.c
+++ b/crypto/drbg.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: BSD-3-Clause OR GPL-1.0+
/*
* DRBG: Deterministic Random Bits Generator
* Based on NIST Recommended DRBG from NIST SP800-90A with the following
@@ -9,38 +10,6 @@
*
* Copyright Stephan Mueller <[email protected]>, 2014
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU General Public License, in which case the provisions of the GPL are
- * required INSTEAD OF the above restrictions. (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
* DRBG Usage
* ==========
* The SP 800-90A DRBG allows the user to specify a personalization string
--
An old man doll... just what I always wanted! - Clara


2023-06-07 05:41:27

by Bagas Sanjaya

[permalink] [raw]
Subject: [PATCH 6/8] crypto: Replace GPL 2.0 boilerplate with SPDX license identifier

Replace the license boilerplate text with appropriate SPDX tag.

Cc: Aaron Grothe <[email protected]>
Cc: "Martin K. Petersen" <[email protected]>
Cc: Tim Chen <[email protected]>
Cc: "David S. Miller" <[email protected]>
Cc: James Morris <[email protected]>
Signed-off-by: Bagas Sanjaya <[email protected]>
---
crypto/anubis.c | 6 +-----
crypto/crct10dif_common.c | 15 +--------------
crypto/crct10dif_generic.c | 15 +--------------
crypto/khazad.c | 6 +-----
crypto/md4.c | 6 +-----
crypto/md5.c | 6 +-----
crypto/poly1305_generic.c | 5 +----
crypto/vmac.c | 13 +------------
crypto/wp512.c | 6 +-----
9 files changed, 9 insertions(+), 69 deletions(-)

diff --git a/crypto/anubis.c b/crypto/anubis.c
index 9f0cf61bbc6e26..c3ca6d87b8a0aa 100644
--- a/crypto/anubis.c
+++ b/crypto/anubis.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Cryptographic API.
*
@@ -22,11 +23,6 @@
*
* By Aaron Grothe [email protected], October 28, 2004
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
*/

#include <crypto/algapi.h>
diff --git a/crypto/crct10dif_common.c b/crypto/crct10dif_common.c
index b2fab366f518bc..0eac9fa1d0088e 100644
--- a/crypto/crct10dif_common.c
+++ b/crypto/crct10dif_common.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Cryptographic API.
*
@@ -8,20 +9,6 @@
* Copyright (C) 2013 Intel Corporation
* Author: Tim Chen <[email protected]>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
*/

#include <linux/crc-t10dif.h>
diff --git a/crypto/crct10dif_generic.c b/crypto/crct10dif_generic.c
index e843982073bb58..aef86b2c7a1e36 100644
--- a/crypto/crct10dif_generic.c
+++ b/crypto/crct10dif_generic.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Cryptographic API.
*
@@ -8,20 +9,6 @@
* Copyright (C) 2013 Intel Corporation
* Author: Tim Chen <[email protected]>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
- * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
- * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
- * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- * SOFTWARE.
- *
*/

#include <linux/module.h>
diff --git a/crypto/khazad.c b/crypto/khazad.c
index 70cafe73f97405..42c2ac2603f7d2 100644
--- a/crypto/khazad.c
+++ b/crypto/khazad.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Cryptographic API.
*
@@ -12,11 +13,6 @@
*
* By Aaron Grothe [email protected], August 1, 2004
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
*/

#include <crypto/algapi.h>
diff --git a/crypto/md4.c b/crypto/md4.c
index 2e7f2f319f9503..0ba32634088bd3 100644
--- a/crypto/md4.c
+++ b/crypto/md4.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Cryptographic API.
*
@@ -14,11 +15,6 @@
* Copyright (c) 2002 David S. Miller ([email protected])
* Copyright (c) 2002 James Morris <[email protected]>
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
*/
#include <crypto/internal/hash.h>
#include <linux/init.h>
diff --git a/crypto/md5.c b/crypto/md5.c
index 72c0c46fb5eea2..d17cc0180f699f 100644
--- a/crypto/md5.c
+++ b/crypto/md5.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Cryptographic API.
*
@@ -9,11 +10,6 @@
* Copyright (c) Cryptoapi developers.
* Copyright (c) 2002 James Morris <[email protected]>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
- *
*/
#include <crypto/internal/hash.h>
#include <crypto/md5.h>
diff --git a/crypto/poly1305_generic.c b/crypto/poly1305_generic.c
index 94af47eb6fa699..9cd51b6d7d892d 100644
--- a/crypto/poly1305_generic.c
+++ b/crypto/poly1305_generic.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Poly1305 authenticator algorithm, RFC7539
*
@@ -5,10 +6,6 @@
*
* Based on public domain code by Andrew Moon and Daniel J. Bernstein.
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
*/

#include <crypto/algapi.h>
diff --git a/crypto/vmac.c b/crypto/vmac.c
index 4633b2dda1e0a5..0052c32c3f11b3 100644
--- a/crypto/vmac.c
+++ b/crypto/vmac.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* VMAC: Message Authentication Code using Universal Hashing
*
@@ -6,18 +7,6 @@
* Copyright (c) 2009, Intel Corporation.
* Copyright (c) 2018, Google Inc.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
- * Place - Suite 330, Boston, MA 02111-1307 USA.
*/

/*
diff --git a/crypto/wp512.c b/crypto/wp512.c
index 07994e5ebf4ef2..31040492c98175 100644
--- a/crypto/wp512.c
+++ b/crypto/wp512.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Cryptographic API.
*
@@ -13,11 +14,6 @@
*
* By Aaron Grothe [email protected], August 23, 2004
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
*/
#include <crypto/internal/hash.h>
#include <linux/init.h>
--
An old man doll... just what I always wanted! - Clara


2023-06-07 05:41:42

by Bagas Sanjaya

[permalink] [raw]
Subject: [PATCH 8/8] crypto: cts: Convert MIT boilerplate to corresponding SPDX license identifier

License boilerplate in CTS mode implementation (crypto/cts.c) looks like
MIT license with advertising clause. Replace it with correspondig
SPDX tag.

Signed-off-by: Bagas Sanjaya <[email protected]>
---
crypto/cts.c | 24 +-----------------------
1 file changed, 1 insertion(+), 23 deletions(-)

diff --git a/crypto/cts.c b/crypto/cts.c
index 8f604f6554b1c3..9ec7e9787c0f6a 100644
--- a/crypto/cts.c
+++ b/crypto/cts.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: MIT
/*
* CTS: Cipher Text Stealing mode
*
@@ -5,29 +6,6 @@
* The Regents of the University of Michigan
* ALL RIGHTS RESERVED
*
- * Permission is granted to use, copy, create derivative works
- * and redistribute this software and such derivative works
- * for any purpose, so long as the name of The University of
- * Michigan is not used in any advertising or publicity
- * pertaining to the use of distribution of this software
- * without specific, written prior authorization. If the
- * above copyright notice or any other identification of the
- * University of Michigan is included in any copy of any
- * portion of this software, then the disclaimer below must
- * also be included.
- *
- * THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION
- * FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY
- * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF
- * MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
- * WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
- * REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE
- * FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR
- * CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING
- * OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN
- * IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGES.
*/

/* Derived from various:
--
An old man doll... just what I always wanted! - Clara


2023-06-07 05:41:48

by Bagas Sanjaya

[permalink] [raw]
Subject: [PATCH 7/8] crypto: ecrdsa: Remove GPL 2.0+ boilerplate

Remove the unnecessary license notice since there is already matching
SPDX license identifier which does the same job.

Cc: Vitaly Chikunov <[email protected]>
Signed-off-by: Bagas Sanjaya <[email protected]>
---
crypto/ecrdsa.c | 4 ----
crypto/ecrdsa_defs.h | 4 ----
2 files changed, 8 deletions(-)

diff --git a/crypto/ecrdsa.c b/crypto/ecrdsa.c
index f3c6b5e15e75ba..4a08ef48e95c5e 100644
--- a/crypto/ecrdsa.c
+++ b/crypto/ecrdsa.c
@@ -10,10 +10,6 @@
* Historical references:
* GOST R 34.10-2001, RFC 4357, ISO/IEC 14888-3:2006/Amd 1:2010.
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
*/

#include <linux/module.h>
diff --git a/crypto/ecrdsa_defs.h b/crypto/ecrdsa_defs.h
index 0056335b9d03a1..82d4229ea879b6 100644
--- a/crypto/ecrdsa_defs.h
+++ b/crypto/ecrdsa_defs.h
@@ -4,10 +4,6 @@
*
* Copyright (c) 2019 Vitaly Chikunov <[email protected]>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
*/

#ifndef _CRYTO_ECRDSA_DEFS_H
--
An old man doll... just what I always wanted! - Clara


2023-06-07 05:41:51

by Bagas Sanjaya

[permalink] [raw]
Subject: [PATCH 5/8] crypto: streebog_generic: Correct SPDX license identifier

Streebog hash function implementation (crypto/streebog_generic.c) have
GPL 2.0+ license boilerplate, but its SPDX identifier is mistagged
as dual BSD/GPL. Correct the tag, while also removing the boilerplate.

Fixes: e18957e8e87403 ("crypto: streebog - add Streebog hash function")
Cc: Alexey Degtyarev <[email protected]>
Cc: Vitaly Chikunov <[email protected]>
Signed-off-by: Bagas Sanjaya <[email protected]>
---
crypto/streebog_generic.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/crypto/streebog_generic.c b/crypto/streebog_generic.c
index dc625ffc54ad7f..65d0e6bf5e1992 100644
--- a/crypto/streebog_generic.c
+++ b/crypto/streebog_generic.c
@@ -1,4 +1,4 @@
-// SPDX-License-Identifier: GPL-2.0+ OR BSD-2-Clause
+// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Streebog hash function as specified by GOST R 34.11-2012 and
* described at https://tools.ietf.org/html/rfc6986
@@ -6,10 +6,6 @@
* Copyright (c) 2013 Alexey Degtyarev <[email protected]>
* Copyright (c) 2018 Vitaly Chikunov <[email protected]>
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License as published by the Free
- * Software Foundation; either version 2 of the License, or (at your option)
- * any later version.
*/

#include <crypto/internal/hash.h>
--
An old man doll... just what I always wanted! - Clara


2023-06-07 05:42:16

by Bagas Sanjaya

[permalink] [raw]
Subject: [PATCH 1/8] crypto: Convert dual BSD 3-Clause/GPL 2.0 boilerplate to SPDX identifier

Replace license boilerplate for dual BSD-3-Clause/GPL 2.0 (only or
later) with corresponding SPDX license identifier.

Cc: Alexander Kjeldaas <[email protected]>
Cc: Herbert Valerio Riedel <[email protected]>
Cc: Kyle McMartin <[email protected]>
Cc: Adam J. Richter <[email protected]>
Cc: Dr Brian Gladman <[email protected]>
Cc: Stephan Mueller <[email protected]>
Signed-off-by: Bagas Sanjaya <[email protected]>
---
crypto/aes_generic.c | 31 +------------------------------
crypto/algif_rng.c | 33 +--------------------------------
crypto/jitterentropy-kcapi.c | 32 +-------------------------------
crypto/jitterentropy.c | 35 +----------------------------------
crypto/keywrap.c | 32 +-------------------------------
5 files changed, 5 insertions(+), 158 deletions(-)

diff --git a/crypto/aes_generic.c b/crypto/aes_generic.c
index 666474b81c6aa5..2e042bd306f9c5 100644
--- a/crypto/aes_generic.c
+++ b/crypto/aes_generic.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later
/*
* Cryptographic API.
*
@@ -11,39 +12,9 @@
* Kyle McMartin <[email protected]>
* Adam J. Richter <[email protected]> (conversion to 2.5 API).
*
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
* ---------------------------------------------------------------------------
* Copyright (c) 2002, Dr Brian Gladman <[email protected]>, Worcester, UK.
* All rights reserved.
- *
- * LICENSE TERMS
- *
- * The free distribution and use of this software in both source and binary
- * form is allowed (with or without changes) provided that:
- *
- * 1. distributions of this source code include the above copyright
- * notice, this list of conditions and the following disclaimer;
- *
- * 2. distributions in binary form include the above copyright
- * notice, this list of conditions and the following disclaimer
- * in the documentation and/or other associated materials;
- *
- * 3. the copyright holder's name is not used to endorse products
- * built using this software without specific written permission.
- *
- * ALTERNATIVELY, provided that this notice is retained in full, this product
- * may be distributed under the terms of the GNU General Public License (GPL),
- * in which case the provisions of the GPL apply INSTEAD OF those given above.
- *
- * DISCLAIMER
- *
- * This software is provided 'as is' with no explicit or implied warranties
- * in respect of its properties, including, but not limited to, correctness
- * and/or fitness for purpose.
* ---------------------------------------------------------------------------
*/

diff --git a/crypto/algif_rng.c b/crypto/algif_rng.c
index 407408c437308f..4d4b9e60f72c19 100644
--- a/crypto/algif_rng.c
+++ b/crypto/algif_rng.c
@@ -1,41 +1,10 @@
+// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only
/*
* algif_rng: User-space interface for random number generators
*
* This file provides the user-space API for random number generators.
*
* Copyright (C) 2014, Stephan Mueller <[email protected]>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU General Public License, in which case the provisions of the GPL2
- * are required INSTEAD OF the above restrictions. (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
*/

#include <linux/capability.h>
diff --git a/crypto/jitterentropy-kcapi.c b/crypto/jitterentropy-kcapi.c
index 7d1463a1562acb..78230ce74fc840 100644
--- a/crypto/jitterentropy-kcapi.c
+++ b/crypto/jitterentropy-kcapi.c
@@ -1,40 +1,10 @@
+// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only
/*
* Non-physical true random number generator based on timing jitter --
* Linux Kernel Crypto API specific code
*
* Copyright Stephan Mueller <[email protected]>, 2015 - 2023
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU General Public License, in which case the provisions of the GPL2 are
- * required INSTEAD OF the above restrictions. (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
*/

#include <crypto/hash.h>
diff --git a/crypto/jitterentropy.c b/crypto/jitterentropy.c
index c7d7f2caa7793b..c8437bd20dc903 100644
--- a/crypto/jitterentropy.c
+++ b/crypto/jitterentropy.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only
/*
* Non-physical true random number generator based on timing jitter --
* Jitter RNG standalone code.
@@ -9,40 +10,6 @@
*
* See https://www.chronox.de/jent.html
*
- * License
- * =======
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU General Public License, in which case the provisions of the GPL2 are
- * required INSTEAD OF the above restrictions. (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
*/

/*
diff --git a/crypto/keywrap.c b/crypto/keywrap.c
index 054d9a216fc9f3..8c51235a91a9ae 100644
--- a/crypto/keywrap.c
+++ b/crypto/keywrap.c
@@ -1,39 +1,9 @@
+// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only
/*
* Key Wrapping: RFC3394 / NIST SP800-38F
*
* Copyright (C) 2015, Stephan Mueller <[email protected]>
*
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, and the entire permission notice in its entirety,
- * including the disclaimer of warranties.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. The name of the author may not be used to endorse or promote
- * products derived from this software without specific prior
- * written permission.
- *
- * ALTERNATIVELY, this product may be distributed under the terms of
- * the GNU General Public License, in which case the provisions of the GPL2
- * are required INSTEAD OF the above restrictions. (This clause is
- * necessary due to a potential bad interaction between the GPL and
- * the restrictions contained in a BSD-style copyright.)
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
- * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
- * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
- * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
*/

/*
--
An old man doll... just what I always wanted! - Clara


2023-06-07 15:27:56

by Richard Fontana

[permalink] [raw]
Subject: Re: [PATCH 8/8] crypto: cts: Convert MIT boilerplate to corresponding SPDX license identifier

On Wed, Jun 7, 2023 at 1:41 AM Bagas Sanjaya <[email protected]> wrote:
>
> License boilerplate in CTS mode implementation (crypto/cts.c) looks like
> MIT license with advertising clause. Replace it with correspondig
> SPDX tag.
>
> Signed-off-by: Bagas Sanjaya <[email protected]>
> ---
> crypto/cts.c | 24 +-----------------------
> 1 file changed, 1 insertion(+), 23 deletions(-)
>
> diff --git a/crypto/cts.c b/crypto/cts.c
> index 8f604f6554b1c3..9ec7e9787c0f6a 100644
> --- a/crypto/cts.c
> +++ b/crypto/cts.c
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: MIT
> /*
> * CTS: Cipher Text Stealing mode
> *
> @@ -5,29 +6,6 @@
> * The Regents of the University of Michigan
> * ALL RIGHTS RESERVED
> *
> - * Permission is granted to use, copy, create derivative works
> - * and redistribute this software and such derivative works
> - * for any purpose, so long as the name of The University of
> - * Michigan is not used in any advertising or publicity
> - * pertaining to the use of distribution of this software
> - * without specific, written prior authorization. If the
> - * above copyright notice or any other identification of the
> - * University of Michigan is included in any copy of any
> - * portion of this software, then the disclaimer below must
> - * also be included.
> - *
> - * THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION
> - * FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY
> - * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF
> - * MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
> - * WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
> - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
> - * REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE
> - * FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR
> - * CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING
> - * OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN
> - * IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF
> - * SUCH DAMAGES.
> */

This is not the MIT license (as defined by SPDX) - there may not be an
SPDX identifier covering this license text.

This is at least the second time in your recent patches where you have
assumed that a non-GPL license corresponds to a particular SPDX
identifier without (apparently) checking.

Richard


2023-06-07 15:56:36

by Richard Fontana

[permalink] [raw]
Subject: Re: [PATCH 3/8] crypto: drbg: Convert dual BSD 3-Clause/GPL-1.0 license boilerplate to SPDX identifier

On Wed, Jun 7, 2023 at 1:41 AM Bagas Sanjaya <[email protected]> wrote:
>
> Replace the boilerplate with corresponding SPDX tag. Since there is no
> explicit GPL version, assume GPL 1.0+.
>
> Cc: Stephan Mueller <[email protected]>
> Signed-off-by: Bagas Sanjaya <[email protected]>
> ---
> crypto/drbg.c | 33 +--------------------------------
> 1 file changed, 1 insertion(+), 32 deletions(-)
>
> diff --git a/crypto/drbg.c b/crypto/drbg.c
> index ff4ebbc68efab1..f797deaf3952ef 100644
> --- a/crypto/drbg.c
> +++ b/crypto/drbg.c
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: BSD-3-Clause OR GPL-1.0+
> /*
> * DRBG: Deterministic Random Bits Generator
> * Based on NIST Recommended DRBG from NIST SP800-90A with the following
> @@ -9,38 +10,6 @@
> *
> * Copyright Stephan Mueller <[email protected]>, 2014
> *
> - * Redistribution and use in source and binary forms, with or without
> - * modification, are permitted provided that the following conditions
> - * are met:
> - * 1. Redistributions of source code must retain the above copyright
> - * notice, and the entire permission notice in its entirety,
> - * including the disclaimer of warranties.
> - * 2. Redistributions in binary form must reproduce the above copyright
> - * notice, this list of conditions and the following disclaimer in the
> - * documentation and/or other materials provided with the distribution.
> - * 3. The name of the author may not be used to endorse or promote
> - * products derived from this software without specific prior
> - * written permission.
> - *
> - * ALTERNATIVELY, this product may be distributed under the terms of
> - * the GNU General Public License, in which case the provisions of the GPL are
> - * required INSTEAD OF the above restrictions. (This clause is
> - * necessary due to a potential bad interaction between the GPL and
> - * the restrictions contained in a BSD-style copyright.)
> - *
> - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
> - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
> - * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
> - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
> - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> - * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
> - * DAMAGE.

The non-GPL portion of this notice does not match BSD-3-Clause as
currently defined by SPDX (see:
https://github.com/spdx/license-list-XML/blob/main/src/BSD-3-Clause.xml).
This is at least the third time in your recent patches that you have
assumed that a non-GPL license matches a particular SPDX identifier
without (apparently) checking.

That's assuming it's appropriate to represent this as a dual license
and omit the 'ALTERNATIVELY' parenthetical. I'm not sure how I feel
about that.

Richard


2023-06-08 05:43:54

by Bagas Sanjaya

[permalink] [raw]
Subject: Re: [PATCH 8/8] crypto: cts: Convert MIT boilerplate to corresponding SPDX license identifier

On Wed, Jun 07, 2023 at 09:47:33AM -0400, Richard Fontana wrote:
> On Wed, Jun 7, 2023 at 1:41 AM Bagas Sanjaya <[email protected]> wrote:
> >
> > License boilerplate in CTS mode implementation (crypto/cts.c) looks like
> > MIT license with advertising clause. Replace it with correspondig
> > SPDX tag.
> >
> > Signed-off-by: Bagas Sanjaya <[email protected]>
> > ---
> > crypto/cts.c | 24 +-----------------------
> > 1 file changed, 1 insertion(+), 23 deletions(-)
> >
> > diff --git a/crypto/cts.c b/crypto/cts.c
> > index 8f604f6554b1c3..9ec7e9787c0f6a 100644
> > --- a/crypto/cts.c
> > +++ b/crypto/cts.c
> > @@ -1,3 +1,4 @@
> > +// SPDX-License-Identifier: MIT
> > /*
> > * CTS: Cipher Text Stealing mode
> > *
> > @@ -5,29 +6,6 @@
> > * The Regents of the University of Michigan
> > * ALL RIGHTS RESERVED
> > *
> > - * Permission is granted to use, copy, create derivative works
> > - * and redistribute this software and such derivative works
> > - * for any purpose, so long as the name of The University of
> > - * Michigan is not used in any advertising or publicity
> > - * pertaining to the use of distribution of this software
> > - * without specific, written prior authorization. If the
> > - * above copyright notice or any other identification of the
> > - * University of Michigan is included in any copy of any
> > - * portion of this software, then the disclaimer below must
> > - * also be included.
> > - *
> > - * THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION
> > - * FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY
> > - * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF
> > - * MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
> > - * WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
> > - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
> > - * REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE
> > - * FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR
> > - * CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING
> > - * OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN
> > - * IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF
> > - * SUCH DAMAGES.
> > */
>
> This is not the MIT license (as defined by SPDX) - there may not be an
> SPDX identifier covering this license text.
>
> This is at least the second time in your recent patches where you have
> assumed that a non-GPL license corresponds to a particular SPDX
> identifier without (apparently) checking.
>

I was thought of interpolating license tags (heuristic matching) in
cases like this. In this case, the UoMi license was adapted from
(and roughly resembled) MIT (hence I thought of MIT variant).

Greg, is Richard's comment right? If so, I'll drop this patch.

Thanks!

--
An old man doll... just what I always wanted! - Clara


Attachments:
(No filename) (2.83 kB)
signature.asc (235.00 B)
Download all attachments

2023-06-08 05:48:27

by Bagas Sanjaya

[permalink] [raw]
Subject: Re: [PATCH 3/8] crypto: drbg: Convert dual BSD 3-Clause/GPL-1.0 license boilerplate to SPDX identifier

On Wed, Jun 07, 2023 at 09:56:03AM -0400, Richard Fontana wrote:
> On Wed, Jun 7, 2023 at 1:41 AM Bagas Sanjaya <[email protected]> wrote:
> >
> > Replace the boilerplate with corresponding SPDX tag. Since there is no
> > explicit GPL version, assume GPL 1.0+.
> >
> > Cc: Stephan Mueller <[email protected]>
> > Signed-off-by: Bagas Sanjaya <[email protected]>
> > ---
> > crypto/drbg.c | 33 +--------------------------------
> > 1 file changed, 1 insertion(+), 32 deletions(-)
> >
> > diff --git a/crypto/drbg.c b/crypto/drbg.c
> > index ff4ebbc68efab1..f797deaf3952ef 100644
> > --- a/crypto/drbg.c
> > +++ b/crypto/drbg.c
> > @@ -1,3 +1,4 @@
> > +// SPDX-License-Identifier: BSD-3-Clause OR GPL-1.0+
> > /*
> > * DRBG: Deterministic Random Bits Generator
> > * Based on NIST Recommended DRBG from NIST SP800-90A with the following
> > @@ -9,38 +10,6 @@
> > *
> > * Copyright Stephan Mueller <[email protected]>, 2014
> > *
> > - * Redistribution and use in source and binary forms, with or without
> > - * modification, are permitted provided that the following conditions
> > - * are met:
> > - * 1. Redistributions of source code must retain the above copyright
> > - * notice, and the entire permission notice in its entirety,
> > - * including the disclaimer of warranties.
> > - * 2. Redistributions in binary form must reproduce the above copyright
> > - * notice, this list of conditions and the following disclaimer in the
> > - * documentation and/or other materials provided with the distribution.
> > - * 3. The name of the author may not be used to endorse or promote
> > - * products derived from this software without specific prior
> > - * written permission.
> > - *
> > - * ALTERNATIVELY, this product may be distributed under the terms of
> > - * the GNU General Public License, in which case the provisions of the GPL are
> > - * required INSTEAD OF the above restrictions. (This clause is
> > - * necessary due to a potential bad interaction between the GPL and
> > - * the restrictions contained in a BSD-style copyright.)
> > - *
> > - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
> > - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> > - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
> > - * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
> > - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> > - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
> > - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> > - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> > - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> > - * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
> > - * DAMAGE.
>
> The non-GPL portion of this notice does not match BSD-3-Clause as
> currently defined by SPDX (see:
> https://github.com/spdx/license-list-XML/blob/main/src/BSD-3-Clause.xml).
> This is at least the third time in your recent patches that you have
> assumed that a non-GPL license matches a particular SPDX identifier
> without (apparently) checking.

I missed the point of first clause of this BSD boilerplate, for which
I had to not delete the boilerplate. I can keep the SPDX tag if Stephan
(original author) or at least Greg agree with this BSD wording variant.

>
> That's assuming it's appropriate to represent this as a dual license
> and omit the 'ALTERNATIVELY' parenthetical. I'm not sure how I feel
> about that.

Do you mean the SPDX tag should have been with AND instead?

Thanks for reviewing.

--
An old man doll... just what I always wanted! - Clara


Attachments:
(No filename) (3.78 kB)
signature.asc (235.00 B)
Download all attachments

2023-06-08 06:03:46

by Bagas Sanjaya

[permalink] [raw]
Subject: Re: [PATCH 1/8] crypto: Convert dual BSD 3-Clause/GPL 2.0 boilerplate to SPDX identifier

On Wed, Jun 07, 2023 at 10:10:34AM -0400, Richard Fontana wrote:
> On Wed, Jun 7, 2023 at 1:42 AM Bagas Sanjaya <[email protected]> wrote:
> >
> > Replace license boilerplate for dual BSD-3-Clause/GPL 2.0 (only or
> > later) with corresponding SPDX license identifier.
>
> This is at least the fourth or fifth time (I'm losing track) where you
> have incorrectly assumed a particular non-GPL license text matches a
> particular SPDX identifier without (apparently) checking.
>
> Bagas, I urge that you learn more about the nature of SPDX identifiers
> before submitting any further patches at least involving replacement
> of non-GPL notices with SPDX identifiers. For this unprecedented
> license notice replacement initiative to have any legitimacy it must
> attempt to apply SPDX identifiers correctly.
>
> > diff --git a/crypto/aes_generic.c b/crypto/aes_generic.c
> > index 666474b81c6aa5..2e042bd306f9c5 100644
> > --- a/crypto/aes_generic.c
> > +++ b/crypto/aes_generic.c
> > @@ -1,3 +1,4 @@
> > +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later
> > /*
> > * Cryptographic API.
> > *
> > @@ -11,39 +12,9 @@
> > * Kyle McMartin <[email protected]>
> > * Adam J. Richter <[email protected]> (conversion to 2.5 API).
> > *
> > - * This program is free software; you can redistribute it and/or modify
> > - * it under the terms of the GNU General Public License as published by
> > - * the Free Software Foundation; either version 2 of the License, or
> > - * (at your option) any later version.
> > - *
> > * ---------------------------------------------------------------------------
> > * Copyright (c) 2002, Dr Brian Gladman <[email protected]>, Worcester, UK.
> > * All rights reserved.
> > - *
> > - * LICENSE TERMS
> > - *
> > - * The free distribution and use of this software in both source and binary
> > - * form is allowed (with or without changes) provided that:
> > - *
> > - * 1. distributions of this source code include the above copyright
> > - * notice, this list of conditions and the following disclaimer;
> > - *
> > - * 2. distributions in binary form include the above copyright
> > - * notice, this list of conditions and the following disclaimer
> > - * in the documentation and/or other associated materials;
> > - *
> > - * 3. the copyright holder's name is not used to endorse products
> > - * built using this software without specific written permission.
> > - *

Hi Richard,

> > - * ALTERNATIVELY, provided that this notice is retained in full, this product
> > - * may be distributed under the terms of the GNU General Public License (GPL),
> > - * in which case the provisions of the GPL apply INSTEAD OF those given above.
> > - *
> > - * DISCLAIMER
> > - *
> > - * This software is provided 'as is' with no explicit or implied warranties
> > - * in respect of its properties, including, but not limited to, correctness
> > - * and/or fitness for purpose.
> > * ---------------------------------------------------------------------------
>
> This is not BSD-3-Clause as defined by SPDX. It may be a match to
> `Brian-Gladman-3-Clause` but I haven't checked closely.
>
> > diff --git a/crypto/algif_rng.c b/crypto/algif_rng.c
> > index 407408c437308f..4d4b9e60f72c19 100644
> > --- a/crypto/algif_rng.c
> > +++ b/crypto/algif_rng.c
> > @@ -1,41 +1,10 @@
> > +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only
> > /*
> > * algif_rng: User-space interface for random number generators
> > *
> > * This file provides the user-space API for random number generators.
> > *
> > * Copyright (C) 2014, Stephan Mueller <[email protected]>
> > - *
> > - * Redistribution and use in source and binary forms, with or without
> > - * modification, are permitted provided that the following conditions
> > - * are met:
> > - * 1. Redistributions of source code must retain the above copyright
> > - * notice, and the entire permission notice in its entirety,
> > - * including the disclaimer of warranties.
> > - * 2. Redistributions in binary form must reproduce the above copyright
> > - * notice, this list of conditions and the following disclaimer in the
> > - * documentation and/or other materials provided with the distribution.
> > - * 3. The name of the author may not be used to endorse or promote
> > - * products derived from this software without specific prior
> > - * written permission.
> > - *
> > - * ALTERNATIVELY, this product may be distributed under the terms of
> > - * the GNU General Public License, in which case the provisions of the GPL2
> > - * are required INSTEAD OF the above restrictions. (This clause is
> > - * necessary due to a potential bad interaction between the GPL and
> > - * the restrictions contained in a BSD-style copyright.)
> > - *
> > - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
> > - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> > - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
> > - * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
> > - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> > - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
> > - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> > - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> > - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> > - * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
> > - * DAMAGE.
> > */
>
> The BSD portion of this license notice is not a match to BSD-3-Clause
> (see my comment on another patch which I think had the same license
> text).

At the time, I guessed that boilerplate wording have the same meaning as
the actual BSD 3-Clause license.

(And no wonder why this file missed previous SPDX batches).

tglx, I'm adding you to Cc:. Please have a look on this (and following
below) BSD wording variants.

>
>
>
>
> > #include <linux/capability.h>
> > diff --git a/crypto/jitterentropy-kcapi.c b/crypto/jitterentropy-kcapi.c
> > index 7d1463a1562acb..78230ce74fc840 100644
> > --- a/crypto/jitterentropy-kcapi.c
> > +++ b/crypto/jitterentropy-kcapi.c
> > @@ -1,40 +1,10 @@
> > +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only
> > /*
> > * Non-physical true random number generator based on timing jitter --
> > * Linux Kernel Crypto API specific code
> > *
> > * Copyright Stephan Mueller <[email protected]>, 2015 - 2023
> > *
> > - * Redistribution and use in source and binary forms, with or without
> > - * modification, are permitted provided that the following conditions
> > - * are met:
> > - * 1. Redistributions of source code must retain the above copyright
> > - * notice, and the entire permission notice in its entirety,
> > - * including the disclaimer of warranties.
> > - * 2. Redistributions in binary form must reproduce the above copyright
> > - * notice, this list of conditions and the following disclaimer in the
> > - * documentation and/or other materials provided with the distribution.
> > - * 3. The name of the author may not be used to endorse or promote
> > - * products derived from this software without specific prior
> > - * written permission.
> > - *
> > - * ALTERNATIVELY, this product may be distributed under the terms of
> > - * the GNU General Public License, in which case the provisions of the GPL2 are
> > - * required INSTEAD OF the above restrictions. (This clause is
> > - * necessary due to a potential bad interaction between the GPL and
> > - * the restrictions contained in a BSD-style copyright.)
> > - *
> > - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
> > - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> > - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
> > - * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
> > - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> > - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
> > - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> > - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> > - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> > - * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
> > - * DAMAGE.
>
> Also not a match to BSD-3-Clause.

See my below reply.

>
>
> > #include <crypto/hash.h>
> > diff --git a/crypto/jitterentropy.c b/crypto/jitterentropy.c
> > index c7d7f2caa7793b..c8437bd20dc903 100644
> > --- a/crypto/jitterentropy.c
> > +++ b/crypto/jitterentropy.c
> > @@ -1,3 +1,4 @@
> > +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only
> > /*
> > * Non-physical true random number generator based on timing jitter --
> > * Jitter RNG standalone code.
> > @@ -9,40 +10,6 @@
> > *
> > * See https://www.chronox.de/jent.html
> > *
> > - * License
> > - * =======
> > - *
> > - * Redistribution and use in source and binary forms, with or without
> > - * modification, are permitted provided that the following conditions
> > - * are met:
> > - * 1. Redistributions of source code must retain the above copyright
> > - * notice, and the entire permission notice in its entirety,
> > - * including the disclaimer of warranties.
> > - * 2. Redistributions in binary form must reproduce the above copyright
> > - * notice, this list of conditions and the following disclaimer in the
> > - * documentation and/or other materials provided with the distribution.
> > - * 3. The name of the author may not be used to endorse or promote
> > - * products derived from this software without specific prior
> > - * written permission.
> > - *
> > - * ALTERNATIVELY, this product may be distributed under the terms of
> > - * the GNU General Public License, in which case the provisions of the GPL2 are
> > - * required INSTEAD OF the above restrictions. (This clause is
> > - * necessary due to a potential bad interaction between the GPL and
> > - * the restrictions contained in a BSD-style copyright.)
> > - *
> > - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
> > - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> > - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
> > - * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
> > - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> > - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
> > - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> > - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> > - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> > - * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
> > - * DAMAGE.
>
> Also not a match to BSD-3-Clause.

The first clause also addes disclaimer perseverance as in the second;
and the third clause is worded differently (but same meaning).

>
>
> > diff --git a/crypto/keywrap.c b/crypto/keywrap.c
> > index 054d9a216fc9f3..8c51235a91a9ae 100644
> > --- a/crypto/keywrap.c
> > +++ b/crypto/keywrap.c
> > @@ -1,39 +1,9 @@
> > +// SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-only
> > /*
> > * Key Wrapping: RFC3394 / NIST SP800-38F
> > *
> > * Copyright (C) 2015, Stephan Mueller <[email protected]>
> > *
> > - * Redistribution and use in source and binary forms, with or without
> > - * modification, are permitted provided that the following conditions
> > - * are met:
> > - * 1. Redistributions of source code must retain the above copyright
> > - * notice, and the entire permission notice in its entirety,
> > - * including the disclaimer of warranties.
> > - * 2. Redistributions in binary form must reproduce the above copyright
> > - * notice, this list of conditions and the following disclaimer in the
> > - * documentation and/or other materials provided with the distribution.
> > - * 3. The name of the author may not be used to endorse or promote
> > - * products derived from this software without specific prior
> > - * written permission.
> > - *
> > - * ALTERNATIVELY, this product may be distributed under the terms of
> > - * the GNU General Public License, in which case the provisions of the GPL2
> > - * are required INSTEAD OF the above restrictions. (This clause is
> > - * necessary due to a potential bad interaction between the GPL and
> > - * the restrictions contained in a BSD-style copyright.)
> > - *
> > - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
> > - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
> > - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, ALL OF
> > - * WHICH ARE HEREBY DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE
> > - * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
> > - * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
> > - * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
> > - * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
> > - * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> > - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
> > - * USE OF THIS SOFTWARE, EVEN IF NOT ADVISED OF THE POSSIBILITY OF SUCH
> > - * DAMAGE.
>
> Also not a match to BSD-3-Clause.

See my above reply.

Stephan (original author), was your intention to license these files
under BSD 3-Clause?

Thanks for reviewing.

--
An old man doll... just what I always wanted! - Clara


Attachments:
(No filename) (13.84 kB)
signature.asc (235.00 B)
Download all attachments

2023-06-08 06:07:37

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 8/8] crypto: cts: Convert MIT boilerplate to corresponding SPDX license identifier

On Thu, Jun 08, 2023 at 12:32:34PM +0700, Bagas Sanjaya wrote:
> On Wed, Jun 07, 2023 at 09:47:33AM -0400, Richard Fontana wrote:
> > On Wed, Jun 7, 2023 at 1:41 AM Bagas Sanjaya <[email protected]> wrote:
> > >
> > > License boilerplate in CTS mode implementation (crypto/cts.c) looks like
> > > MIT license with advertising clause. Replace it with correspondig
> > > SPDX tag.
> > >
> > > Signed-off-by: Bagas Sanjaya <[email protected]>
> > > ---
> > > crypto/cts.c | 24 +-----------------------
> > > 1 file changed, 1 insertion(+), 23 deletions(-)
> > >
> > > diff --git a/crypto/cts.c b/crypto/cts.c
> > > index 8f604f6554b1c3..9ec7e9787c0f6a 100644
> > > --- a/crypto/cts.c
> > > +++ b/crypto/cts.c
> > > @@ -1,3 +1,4 @@
> > > +// SPDX-License-Identifier: MIT
> > > /*
> > > * CTS: Cipher Text Stealing mode
> > > *
> > > @@ -5,29 +6,6 @@
> > > * The Regents of the University of Michigan
> > > * ALL RIGHTS RESERVED
> > > *
> > > - * Permission is granted to use, copy, create derivative works
> > > - * and redistribute this software and such derivative works
> > > - * for any purpose, so long as the name of The University of
> > > - * Michigan is not used in any advertising or publicity
> > > - * pertaining to the use of distribution of this software
> > > - * without specific, written prior authorization. If the
> > > - * above copyright notice or any other identification of the
> > > - * University of Michigan is included in any copy of any
> > > - * portion of this software, then the disclaimer below must
> > > - * also be included.
> > > - *
> > > - * THIS SOFTWARE IS PROVIDED AS IS, WITHOUT REPRESENTATION
> > > - * FROM THE UNIVERSITY OF MICHIGAN AS TO ITS FITNESS FOR ANY
> > > - * PURPOSE, AND WITHOUT WARRANTY BY THE UNIVERSITY OF
> > > - * MICHIGAN OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING
> > > - * WITHOUT LIMITATION THE IMPLIED WARRANTIES OF
> > > - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
> > > - * REGENTS OF THE UNIVERSITY OF MICHIGAN SHALL NOT BE LIABLE
> > > - * FOR ANY DAMAGES, INCLUDING SPECIAL, INDIRECT, INCIDENTAL, OR
> > > - * CONSEQUENTIAL DAMAGES, WITH RESPECT TO ANY CLAIM ARISING
> > > - * OUT OF OR IN CONNECTION WITH THE USE OF THE SOFTWARE, EVEN
> > > - * IF IT HAS BEEN OR IS HEREAFTER ADVISED OF THE POSSIBILITY OF
> > > - * SUCH DAMAGES.
> > > */
> >
> > This is not the MIT license (as defined by SPDX) - there may not be an
> > SPDX identifier covering this license text.
> >
> > This is at least the second time in your recent patches where you have
> > assumed that a non-GPL license corresponds to a particular SPDX
> > identifier without (apparently) checking.
> >
>
> I was thought of interpolating license tags (heuristic matching) in
> cases like this. In this case, the UoMi license was adapted from
> (and roughly resembled) MIT (hence I thought of MIT variant).

Nope, licenses don't always work that way, sorry.

> Greg, is Richard's comment right? If so, I'll drop this patch.

Yes it is, please ask for all of these to not be applied.

There's a reason that we didn't do all of these in the first big sweep
of the kernel tree, as you are finding out :(

thanks,

greg k-h

2023-06-08 07:02:39

by Bagas Sanjaya

[permalink] [raw]
Subject: Re: [PATCH 8/8] crypto: cts: Convert MIT boilerplate to corresponding SPDX license identifier

On 6/8/23 12:40, Greg Kroah-Hartman wrote:
>> Greg, is Richard's comment right? If so, I'll drop this patch.
>
> Yes it is, please ask for all of these to not be applied.
>

Did you mean this whole series? Other patches have not been reviewed
yet. Maybe Herbert can apply these rest of patches if there is
no objection.

--
An old man doll... just what I always wanted! - Clara


2023-06-08 07:02:43

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 8/8] crypto: cts: Convert MIT boilerplate to corresponding SPDX license identifier

On Thu, Jun 08, 2023 at 01:49:32PM +0700, Bagas Sanjaya wrote:
> On 6/8/23 12:40, Greg Kroah-Hartman wrote:
> >> Greg, is Richard's comment right? If so, I'll drop this patch.
> >
> > Yes it is, please ask for all of these to not be applied.
> >
>
> Did you mean this whole series? Other patches have not been reviewed
> yet. Maybe Herbert can apply these rest of patches if there is
> no objection.

Based on the review of these, I would drop them all until you can get a
review from someone with lots of license experience to add their
reviewed-by to them.

thanks,

greg k-h

2023-06-08 08:45:59

by Ard Biesheuvel

[permalink] [raw]
Subject: Re: [PATCH 1/8] crypto: Convert dual BSD 3-Clause/GPL 2.0 boilerplate to SPDX identifier

On Wed, 7 Jun 2023 at 16:38, Richard Fontana <[email protected]> wrote:
>
> On Wed, Jun 7, 2023 at 1:42 AM Bagas Sanjaya <[email protected]> wrote:
> >
> > Replace license boilerplate for dual BSD-3-Clause/GPL 2.0 (only or
> > later) with corresponding SPDX license identifier.
>
> This is at least the fourth or fifth time (I'm losing track) where you
> have incorrectly assumed a particular non-GPL license text matches a
> particular SPDX identifier without (apparently) checking.
>

What exactly does 'checking' entail here? There is no guidance in
Documentation/process/license-rules.rst on how to perform this
comparison.

Also, checkpatch now complains about missing SPDX identifiers, which
is what triggered this effort. Should it stop doing that?

> Bagas, I urge that you learn more about the nature of SPDX identifiers
> before submitting any further patches at least involving replacement
> of non-GPL notices with SPDX identifiers. For this unprecedented
> license notice replacement initiative to have any legitimacy it must
> attempt to apply SPDX identifiers correctly.
>

Since we're in language pedantic mode: it must do more than attempt,
it must apply them correctly, period.

Arguably, this is an 'attempt to apply SPDX identifiers correctly' on
Bagas's part, which apparently falls short (and I may be guilty of the
same for some arch crypto code)

So what is the ambition here: do we just leave the ambiguous ones as-is?

2023-06-08 09:25:32

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 1/8] crypto: Convert dual BSD 3-Clause/GPL 2.0 boilerplate to SPDX identifier

On Thu, Jun 08, 2023 at 10:37:33AM +0200, Ard Biesheuvel wrote:
> On Wed, 7 Jun 2023 at 16:38, Richard Fontana <[email protected]> wrote:
> >
> > On Wed, Jun 7, 2023 at 1:42 AM Bagas Sanjaya <[email protected]> wrote:
> > >
> > > Replace license boilerplate for dual BSD-3-Clause/GPL 2.0 (only or
> > > later) with corresponding SPDX license identifier.
> >
> > This is at least the fourth or fifth time (I'm losing track) where you
> > have incorrectly assumed a particular non-GPL license text matches a
> > particular SPDX identifier without (apparently) checking.
> >
>
> What exactly does 'checking' entail here? There is no guidance in
> Documentation/process/license-rules.rst on how to perform this
> comparison.
>
> Also, checkpatch now complains about missing SPDX identifiers, which
> is what triggered this effort. Should it stop doing that?
>
> > Bagas, I urge that you learn more about the nature of SPDX identifiers
> > before submitting any further patches at least involving replacement
> > of non-GPL notices with SPDX identifiers. For this unprecedented
> > license notice replacement initiative to have any legitimacy it must
> > attempt to apply SPDX identifiers correctly.
> >
>
> Since we're in language pedantic mode: it must do more than attempt,
> it must apply them correctly, period.
>
> Arguably, this is an 'attempt to apply SPDX identifiers correctly' on
> Bagas's part, which apparently falls short (and I may be guilty of the
> same for some arch crypto code)
>
> So what is the ambition here: do we just leave the ambiguous ones as-is?

I recommend yes, leave them as-is until the legal people who actually
care about having SPDX lines in all of the files take the time to do the
work to resolve these issues.

Remember, they are the ones asking for it, no need for us to do their
work for them :)

thanks,

greg k-h

2023-06-08 09:26:59

by Ard Biesheuvel

[permalink] [raw]
Subject: Re: [PATCH 1/8] crypto: Convert dual BSD 3-Clause/GPL 2.0 boilerplate to SPDX identifier

On Thu, 8 Jun 2023 at 11:05, Greg Kroah-Hartman
<[email protected]> wrote:
>
> On Thu, Jun 08, 2023 at 10:37:33AM +0200, Ard Biesheuvel wrote:
> > On Wed, 7 Jun 2023 at 16:38, Richard Fontana <[email protected]> wrote:
> > >
> > > On Wed, Jun 7, 2023 at 1:42 AM Bagas Sanjaya <[email protected]> wrote:
> > > >
> > > > Replace license boilerplate for dual BSD-3-Clause/GPL 2.0 (only or
> > > > later) with corresponding SPDX license identifier.
> > >
> > > This is at least the fourth or fifth time (I'm losing track) where you
> > > have incorrectly assumed a particular non-GPL license text matches a
> > > particular SPDX identifier without (apparently) checking.
> > >
> >
> > What exactly does 'checking' entail here? There is no guidance in
> > Documentation/process/license-rules.rst on how to perform this
> > comparison.
> >
> > Also, checkpatch now complains about missing SPDX identifiers, which
> > is what triggered this effort. Should it stop doing that?
> >
> > > Bagas, I urge that you learn more about the nature of SPDX identifiers
> > > before submitting any further patches at least involving replacement
> > > of non-GPL notices with SPDX identifiers. For this unprecedented
> > > license notice replacement initiative to have any legitimacy it must
> > > attempt to apply SPDX identifiers correctly.
> > >
> >
> > Since we're in language pedantic mode: it must do more than attempt,
> > it must apply them correctly, period.
> >
> > Arguably, this is an 'attempt to apply SPDX identifiers correctly' on
> > Bagas's part, which apparently falls short (and I may be guilty of the
> > same for some arch crypto code)
> >
> > So what is the ambition here: do we just leave the ambiguous ones as-is?
>
> I recommend yes, leave them as-is until the legal people who actually
> care about having SPDX lines in all of the files take the time to do the
> work to resolve these issues.
>
> Remember, they are the ones asking for it, no need for us to do their
> work for them :)
>

Good point.

2023-06-08 11:24:40

by Dan Carpenter

[permalink] [raw]
Subject: Re: [PATCH 8/8] crypto: cts: Convert MIT boilerplate to corresponding SPDX license identifier

On Thu, Jun 08, 2023 at 12:32:34PM +0700, Bagas Sanjaya wrote:
> On Wed, Jun 07, 2023 at 09:47:33AM -0400, Richard Fontana wrote:
>
> Greg, is Richard's comment right? If so, I'll drop this patch.

Heh.

Richard is the only person on thread who is a Lawyer with a Wikipedia
page. https://en.wikipedia.org/wiki/Richard_Fontana Let's just assume
everything he says is 100% correct.

regards,
dan carpenter