02 Nov, 2017

1 commit

  • Many source files in the tree are missing licensing information, which
    makes it harder for compliance tools to determine the correct license.

    By default all files without license information are under the default
    license of the kernel, which is GPL version 2.

    Update the files which contain no license information with the 'GPL-2.0'
    SPDX license identifier. The SPDX identifier is a legally binding
    shorthand, which can be used instead of the full boiler plate text.

    This patch is based on work done by Thomas Gleixner and Kate Stewart and
    Philippe Ombredanne.

    How this work was done:

    Patches were generated and checked against linux-4.14-rc6 for a subset of
    the use cases:
    - file had no licensing information it it.
    - file was a */uapi/* one with no licensing information in it,
    - file was a */uapi/* one with existing licensing information,

    Further patches will be generated in subsequent months to fix up cases
    where non-standard license headers were used, and references to license
    had to be inferred by heuristics based on keywords.

    The analysis to determine which SPDX License Identifier to be applied to
    a file was done in a spreadsheet of side by side results from of the
    output of two independent scanners (ScanCode & Windriver) producing SPDX
    tag:value files created by Philippe Ombredanne. Philippe prepared the
    base worksheet, and did an initial spot review of a few 1000 files.

    The 4.13 kernel was the starting point of the analysis with 60,537 files
    assessed. Kate Stewart did a file by file comparison of the scanner
    results in the spreadsheet to determine which SPDX license identifier(s)
    to be applied to the file. She confirmed any determination that was not
    immediately clear with lawyers working with the Linux Foundation.

    Criteria used to select files for SPDX license identifier tagging was:
    - Files considered eligible had to be source code files.
    - Make and config files were included as candidates if they contained >5
    lines of source
    - File already had some variant of a license header in it (even if
    Reviewed-by: Philippe Ombredanne
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     

29 Jun, 2017

1 commit

  • Many subsystems will not use refcount_t unless there is a way to build the
    kernel so that there is no regression in speed compared to atomic_t. This
    adds CONFIG_REFCOUNT_FULL to enable the full refcount_t implementation
    which has the validation but is slightly slower. When not enabled,
    refcount_t uses the basic unchecked atomic_t routines, which results in
    no code changes compared to just using atomic_t directly.

    Signed-off-by: Kees Cook
    Acked-by: Greg Kroah-Hartman
    Cc: Alexey Dobriyan
    Cc: Andrew Morton
    Cc: Arnd Bergmann
    Cc: Christoph Hellwig
    Cc: David S. Miller
    Cc: David Windsor
    Cc: Davidlohr Bueso
    Cc: Elena Reshetova
    Cc: Eric Biggers
    Cc: Eric W. Biederman
    Cc: Hans Liljestrand
    Cc: James Bottomley
    Cc: Jann Horn
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Manfred Spraul
    Cc: Peter Zijlstra
    Cc: Rik van Riel
    Cc: Serge E. Hallyn
    Cc: Thomas Gleixner
    Cc: arozansk@redhat.com
    Cc: axboe@kernel.dk
    Cc: linux-arch
    Link: http://lkml.kernel.org/r/20170621200026.GA115679@beast
    Signed-off-by: Ingo Molnar

    Kees Cook
     

07 May, 2017

1 commit

  • Now that kref is using the refcount apis, the _GPL markings are getting
    exported to places that it previously wasn't. Now kref.h is GPLv2
    licensed, so any non-GPL code using it better be talking to some
    lawyers, but changing api markings isn't considered "nice", so let's fix
    this up.

    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Linus Torvalds

    Greg Kroah-Hartman
     

23 Mar, 2017

1 commit

  • Generates better code (GCC-6.2.1):

    text filename
    1576 defconfig-build/lib/refcount.o.pre
    1488 defconfig-build/lib/refcount.o.post

    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Andrew Morton
    Cc: Andy Lutomirski
    Cc: Borislav Petkov
    Cc: Brian Gerst
    Cc: Denys Vlasenko
    Cc: H. Peter Anvin
    Cc: Josh Poimboeuf
    Cc: Linus Torvalds
    Cc: Paul E. McKenney
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: linux-kernel@vger.kernel.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

13 Mar, 2017

1 commit


01 Mar, 2017

1 commit

  • Linus noticed that the new refcount.h APIs used WARN(), which would turn
    into a dmesg DoS if it triggers frequently on some buggy driver.

    So make sure we only warn once. These warnings are never supposed to happen,
    so it's typically not a problem to lose subsequent warnings.

    Suggested-by: Linus Torvalds
    Cc: Peter Zijlstra (Intel)
    Cc: Elena Reshetova
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Link: http://lkml.kernel.org/r/CA+55aFzbYUTZ=oqZ2YgDjY0C2_n6ODhTfqj6V+m5xWmDxsuB0w@mail.gmail.com
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     

24 Feb, 2017

1 commit

  • Linus asked to please make this real C code.

    And since size then isn't an issue what so ever anymore, remove the
    debug knob and make all WARN()s unconditional.

    Suggested-by: Linus Torvalds
    Signed-off-by: Peter Zijlstra (Intel)
    Cc: Peter Zijlstra
    Cc: Thomas Gleixner
    Cc: dwindsor@gmail.com
    Cc: elena.reshetova@intel.com
    Cc: gregkh@linuxfoundation.org
    Cc: ishkamiel@gmail.com
    Cc: keescook@chromium.org
    Signed-off-by: Ingo Molnar

    Peter Zijlstra