2018-11-09 15:10:15

by Borislav Petkov

[permalink] [raw]
Subject: [PATCH 0/4] Add SPDX identifiers to some more files

From: Borislav Petkov <[email protected]>

Hi,

here's some more files converted to SPDX identifiers.

In the MCE and microcode cases, I've made one patch per subsystem as
this is shared functionality so maybe splitting them even more would not
make any sense.

But I could be wrong and the lawyer logic could very well work in a
completely different way so I'm open to suggestions here.

Thanks.

Borislav Petkov (4):
EDAC, mce_amd: Add an SPDX identifier
EDAC, amd64: Add SPDX identifiers
x86/microcode: Add SPDX license identifiers
x86/mce: Add an SPDX license identifiers

arch/x86/kernel/cpu/mcheck/dev-mcelog.c | 1 +
arch/x86/kernel/cpu/mcheck/mce-apei.c | 14 +-------------
arch/x86/kernel/cpu/mcheck/mce-genpool.c | 3 +--
arch/x86/kernel/cpu/mcheck/mce-inject.c | 9 +--------
arch/x86/kernel/cpu/mcheck/mce-severity.c | 6 +-----
arch/x86/kernel/cpu/mcheck/mce.c | 1 +
arch/x86/kernel/cpu/mcheck/therm_throt.c | 1 +
arch/x86/kernel/cpu/microcode/amd.c | 4 +---
arch/x86/kernel/cpu/microcode/core.c | 6 +-----
arch/x86/kernel/cpu/microcode/intel.c | 6 +-----
drivers/edac/amd64_edac.c | 1 +
drivers/edac/amd64_edac.h | 4 +---
drivers/edac/mce_amd.c | 1 +
13 files changed, 13 insertions(+), 44 deletions(-)

--
2.19.1



2018-11-09 15:07:00

by Borislav Petkov

[permalink] [raw]
Subject: [PATCH 4/4] x86/mce: Add an SPDX license identifiers

From: Borislav Petkov <[email protected]>

Add the SPDX tag and remove the GPL-v2 free text.

Signed-off-by: Borislav Petkov <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: <[email protected]>
Cc: Huang Ying <[email protected]>
Cc: Tom Lendacky <[email protected]>
Cc: Tony Luck <[email protected]>
---
arch/x86/kernel/cpu/mcheck/dev-mcelog.c | 1 +
arch/x86/kernel/cpu/mcheck/mce-apei.c | 14 +-------------
arch/x86/kernel/cpu/mcheck/mce-genpool.c | 3 +--
arch/x86/kernel/cpu/mcheck/mce-inject.c | 9 +--------
arch/x86/kernel/cpu/mcheck/mce-severity.c | 6 +-----
arch/x86/kernel/cpu/mcheck/mce.c | 1 +
arch/x86/kernel/cpu/mcheck/therm_throt.c | 1 +
7 files changed, 7 insertions(+), 28 deletions(-)

diff --git a/arch/x86/kernel/cpu/mcheck/dev-mcelog.c b/arch/x86/kernel/cpu/mcheck/dev-mcelog.c
index 27f394ac983f..11e521799b1d 100644
--- a/arch/x86/kernel/cpu/mcheck/dev-mcelog.c
+++ b/arch/x86/kernel/cpu/mcheck/dev-mcelog.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* /dev/mcelog driver
*
diff --git a/arch/x86/kernel/cpu/mcheck/mce-apei.c b/arch/x86/kernel/cpu/mcheck/mce-apei.c
index 2eee85379689..992c7e599d0b 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-apei.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-apei.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Bridge between MCE and APEI
*
@@ -13,19 +14,6 @@
*
* Copyright 2010 Intel Corp.
* Author: Huang Ying <[email protected]>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License version
- * 2 as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that 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
*/

#include <linux/export.h>
diff --git a/arch/x86/kernel/cpu/mcheck/mce-genpool.c b/arch/x86/kernel/cpu/mcheck/mce-genpool.c
index 217cd4449bc9..f59996563e96 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-genpool.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-genpool.c
@@ -1,10 +1,9 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* MCE event pool management in MCE context
*
* Copyright (C) 2015 Intel Corp.
* Author: Chen, Gong <[email protected]>
- *
- * This file is licensed under GPLv2.
*/
#include <linux/smp.h>
#include <linux/mm.h>
diff --git a/arch/x86/kernel/cpu/mcheck/mce-inject.c b/arch/x86/kernel/cpu/mcheck/mce-inject.c
index 1fc424c40a31..e33ca8ac74a0 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-inject.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-inject.c
@@ -1,12 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Machine check injection support.
* Copyright 2008 Intel Corporation.
*
- * 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; version 2
- * of the License.
- *
* Authors:
* Andi Kleen
* Ying Huang
@@ -16,9 +12,6 @@
* built as module so that it can be loaded on production kernels for
* testing purposes.
*
- * This file may be distributed under the terms of the GNU General Public
- * License version 2.
- *
* Copyright (c) 2010-17: Borislav Petkov <[email protected]>
* Advanced Micro Devices Inc.
*/
diff --git a/arch/x86/kernel/cpu/mcheck/mce-severity.c b/arch/x86/kernel/cpu/mcheck/mce-severity.c
index 44396d521987..be9bf3d0c6db 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-severity.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-severity.c
@@ -1,12 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* MCE grading rules.
* Copyright 2008, 2009 Intel Corporation.
*
- * 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; version 2
- * of the License.
- *
* Author: Andi Kleen
*/
#include <linux/kernel.h>
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index 8c66d2fc8f81..20d14aa36a73 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Machine check handler.
*
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index 2da67b70ba98..0d3f6b6a5739 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* Thermal throttle event support code (such as syslog messaging and rate
* limiting) that was factored out from x86_64 (mce_intel.c) and i386 (p4.c).
--
2.19.1


2018-11-09 15:09:39

by Borislav Petkov

[permalink] [raw]
Subject: [PATCH 3/4] x86/microcode: Add SPDX license identifiers

From: Borislav Petkov <[email protected]>

... and drop the GPL v2 license free text.

Signed-off-by: Borislav Petkov <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: "H Peter Anvin" <[email protected]>
Cc: Shaohua Li <[email protected]>
Cc: Tigran Aivazian <[email protected]>
Cc: Tom Lendacky <[email protected]>
---
arch/x86/kernel/cpu/microcode/amd.c | 4 +---
arch/x86/kernel/cpu/microcode/core.c | 6 +-----
arch/x86/kernel/cpu/microcode/intel.c | 6 +-----
3 files changed, 3 insertions(+), 13 deletions(-)

diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
index 07b5fc00b188..a1b02f2f0697 100644
--- a/arch/x86/kernel/cpu/microcode/amd.c
+++ b/arch/x86/kernel/cpu/microcode/amd.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
/*
* AMD CPU Microcode Update Driver for Linux
*
@@ -17,9 +18,6 @@
*
* Author: Jacob Shin <[email protected]>
* Fixes: Borislav Petkov <[email protected]>
- *
- * Licensed under the terms of the GNU General Public
- * License version 2. See file COPYING for details.
*/
#define pr_fmt(fmt) "microcode: " fmt

diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
index 2637ff09d6a0..b126180c15db 100644
--- a/arch/x86/kernel/cpu/microcode/core.c
+++ b/arch/x86/kernel/cpu/microcode/core.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* CPU Microcode Update Driver for Linux
*
@@ -12,11 +13,6 @@
* (C) 2015 Borislav Petkov <[email protected]>
*
* This driver allows to upgrade microcode on x86 processors.
- *
- * 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.
*/

#define pr_fmt(fmt) "microcode: " fmt
diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
index 16936a24795c..e199d3140be0 100644
--- a/arch/x86/kernel/cpu/microcode/intel.c
+++ b/arch/x86/kernel/cpu/microcode/intel.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0+
/*
* Intel CPU Microcode Update Driver for Linux
*
@@ -8,11 +9,6 @@
*
* Copyright (C) 2012 Fenghua Yu <[email protected]>
* H Peter Anvin" <[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.
*/

/*
--
2.19.1


2018-11-09 15:10:09

by Borislav Petkov

[permalink] [raw]
Subject: [PATCH 2/4] EDAC, amd64: Add SPDX identifiers

From: Borislav Petkov <[email protected]>

While the license of these files can be deduced by the MODULE_LICENSE()
information, each source file should contain a SPDX identifier. Module
license 'GPL' is equivalent to GPL v2 only, i.e. the kernel license. Add
the corresponding SPDX identifier.

Signed-off-by: Borislav Petkov <[email protected]>
Cc: Tom Lendacky <[email protected]>
Cc: Doug Thompson <[email protected]>
Cc: Doug Thompson <[email protected]>
---
drivers/edac/amd64_edac.c | 1 +
drivers/edac/amd64_edac.h | 4 +---
2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 6ea98575a402..cece79f4ef8d 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
#include "amd64_edac.h"
#include <asm/amd_nb.h>

diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index 4242f8e39c18..7f1b0cf40663 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -1,11 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 */
/*
* AMD64 class Memory Controller kernel module
*
* Copyright (c) 2009 SoftwareBitMaker.
* Copyright (c) 2009-15 Advanced Micro Devices, Inc.
- *
- * This file may be distributed under the terms of the
- * GNU General Public License.
*/

#include <linux/module.h>
--
2.19.1


2018-11-09 15:12:08

by Borislav Petkov

[permalink] [raw]
Subject: [PATCH 1/4] EDAC, mce_amd: Add an SPDX identifier

From: Borislav Petkov <[email protected]>

While the license of this file can be deduced by the MODULE_LICENSE()
information, each source file should contain a SPDX identifier. Module
license 'GPL' is equivalent to GPL v2 only, i.e. the kernel license. Add
the corresponding SPDX identifier.

Signed-off-by: Borislav Petkov <[email protected]>
Cc: Tom Lendacky <[email protected]>
---
drivers/edac/mce_amd.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index c605089d899f..5ea07c16113a 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0
#include <linux/module.h>
#include <linux/slab.h>

--
2.19.1


2018-11-09 15:39:18

by Tigran Aivazian

[permalink] [raw]
Subject: Re: [PATCH 3/4] x86/microcode: Add SPDX license identifiers

Hi Borislav,

Ok, that's fine. I noticed these things when changing BFS code a
couple of days ago and wondered what they were --- now I know :)

Kind regards,
Tigran
On Fri, 9 Nov 2018 at 15:04, Borislav Petkov <[email protected]> wrote:
>
> From: Borislav Petkov <[email protected]>
>
> ... and drop the GPL v2 license free text.
>
> Signed-off-by: Borislav Petkov <[email protected]>
> Cc: Fenghua Yu <[email protected]>
> Cc: "H Peter Anvin" <[email protected]>
> Cc: Shaohua Li <[email protected]>
> Cc: Tigran Aivazian <[email protected]>
> Cc: Tom Lendacky <[email protected]>
> ---
> arch/x86/kernel/cpu/microcode/amd.c | 4 +---
> arch/x86/kernel/cpu/microcode/core.c | 6 +-----
> arch/x86/kernel/cpu/microcode/intel.c | 6 +-----
> 3 files changed, 3 insertions(+), 13 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/microcode/amd.c b/arch/x86/kernel/cpu/microcode/amd.c
> index 07b5fc00b188..a1b02f2f0697 100644
> --- a/arch/x86/kernel/cpu/microcode/amd.c
> +++ b/arch/x86/kernel/cpu/microcode/amd.c
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0
> /*
> * AMD CPU Microcode Update Driver for Linux
> *
> @@ -17,9 +18,6 @@
> *
> * Author: Jacob Shin <[email protected]>
> * Fixes: Borislav Petkov <[email protected]>
> - *
> - * Licensed under the terms of the GNU General Public
> - * License version 2. See file COPYING for details.
> */
> #define pr_fmt(fmt) "microcode: " fmt
>
> diff --git a/arch/x86/kernel/cpu/microcode/core.c b/arch/x86/kernel/cpu/microcode/core.c
> index 2637ff09d6a0..b126180c15db 100644
> --- a/arch/x86/kernel/cpu/microcode/core.c
> +++ b/arch/x86/kernel/cpu/microcode/core.c
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0+
> /*
> * CPU Microcode Update Driver for Linux
> *
> @@ -12,11 +13,6 @@
> * (C) 2015 Borislav Petkov <[email protected]>
> *
> * This driver allows to upgrade microcode on x86 processors.
> - *
> - * 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.
> */
>
> #define pr_fmt(fmt) "microcode: " fmt
> diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c
> index 16936a24795c..e199d3140be0 100644
> --- a/arch/x86/kernel/cpu/microcode/intel.c
> +++ b/arch/x86/kernel/cpu/microcode/intel.c
> @@ -1,3 +1,4 @@
> +// SPDX-License-Identifier: GPL-2.0+
> /*
> * Intel CPU Microcode Update Driver for Linux
> *
> @@ -8,11 +9,6 @@
> *
> * Copyright (C) 2012 Fenghua Yu <[email protected]>
> * H Peter Anvin" <[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.
> */
>
> /*
> --
> 2.19.1
>

2018-11-09 17:08:58

by Borislav Petkov

[permalink] [raw]
Subject: Re: [PATCH 3/4] x86/microcode: Add SPDX license identifiers

On Fri, Nov 09, 2018 at 03:34:16PM +0000, Tigran Aivazian wrote:
> Ok, that's fine. I noticed these things when changing BFS code a
> couple of days ago and wondered what they were --- now I know :)

Thx.

For more info, see

https://www.kernel.org/doc/html/latest/process/license-rules.html

Doc is pretty nice and should explain everything.

--
Regards/Gruss,
Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.