All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nick Alcock <nick.alcock@oracle.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Conor Dooley <conor@kernel.org>,
	mcgrof@kernel.org, linux-modules@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH 8/8] kbuild, PCI: microchip: comment out MODULE_LICENSE in non-modules
Date: Mon, 13 Feb 2023 16:13:00 +0000	[thread overview]
Message-ID: <87k00ly25v.fsf@esperi.org.uk> (raw)
In-Reply-To: <Y+kx3fb2Lzlg+u5+@unreal> (Leon Romanovsky's message of "Sun, 12 Feb 2023 20:37:17 +0200")

[Modified resend: my MTA claimed not to send it but then sent it to some
 recipients anyway, and then I was asked not to do some of the things
 I'd offered after I sent it.]

On 12 Feb 2023, Leon Romanovsky told this:

> On Fri, Feb 10, 2023 at 08:10:43PM +0000, Conor Dooley wrote:
>> On Fri, Feb 10, 2023 at 07:26:38PM +0000, Nick Alcock wrote:
>> > On 10 Feb 2023, Conor Dooley said:
>> > > FYI $subject seems wrong, this is a PCI patch AFAICT.
>
> <...>
>
>> > kbuild is present in every patch in the series because this is a
>> > kbuild-driven change (the thing it disturbs is part of the build system,
>> > the construction of modules.builtin*). This seems to be common practice
>> > for kbuild-related treewide changes.
>> 
>> Okay, I'll take your word for it. It just looked/looks odd to me!
>
> It looks odd to me too. Please add SPDX tag in modules which don't have
> it already, instead of commenting code.

Alas... nearly all of them *do* have it already, and in most cases it is
different. Usually not *very* different, but different. In most cases it
is more specific, e.g. drivers/soc/fujitsu/a64fx-diag.c, where we have
MODULE_LICENSE("GPL") but SPDX says it's GPL-2.0-only, but then there
are things like lib/packing.c, which throughout its history in the tree
has combined // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
and MODULE_LICENSE("GPL v2"); which are just not the same thing.

I commented the MODULE_LICENSEs out specifically because I wanted to
avoid getting into hundreds of simultaneous license flamewars while
trying to get *a different thing entirely* into the kernel (kallmodsyms,
which depends on modules.builtin.objs being correct).

I still don't want to get into hundreds of simultaneous license
flamewars or get my employer into legal hot water, so I think I'll leave
things commented out and let individual maintainers decide whether they
want to reconcile any contradictory info that may exist or not (and as
noted *most* of these are conflicting.)


This email is the closest thing I have to indicating what Luis would
prefer (and the only reason I'm doing this is because I need it before
Luis's modules.builtin.objs change can work):

<https://lore.kernel.org/linux-modules/Y5AgMuMu75gne6Ka@bombadil.infradead.org/>

Yes, Luis thinks we can just use SPDX, but given that they are usually
different, making such a change seems well beyond my pay grade. Even in
the PCI domain, we see (second column, MODULE_LICENSE: third: SPDX,
sorry about the line lengths).

drivers/pci/controller/dwc/pcie-histb.c:		GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/controller/mobiveil/pcie-mobiveil-plat.c:	GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/controller/pci-tegra.c: 			GPL		// SPDX-License-Identifier: GPL-2.0+
drivers/pci/controller/pci-versatile.c:			GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/controller/pcie-hisi-error.c:		GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/controller/pcie-microchip-host.c:		GPL		// SPDX-License-Identifier: GPL-2.0
drivers/pci/endpoint/pci-ep-cfs.c:			GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/endpoint/pci-epc-core.c:			GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/endpoint/pci-epc-mem.c:			GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/endpoint/pci-epf-core.c:			GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/hotplug/acpiphp_core.c:			GPL		// SPDX-License-Identifier: GPL-2.0+
drivers/pci/hotplug/shpchp_core.c:			GPL		// SPDX-License-Identifier: GPL-2.0+

Not much in the way of consistency here: GPL sometimes means 2.0+ but
sometimes it means 2.0. GPL v2 appears to consistently mean GPL-2.0, but
if you look at other affected modules you soon see inconsistency:

drivers/powercap/powercap_sys.c: GPL v2		// SPDX-License-Identifier: GPL-2.0-only
drivers/firmware/imx/imx-scu.c: GPL v2		// SPDX-License-Identifier: GPL-2.0+
arch/x86/crypto/blake2s-glue.c: GPL v2		// SPDX-License-Identifier: GPL-2.0 OR MIT
drivers/iommu/sun50i-iommu.c: Dual BSD/GPL	// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

We even have

drivers/gpu/drm/drm_mipi_dsi.c: "GPL and additional rights" (header is
non-SPDX -- a BSD license header with advertising clause!)

So SPDX is usually more precise than the MODULE_LICENSE, but is it more
*accurate*? I have no idea, and I don't see how I could possibly know:
going by the presence of advertising clauses that obviously nobody is
obeying it doesn't seem like we can trust header comments to be any more
accurate than MODULE_LICENSE. Best to just leave both in (and comment it
out so it has no side-effects on the build any more, which is all I'm
after).

-- 
NULL && (void)

WARNING: multiple messages have this Message-ID (diff)
From: Nick Alcock <nick.alcock@oracle.com>
To: Leon Romanovsky <leon@kernel.org>
Cc: Conor Dooley <conor@kernel.org>,
	mcgrof@kernel.org, linux-modules@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
	linux-riscv@lists.infradead.org
Subject: Re: [PATCH 8/8] kbuild, PCI: microchip: comment out MODULE_LICENSE in non-modules
Date: Mon, 13 Feb 2023 16:13:00 +0000	[thread overview]
Message-ID: <87k00ly25v.fsf@esperi.org.uk> (raw)
In-Reply-To: <Y+kx3fb2Lzlg+u5+@unreal> (Leon Romanovsky's message of "Sun, 12 Feb 2023 20:37:17 +0200")

[Modified resend: my MTA claimed not to send it but then sent it to some
 recipients anyway, and then I was asked not to do some of the things
 I'd offered after I sent it.]

On 12 Feb 2023, Leon Romanovsky told this:

> On Fri, Feb 10, 2023 at 08:10:43PM +0000, Conor Dooley wrote:
>> On Fri, Feb 10, 2023 at 07:26:38PM +0000, Nick Alcock wrote:
>> > On 10 Feb 2023, Conor Dooley said:
>> > > FYI $subject seems wrong, this is a PCI patch AFAICT.
>
> <...>
>
>> > kbuild is present in every patch in the series because this is a
>> > kbuild-driven change (the thing it disturbs is part of the build system,
>> > the construction of modules.builtin*). This seems to be common practice
>> > for kbuild-related treewide changes.
>> 
>> Okay, I'll take your word for it. It just looked/looks odd to me!
>
> It looks odd to me too. Please add SPDX tag in modules which don't have
> it already, instead of commenting code.

Alas... nearly all of them *do* have it already, and in most cases it is
different. Usually not *very* different, but different. In most cases it
is more specific, e.g. drivers/soc/fujitsu/a64fx-diag.c, where we have
MODULE_LICENSE("GPL") but SPDX says it's GPL-2.0-only, but then there
are things like lib/packing.c, which throughout its history in the tree
has combined // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
and MODULE_LICENSE("GPL v2"); which are just not the same thing.

I commented the MODULE_LICENSEs out specifically because I wanted to
avoid getting into hundreds of simultaneous license flamewars while
trying to get *a different thing entirely* into the kernel (kallmodsyms,
which depends on modules.builtin.objs being correct).

I still don't want to get into hundreds of simultaneous license
flamewars or get my employer into legal hot water, so I think I'll leave
things commented out and let individual maintainers decide whether they
want to reconcile any contradictory info that may exist or not (and as
noted *most* of these are conflicting.)


This email is the closest thing I have to indicating what Luis would
prefer (and the only reason I'm doing this is because I need it before
Luis's modules.builtin.objs change can work):

<https://lore.kernel.org/linux-modules/Y5AgMuMu75gne6Ka@bombadil.infradead.org/>

Yes, Luis thinks we can just use SPDX, but given that they are usually
different, making such a change seems well beyond my pay grade. Even in
the PCI domain, we see (second column, MODULE_LICENSE: third: SPDX,
sorry about the line lengths).

drivers/pci/controller/dwc/pcie-histb.c:		GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/controller/mobiveil/pcie-mobiveil-plat.c:	GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/controller/pci-tegra.c: 			GPL		// SPDX-License-Identifier: GPL-2.0+
drivers/pci/controller/pci-versatile.c:			GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/controller/pcie-hisi-error.c:		GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/controller/pcie-microchip-host.c:		GPL		// SPDX-License-Identifier: GPL-2.0
drivers/pci/endpoint/pci-ep-cfs.c:			GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/endpoint/pci-epc-core.c:			GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/endpoint/pci-epc-mem.c:			GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/endpoint/pci-epf-core.c:			GPL v2		// SPDX-License-Identifier: GPL-2.0
drivers/pci/hotplug/acpiphp_core.c:			GPL		// SPDX-License-Identifier: GPL-2.0+
drivers/pci/hotplug/shpchp_core.c:			GPL		// SPDX-License-Identifier: GPL-2.0+

Not much in the way of consistency here: GPL sometimes means 2.0+ but
sometimes it means 2.0. GPL v2 appears to consistently mean GPL-2.0, but
if you look at other affected modules you soon see inconsistency:

drivers/powercap/powercap_sys.c: GPL v2		// SPDX-License-Identifier: GPL-2.0-only
drivers/firmware/imx/imx-scu.c: GPL v2		// SPDX-License-Identifier: GPL-2.0+
arch/x86/crypto/blake2s-glue.c: GPL v2		// SPDX-License-Identifier: GPL-2.0 OR MIT
drivers/iommu/sun50i-iommu.c: Dual BSD/GPL	// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

We even have

drivers/gpu/drm/drm_mipi_dsi.c: "GPL and additional rights" (header is
non-SPDX -- a BSD license header with advertising clause!)

So SPDX is usually more precise than the MODULE_LICENSE, but is it more
*accurate*? I have no idea, and I don't see how I could possibly know:
going by the presence of advertising clauses that obviously nobody is
obeying it doesn't seem like we can trust header comments to be any more
accurate than MODULE_LICENSE. Best to just leave both in (and comment it
out so it has no side-effects on the build any more, which is all I'm
after).

-- 
NULL && (void)

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2023-02-13 16:13 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-10 16:47 [PATCH 0/8] MODULE_LICENSE removals, first tranche Nick Alcock
2023-02-10 16:47 ` [PATCH 1/8] kbuild, PCI: generic,versatile: comment out MODULE_LICENSE in non-modules Nick Alcock
2023-02-10 16:47   ` Nick Alcock
2023-02-10 17:36   ` Rob Herring
2023-02-10 17:36     ` Rob Herring
2023-02-10 18:43     ` Nick Alcock
2023-02-10 18:43       ` Nick Alcock
2023-02-13 22:57   ` Bjorn Helgaas
2023-02-13 22:57     ` Bjorn Helgaas
2023-02-14 15:41     ` Nick Alcock
2023-02-14 15:41       ` Nick Alcock
2023-02-14 17:20       ` Bjorn Helgaas
2023-02-14 17:20         ` Bjorn Helgaas
2023-02-16 13:34         ` Nick Alcock
2023-02-16 13:34           ` Nick Alcock
2023-02-10 16:47 ` [PATCH 2/8] kbuild, PCI: mobiveil: " Nick Alcock
2023-02-10 16:47 ` [PATCH 3/8] kbuild, ARM: tegra: " Nick Alcock
2023-02-10 16:47 ` [PATCH 4/8] kbuild, PCI: endpoint: " Nick Alcock
2023-02-10 16:47 ` [PATCH 5/8] kbuild, PCI: hip: " Nick Alcock
2023-02-10 16:47 ` [PATCH 6/8] kbuild, shpchp: " Nick Alcock
2023-02-10 16:47 ` [PATCH 7/8] kbuild, PCI: dwc: histb: " Nick Alcock
2023-02-10 16:47 ` [PATCH 8/8] kbuild, PCI: microchip: " Nick Alcock
2023-02-10 16:47   ` Nick Alcock
2023-02-10 18:27   ` Conor Dooley
2023-02-10 18:27     ` Conor Dooley
2023-02-10 19:26     ` Nick Alcock
2023-02-10 19:26       ` Nick Alcock
2023-02-10 20:10       ` Conor Dooley
2023-02-10 20:10         ` Conor Dooley
2023-02-12 18:37         ` Leon Romanovsky
2023-02-12 18:37           ` Leon Romanovsky
2023-02-12 19:52           ` Nick Alcock
2023-02-12 19:52             ` Nick Alcock
2023-02-13 15:53           ` Nick Alcock
2023-02-13 15:53             ` Nick Alcock
2023-02-13 16:13           ` Nick Alcock [this message]
2023-02-13 16:13             ` Nick Alcock
2023-02-13 16:51             ` Conor Dooley
2023-02-13 16:51               ` Conor Dooley
2023-02-13 17:06             ` Leon Romanovsky
2023-02-13 17:06               ` Leon Romanovsky
2023-02-15 19:06               ` Nick Alcock
2023-02-15 19:06                 ` Nick Alcock
2023-02-13 17:30           ` Jonathan Corbet
2023-02-13 17:30             ` Jonathan Corbet
2023-02-13 19:23             ` Leon Romanovsky
2023-02-13 19:23               ` Leon Romanovsky
2023-02-16 12:05               ` Nick Alcock
2023-02-16 12:05                 ` Nick Alcock

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k00ly25v.fsf@esperi.org.uk \
    --to=nick.alcock@oracle.com \
    --cc=conor@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mcgrof@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.