Skip to content
Snippets Groups Projects
  1. Nov 02, 2020
  2. Mar 25, 2020
  3. Nov 02, 2017
    • Greg Kroah-Hartman's avatar
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman authored
      
      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 <5
         lines).
      
      All documentation files were explicitly excluded.
      
      The following heuristics were used to determine which SPDX license
      identifiers to apply.
      
       - when both scanners couldn't find any license traces, file was
         considered to have no license information in it, and the top level
         COPYING file license applied.
      
         For non */uapi/* files that summary was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0                                              11139
      
         and resulted in the first patch in this series.
      
         If that file was a */uapi/* path one, it was "GPL-2.0 WITH
         Linux-syscall-note" otherwise it was "GPL-2.0".  Results of that was:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|-------
         GPL-2.0 WITH Linux-syscall-note                        930
      
         and resulted in the second patch in this series.
      
       - if a file had some form of licensing information in it, and was one
         of the */uapi/* ones, it was denoted with the Linux-syscall-note if
         any GPL family license was found in the file or had no licensing in
         it (per prior point).  Results summary:
      
         SPDX license identifier                            # files
         ---------------------------------------------------|------
         GPL-2.0 WITH Linux-syscall-note                       270
         GPL-2.0+ WITH Linux-syscall-note                      169
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause)    21
         ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause)    17
         LGPL-2.1+ WITH Linux-syscall-note                      15
         GPL-1.0+ WITH Linux-syscall-note                       14
         ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause)    5
         LGPL-2.0+ WITH Linux-syscall-note                       4
         LGPL-2.1 WITH Linux-syscall-note                        3
         ((GPL-2.0 WITH Linux-syscall-note) OR MIT)              3
         ((GPL-2.0 WITH Linux-syscall-note) AND MIT)             1
      
         and that resulted in the third patch in this series.
      
       - when the two scanners agreed on the detected license(s), that became
         the concluded license(s).
      
       - when there was disagreement between the two scanners (one detected a
         license but the other didn't, or they both detected different
         licenses) a manual inspection of the file occurred.
      
       - In most cases a manual inspection of the information in the file
         resulted in a clear resolution of the license that should apply (and
         which scanner probably needed to revisit its heuristics).
      
       - When it was not immediately clear, the license identifier was
         confirmed with lawyers working with the Linux Foundation.
      
       - If there was any question as to the appropriate license identifier,
         the file was flagged for further research and to be revisited later
         in time.
      
      In total, over 70 hours of logged manual review was done on the
      spreadsheet to determine the SPDX license identifiers to apply to the
      source files by Kate, Philippe, Thomas and, in some cases, confirmation
      by lawyers working with the Linux Foundation.
      
      Kate also obtained a third independent scan of the 4.13 code base from
      FOSSology, and compared selected files where the other two scanners
      disagreed against that SPDX file, to see if there was new insights.  The
      Windriver scanner is based on an older version of FOSSology in part, so
      they are related.
      
      Thomas did random spot checks in about 500 files from the spreadsheets
      for the uapi headers and agreed with SPDX license identifier in the
      files he inspected. For the non-uapi files Thomas did random spot checks
      in about 15000 files.
      
      In initial set of patches against 4.14-rc6, 3 files were found to have
      copy/paste license identifier errors, and have been fixed to reflect the
      correct identifier.
      
      Additionally Philippe spent 10 hours this week doing a detailed manual
      inspection and review of the 12,461 patched files from the initial patch
      version early this week with:
       - a full scancode scan run, collecting the matched texts, detected
         license ids and scores
       - reviewing anything where there was a license detected (about 500+
         files) to ensure that the applied SPDX license was correct
       - reviewing anything where there was no detection but the patch license
         was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
         SPDX license was correct
      
      This produced a worksheet with 20 files needing minor correction.  This
      worksheet was then exported into 3 different .csv files for the
      different types of files to be modified.
      
      These .csv files were then reviewed by Greg.  Thomas wrote a script to
      parse the csv files and add the proper SPDX tag to the file, in the
      format that the file expected.  This script was further refined by Greg
      based on the output to detect more types of files automatically and to
      distinguish between header and source .c files (which need different
      comment types.)  Finally Greg ran the script using the .csv files to
      generate the patches.
      
      Reviewed-by: default avatarKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: default avatarPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  4. Oct 21, 2015
  5. Jan 31, 2015
  6. Mar 20, 2012
  7. May 27, 2011
    • Chuck Lever's avatar
      NFS: Revert NFSROOT default mount options · 4251c948
      Chuck Lever authored
      
      Marek Belisko <marek.belisko@gmail.com> reports that recent attempts
      to fix regressions in NFSROOT have broken his configuration:
      
      > After update from 2.6.38-rc8 to 2.6.38 is mounting rootfs over nfs not possible.
      > Log:
      > VFS: Mounted root (nfs filesystem) on device 0:14.
      > Freeing init memory: 132K
      > nfs: server 10.146.1.21 not responding, still trying
      > nfs: server 10.146.1.21 not responding, still trying
      >
      > This is never ending. I make short bisect (not too much commits
      > between versions)
      > and bad commit was reported: 53d47375
      >
      > NFS: NFSROOT should default to "proto=udp"
      >
      > I've tested on mini2440 board (DM9000, static IP).
      > Is there some missing option or something else to be checked?
      
      An examination of a network trace captured during the failure shows
      that the mount is actually succeeding, but that the client is not
      seeing READ replies larger than 16KB.  This could be a local packet
      filtering issue on the client, but we didn't troubleshoot this
      further because of the reported "git bisect" result.
      
      Last fall we removed the ad hoc mount option parser in
      fs/nfs/nfsroot.c in favor of using the main parser in fs/nfs/super.c
      (see commit 56463e50 "NFS: Use super.c for NFSROOT mount option
      parsing").  That commit changed the default NFSROOT mount options to
      be the same as those employed by user space mounts.
      
      As it turns out, these new default mount options are not tolerated by
      many embedded systems.  So far these problems have been due to
      specific behavior of certain embedded NICs.  The NFS community does
      not have such hardware on hand for running tests.
      
      Commit 53d47375 recently introduced a clean way to specify default
      mount options for NFSROOT, so we can now easily restore the
      traditional defaults for NFSROOT:
      
         vers=2,udp,rsize=4096,wsize=4096
      
      This should revert the new default NFSROOT mount options introduced
      with commit 56463e50.
      
      Tested-by: default avatarMarek Belisto <marek.belisto@open-nandra.com>
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      4251c948
  8. Mar 11, 2011
    • Chuck Lever's avatar
      NFS: NFSROOT should default to "proto=udp" · 53d47375
      Chuck Lever authored
      
      There have been a number of recent reports that NFSROOT is no longer
      working with default mount options, but fails only with certain NICs.
      
      Brian Downing <bdowning@lavos.net> bisected to commit 56463e50 "NFS:
      Use super.c for NFSROOT mount option parsing".  Among other things,
      this commit changes the default mount options for NFSROOT to use TCP
      instead of UDP as the underlying transport.
      
      TCP seems less able to deal with NICs that are slow to initialize.
      The system logs that have accompanied reports of problems all show
      that NFSROOT attempts to establish a TCP connection before the NIC is
      fully initialized, and thus the TCP connection attempt fails.
      
      When a TCP connection attempt fails during a mount operation, the
      NFS stack needs to fail the operation.  Usually user space knows how
      and when to retry it.  The network layer does not report a distinct
      error code for this particular failure mode.  Thus, there isn't a
      clean way for the RPC client to see that it needs to retry in this
      case, but not in others.
      
      Because NFSROOT is used in some environments where it is not possible
      to update the kernel command line to specify "udp", the proper thing
      to do is change NFSROOT to use UDP by default, as it did before commit
      56463e50.
      
      To make it easier to see how to change default mount options for
      NFSROOT and to distinguish default settings from mandatory settings,
      I've adjusted a couple of areas to document the specifics.
      
      root_nfs_cat() is also modified to deal with commas properly when
      concatenating strings containing mount option lists.  This keeps
      root_nfs_cat() call sites simpler, now that we may be concatenating
      multiple mount option strings.
      
      Tested-by: default avatarBrian Downing <bdowning@lavos.net>
      Tested-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
      Signed-off-by: default avatarChuck Lever <chuck.lever@oracle.com>
      Cc: <stable@kernel.org> # 2.6.37
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      53d47375
  9. Oct 26, 2010
    • Trond Myklebust's avatar
      NFS: Fix a compile issue in nfs_root · 036a1075
      Trond Myklebust authored
      
      Stephen Rothwell reports:
      
      > /home/test/linux-2.6/fs/nfs/nfsroot.c: In function 'nfs_root_debug':
      > /home/test/linux-2.6/fs/nfs/nfsroot.c:110:2: error: 'nfs_debug'
      > undeclared (first use in this function)
      > /home/test/linux-2.6/fs/nfs/nfsroot.c:110:2: note: each undeclared
      > identifier is reported only once for each function it appears in
      > make[3]: *** [fs/nfs/nfsroot.o] Error 1
      > make[2]: *** [fs/nfs] Error 2
      > make[1]: *** [fs] Error 2
      > make: *** [sub-make] Error 2
      
      Which is caused by commit 306a0753
      (NFS: Allow NFSROOT debugging messages to be enabled dynamically)
      
      Fix is to disable this code when RPC_DEBUG is disabled.
      
      Reported-by: default avatarZimny Lech <napohybelskurwysynom2010@gmail.com>
      Tested-by: default avatarIngo Molnar <mingo@elte.hu>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      036a1075
  10. Sep 17, 2010
  11. Jul 30, 2010
    • Dan Carpenter's avatar
      nfs: include space for the NUL in root path · 674b2222
      Dan Carpenter authored
      
      In root_nfs_name() it does the following:
      
              if (strlen(buf) + strlen(cp) > NFS_MAXPATHLEN) {
                      printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n");
                      return -1;
              }
              sprintf(nfs_export_path, buf, cp);
      
      In the original code if (strlen(buf) + strlen(cp) == NFS_MAXPATHLEN)
      then the sprintf() would lead to an overflow.  Generally the rest of the
      code assumes that the path can have NFS_MAXPATHLEN (1024) characters and
      a NUL terminator so the fix is to add space to the nfs_export_path[]
      buffer.
      
      Signed-off-by: default avatarDan Carpenter <error27@gmail.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      674b2222
  12. May 14, 2010
  13. Jun 18, 2009
  14. May 26, 2009
    • Sam Ravnborg's avatar
      nfs: fix build error in nfsroot with initconst · d0367a50
      Sam Ravnborg authored
      
      fix build error with latest kbuild adjustments to initconst.
      
      The commit a447c093 ("vfs: Use
      const for kernel parser table") changed:
      
          static match_table_t __initdata tokens = {
      to
          static match_table_t __initconst tokens = {
      
      But the missing const causes popwerpc to fail with latest
      updates to __initconst like this:
      
      fs/nfs/nfsroot.c:400: error: __setup_str_nfs_root_setup causes a section type conflict
      fs/nfs/nfsroot.c:400: error: __setup_str_nfs_root_setup causes a section type conflict
      
      The bug is only present with kbuild-next.
      Following patch has been build tested.
      
      Signed-off-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Acked-by: default avatarJan Beulich <jbeulich@novell.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      d0367a50
  15. Dec 23, 2008
  16. Oct 31, 2008
  17. Oct 13, 2008
  18. Oct 07, 2008
  19. Aug 04, 2008
  20. Jul 25, 2008
  21. Jul 09, 2008
  22. Dec 06, 2007
  23. Oct 19, 2007
  24. Oct 09, 2007
  25. Jul 11, 2007
  26. May 01, 2007
  27. Dec 03, 2006
  28. Oct 04, 2006
  29. Oct 02, 2006
  30. Feb 08, 2006
    • Al Viro's avatar
      [PATCH] nfsroot port= parameter fix [backport of 2.4 fix] · 8854eddb
      Al Viro authored
      
      Direct backport of 2.4 fix that didn't get propagated to 2.6; original
      comment follows:
      <quote>
         When I specify the NFS port for nfsroot (e.g.,
         nfsroot=<dir>,port=2049), the
         kernel uses the wrong port. In my case it tries to use 264 (0x108)
         instead
         of 2049 (0x801).
      
         This patch adds the missing htons().
      
         Eric
      </quote>
      
      Patch got applied in 2.4.21-pre6.  Author: Eric Lammerts (<eric@lammerts.org>,
      AFAICS).
      
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
      8854eddb
  31. Jan 09, 2006
  32. Jan 06, 2006
    • Chuck Lever's avatar
      NFS: support large reads and writes on the wire · 40859d7e
      Chuck Lever authored
      
       Most NFS server implementations allow up to 64KB reads and writes on the
       wire.  The Solaris NFS server allows up to a megabyte, for instance.
      
       Now the Linux NFS client supports transfer sizes up to 1MB, too.  This will
       help reduce protocol and context switch overhead on read/write intensive NFS
       workloads, and support larger atomic read and write operations on servers
       that support them.
      
       Test-plan:
       Connectathon and iozone on mount point with wsize=rsize>32768 over TCP.
       Tests with NFS over UDP to verify the maximum RPC payload size cap.
      
      Signed-off-by: default avatarChuck Lever <cel@netapp.com>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
      40859d7e
Loading