lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAFGhKbyJheVH-qrh3jYfWyTjSzFeY2yUJGYuscqLQf+SsvEzqA@mail.gmail.com>
Date:   Mon, 13 Nov 2017 11:04:24 +0100
From:   Charlemagne Lasse <charlemagnelasse@...il.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     LKML <linux-kernel@...r.kernel.org>,
        Linus Torvalds <torvalds@...uxfoundation.org>,
        Andrew Morton <akpm@...uxfoundation.org>,
        Jonathan Corbet <corbet@....net>,
        Kate Stewart <kate@...uxfoundation.org>,
        Philippe Ombredanne <pombredanne@...b.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Christoph Hellwig <hch@....de>,
        Russell King <rmk+kernel@...linux.org.uk>,
        Rob Herring <rob.herring@...aro.org>,
        Jonas Oberg <jonas@...e.org>, Joe Perches <joe@...ches.com>,
        linux-xfs@...r.kernel.org,
        Kate Stewart <kstewart@...uxfoundation.org>,
        Carmen Bianca Bakker <carmenbianca@...e.org>
Subject: Re: [1/7] Documentation: Add license-rules.rst to describe how to
 properly identify file licenses

Hi,

Looks like this superseeds my patches

- https://patchwork.kernel.org/patch/10054727/
- https://patchwork.kernel.org/patch/10054719/
- https://patchwork.kernel.org/patch/10054721/
- https://patchwork.kernel.org/patch/10054725/
- https://patchwork.kernel.org/patch/10054723/


> +License identifier syntax
> +-------------------------
> +
> +The SPDX license identifier in kernel files shall be added at the first
> +possible line in a file which can contain a comment.  For the majority
> +of files this is the first line, except for scripts which require the
> +'#!PATH_TO_INTERPRETER' in the first line.  For those scripts the SPDX
> +identifier goes into the second line.
> +
> +The SPDX license identifier is added in form of a comment.  The comment
> +style depends on the file type:
> +
> +::
> +
> +    C source:   // SPDX-License-Identifier: <SPDX License Expression>
> +    C header:   /* SPDX-License-Identifier: <SPDX License Expression> */
> +    ASM:        /* SPDX-License-Identifier: <SPDX License Expression> */
> +    scripts:    # SPDX-License-Identifier: <SPDX License Expression>
> +
> +If a specific tool cannot handle the standard comment style, then the
> +appropriate comment mechanism which the tool accepts shall be used.

Most of the things sound good. But I really don't get the first-line
thing and the C++ single line comments in C sources.

First there are already tools [1] from the FSFE REUSE project [2] that
support it after the copyright header. For example, the REUSE example
project uses this style for cURL [3]. But is also looks quite out of
place in the source files.

Here what it looks like right now in the kernel:

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright(c) 2015 EZchip Technologies.
 *
 * 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.
 *
 * The full GNU General Public License is included in this distribution in
 * the file called "COPYING".
 */

The REUSE cURL way would look more like:

/*
 * Copyright(c) 2015 EZchip Technologies.
 *
 * 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.
 *
 * License-Filename: LICENSES/preferred/GPL-2.0
 * SPDX-License-Identifier: GPL-2.0
 */

And to the C++ style comments in C-source files. Way wouldn't it
possible to use a common style in C source files an C header files?

C source:   /* SPDX-License-Identifier: <SPDX License Expression> */
C header:   /* SPDX-License-Identifier: <SPDX License Expression> */

Thanks,
Charlemagne Lasse

[1] https://git.fsfe.org/reuse/reuse
[2] https://reuse.software/
[3] https://git.fsfe.org/jonas/curl/src/reuse-compliant/src/slist_wc.c

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ