[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 3/3] add SPDX to arch/arm/*.c


  • To: Julien Grall <julien@xxxxxxx>
  • From: Bertrand Marquis <Bertrand.Marquis@xxxxxxx>
  • Date: Tue, 23 Aug 2022 10:23:21 +0000
  • Accept-language: en-GB, en-US
  • Arc-authentication-results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=lists.xenproject.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=armh.onmicrosoft.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com])
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none
  • Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iELuM75mf5iXZmKV0l26/7IKfIF6mJ+HI2LEyuwpRiw=; b=A2pdQ6U/IHJkDJpYaiV+l/oEwdqLpMgvQ/MGVY1RMFbTE0U5Idm0Whkmgb6hH9ThG9YVtUiz0qtIviEYFFKE4MvYxFjLys48spW3xQfMBXf4LEBuz5UU/jRFuXfaI2OVL5AjipZJiuIWr2F28BPAK658CnGt1u+SgvLapIyBDDFbxuq1+02oFsRNgWg3w18NmUTWGsAuJ70guLhH7XBQmZa1ZNsGZPCCVUPfMwTnLmZzqra5bqW+Gjfzut9LCcKTXGW/Us70OnLynF3W1FbDO/i1MmqcRr+yWbbQKTK6LD9asRKMRi0DoviLt7kCbkuI9svhcuIhy9mNw1Xch9GZOg==
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=iELuM75mf5iXZmKV0l26/7IKfIF6mJ+HI2LEyuwpRiw=; b=N6By0VCQJDhWiA8rG6Ho26gmnzdGB5Jtv0v8t3f0rzf+QcjD8S3MSo3G8OloFuQMHzGmdwXY2dJGhxG6dCA0FMiwry/Tl7UmYAom09S9T2soelakf7faG/M3tARIBBXz2ebpfg+6zJGAIRtvYicef33UW+TIoCu5DP3ET5sQv/ALSPQEuZPAySkcz5OlHhLtN4DJa16zXwK/ixvStbhDedtq5HIq7PYMBYqKoGt5V1+8gCvcUNseoUB3Cb+uUZt+TIo6q53sUQRSOc1BH0wNnrBPvjvIwbjXMHmNB63gc57qBKR16aizpLJfgp1j+iauc9RCUpq2G/xg5KHO5EydmA==
  • Arc-seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=FnsbH6e1um8OKDmxHvgHXTRm49Zzj2wKyaC+CK5ciK6s2fXi72grD/ojkBiQDZOEPU05fdExOCOY/Vz/8L/PGshlJOBE6auFJFkSQT8tjIokvzWu6hI3V3qHUaE5LwK6mj9r/RZwfLvco+DtnPblV4yfkReIlVHPecokd5VVmjuZvZS3NL1V2HvoL58QLmao1bT8d39iffJxots3fve8O/gk+Zghh+jraR6YyNOa55AIQGh4kFN/IV4VuZCRCQcQUiBtewQdFpm3qSn2+A83vuMHle/+1+8ka4RbWfIgEwZvQAvicFX+8mBlsgSkLYpV1/XTVHjPM4OGILYltx24EQ==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=hRMo37ccmUsFCR9Gv0oxCytOTiw4RIWVlOHz4dEs+nbEbMOSrnUbLHjvxQ2GBTWPN2AHxmG5TU3A5cVnLsXk+IR4yfJsmumoFbhqaR+EH1a75nvlhiYiCeJQHnby54GomIIL/bI2aJj+BkutWu11mcYPRii+qiz2bOtcWq90OcMFnky8pqiy+zz+lOG7hKZtf/AyctOT9h84N3Y5BsPEuQOLsl0dzMQDTt2D19dFiBebUnn7fqqC9Ncpelg2KWwfsUVtt/Y7sB6Gwu0+4ZcNfwMCLyizE2HWtXSC5sZU6UBrq9E4U307YJuZuw6lpZO8RIBoWxYexnmM917SU76E9w==
  • Authentication-results-original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, "jbeulich@xxxxxxxx" <jbeulich@xxxxxxxx>, "george.dunlap@xxxxxxxxxx" <george.dunlap@xxxxxxxxxx>, "andrew.cooper3@xxxxxxxxxx" <andrew.cooper3@xxxxxxxxxx>, "Volodymyr_Babchuk@xxxxxxxx" <Volodymyr_Babchuk@xxxxxxxx>, "roger.pau@xxxxxxxxxx" <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 23 Aug 2022 10:23:47 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Nodisclaimer: true
  • Original-authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com;
  • Thread-index: AQHYs05lv0KwzVk+1ESH7A+5C12Kg6212p0AgAD71ACAAVN4AIAEJDaA
  • Thread-topic: [PATCH v2 3/3] add SPDX to arch/arm/*.c

Hi Julien,

> On 20 Aug 2022, at 20:08, Julien Grall <julien@xxxxxxx> wrote:
> 
> Hi Stefano,
> 
> On 19/08/2022 23:53, Stefano Stabellini wrote:
>> On Fri, 19 Aug 2022, Julien Grall wrote:
>>> On 18/08/2022 23:03, Stefano Stabellini wrote:
>>>> Add SPDX license information to all the *.c files under arch/arm.
>>> 
>>> There are some of the files below that didn't have copyright. It would be
>>> worth explaining in the commit message which license you selected and how.
>>> AFAICT you assumed they were GPLv2 but I am not sure this is correct at 
>>> least
>>> one of them.
>> My goal is not to change the existing license on any of the files, even
>> if the existing license is imprecise. By what is written under COPYING,
>> everything not explicitly listed is GPL-2.0. I only reflected today's
>> reality. I think it is best if we keep mechanical changes separate from
>> "smart" changes, especially on a series like this introducing many
>> mechanical changes.  More on this at the bottom.
> 
> I will answer to this at the bottom.
> 
>>> [...]
>>> 
>>>> diff --git a/xen/arch/arm/decode.c b/xen/arch/arm/decode.c
>>>> index f5f6562600..2537dbebc1 100644
>>>> --- a/xen/arch/arm/decode.c
>>>> +++ b/xen/arch/arm/decode.c
>>>> @@ -1,3 +1,4 @@
>>>> +/* SPDX-License-Identifier: GPL-2.0-or-later */
>>> 
>>> This license is not part of LICENSES. Was it intended?
>> It is: the tag is described as part of LICENSES/GPL-2.0.
> 
> Ah! I was looking as the list of files and didn't look for the tag. Thanks 
> for the pointer :).
> 
>>> If yes, this should be mentioned in one of the commit message (possible 
>>> patch
>>> #2) and maybe in CONTRIBUTING (to tell user to not use it for new files)
>>> because one could expect all the LICENSES to be listed.
>> It could make sense to say that:
>> /* SPDX-License-Identifier: GPL-2.0 */
>> is recommended for new files.
> 
> So I was reading through xen/COPYING and we already have something like that:
> 
> "Note that the only valid version of the GPL as far as Xen is concerned
> is _this_ particular version of the license (i.e., *only* v2, not v2.2
> or v3.x or whatever), unless explicitly otherwise stated."
> 
> So nothing to add here unless you want to tell the contributor which tag 
> correspond to GPLv2.
> 
>>>>   /*
>>>>    * xen/arch/arm/decode.c
>>>>    *
>>>> @@ -5,16 +6,6 @@
>>>>    *
>>>>    * Julien Grall <julien.grall@xxxxxxxxxx>
>>>>    * Copyright (C) 2013 Linaro Limited.
>>>> - *
>>>> - * 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.
>>>> - *
>>>> - * 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.
>>>>    */
>>>>     #include <xen/guest_access.h>
>>> 
>>> [...]
>>> 
>>>> diff --git a/xen/arch/arm/domain_build.c b/xen/arch/arm/domain_build.c
>>>> index 3fd1186b53..b29bdf3aa6 100644
>>>> --- a/xen/arch/arm/domain_build.c
>>>> +++ b/xen/arch/arm/domain_build.c
>>>> @@ -1,3 +1,4 @@
>>>> +/* SPDX-License-Identifier: GPL-2.0 */
>>> 
>>> AFAIU, the assumption is all the files with no copyright are GPLv2. That 
>>> works
>>> here. But ...
>>> 
>>>>   #include <xen/init.h>
>>>>   #include <xen/compile.h>
>>>>   #include <xen/lib.h>
>>>> diff --git a/xen/arch/arm/domain_page.c b/xen/arch/arm/domain_page.c
>>>> index 71182575f9..47405e0866 100644
>>>> --- a/xen/arch/arm/domain_page.c
>>>> +++ b/xen/arch/arm/domain_page.c
>>>> @@ -1,3 +1,4 @@
>>>> +/* SPDX-License-Identifier: GPL-2.0 */
>>> 
>>> .... this file was split from mm.c which is gpl-2.0-or-later. So I don't 
>>> think
>>> we can use GPL-2.0 here.
>> Well spotted! Effectively this file is now declared as GPL 2.0 only,
>> given what is stated in COPYING. The code in domain_page has lost "or
>> later" with the loss of the copyright header.
> 
> Yes. This was an oversight from me when I split the code a few weeks ago.
> 
>> So if there were new contributions to this file after its creation, they
>> would have been GPL-2.0 only contributions, and it would have been
>> impossible to go back to GPL-2.0-or-later without asking the copyright
>> owners of the new changes.
>> In this case thankfully there are no new contributions since the split
>> of the file, so I can fix it by using the SPDX GPL-2.0-or-later tag
>> without problems. I'll do it in the next version of the series.
>> Xen is not saying: "if there is no copyright header it might be GPLv2
>> but you need to look it up". Xen is actively saying: "if there is no
>> copyright header it is GPLv2". Not up for discussion. Given that as a
>> whole Xen is GPLv2, the only possibility is that the file without a
>> copyright header used to be:
>> - GPLv2 or later
>> - dual license GPL and another compatible license (e.g. BSD)
>> Either way, with the loss of the copyright header, the file becomes
>> immediately GPLv2 only.
>> Does it make sense?
>> This is why I think it is best to keep copyright discussions out of the
>> SPDX patches review and limit ourselves to mechanical changes.
> 
> Yes I agree this series should be mechanical (baring the file that is contain 
> GPLv2+ code).
> 
> I am putting some thoughts below (they can be split in a separate thread if 
> you prefer).
> 
> This is not the first time this topic is brought up and probably not the last 
> as long as we have file using GPLv2+.
> 
> IIRC from past discussion there are two broads concern with GPLv2+:
>  - We are leaving the choice of which license applies to the person copying 
> the code. So if a new version is released that is less favorable to the 
> initial contributor, then we have no leverage.
>  - Some companies are rather cautious to contribute code that my be licensed 
> under GPLv3 (would be allowed with GPLv2+).
> 
> The later is particularly a problem because not many people realize that a 
> fair part of Xen on Arm is GPLv2+. I never really understood why we chose 
> that (this was before my time) but this got spread as the existing copyright 
> was added to a new file. Admittely, the contributor should be more cautious. 
> But I would not say this is trivial to spot the difference.
> 
> I would like to consider to re-license all the GPLv2+ files to GPLv2. AFAIU, 
> this would mean we would need to ask the permission for every comapany that 
> contributed to the file. Do you know if this was done before in Xen Project?

If I am understanding right, GPLv2+ means that someone could relicense the 
files to GPLv3 if he wants which is more restrictive.
Why do you want to move those back to GPLv2 ?

Cheers
Bertrand

> 
> Cheers,
> 
> -- 
> Julien Grall




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.