1. 11 6月, 2019 1 次提交
  2. 02 11月, 2017 1 次提交
    • G
      License cleanup: add SPDX GPL-2.0 license identifier to files with no license · b2441318
      Greg Kroah-Hartman 提交于
      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: NKate Stewart <kstewart@linuxfoundation.org>
      Reviewed-by: NPhilippe Ombredanne <pombredanne@nexb.com>
      Reviewed-by: NThomas Gleixner <tglx@linutronix.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      b2441318
  3. 24 9月, 2016 1 次提交
  4. 28 4月, 2016 1 次提交
  5. 24 12月, 2015 1 次提交
  6. 24 6月, 2014 1 次提交
  7. 04 7月, 2013 1 次提交
  8. 26 11月, 2012 1 次提交
  9. 02 9月, 2012 1 次提交
  10. 27 5月, 2011 3 次提交
  11. 23 12月, 2010 1 次提交
    • J
      taskstats: pad taskstats netlink response for aligment issues on ia64 · 4be2c95d
      Jeff Mahoney 提交于
      The taskstats structure is internally aligned on 8 byte boundaries but the
      layout of the aggregrate reply, with two NLA headers and the pid (each 4
      bytes), actually force the entire structure to be unaligned.  This causes
      the kernel to issue unaligned access warnings on some architectures like
      ia64.  Unfortunately, some software out there doesn't properly unroll the
      NLA packet and assumes that the start of the taskstats structure will
      always be 20 bytes from the start of the netlink payload.  Aligning the
      start of the taskstats structure breaks this software, which we don't
      want.  So, for now the alignment only happens on architectures that
      require it and those users will have to update to fixed versions of those
      packages.  Space is reserved in the packet only when needed.  This ifdef
      should be removed in several years e.g.  2012 once we can be confident
      that fixed versions are installed on most systems.  We add the padding
      before the aggregate since the aggregate is already a defined type.
      
      Commit 85893120 ("delayacct: align to 8 byte boundary on 64-bit systems")
      previously addressed the alignment issues by padding out the pid field.
      This was supposed to be a compatible change but the circumstances
      described above mean that it wasn't.  This patch backs out that change,
      since it was a hack, and introduces a new NULL attribute type to provide
      the padding.  Padding the response with 4 bytes avoids allocating an
      aligned taskstats structure and copying it back.  Since the structure
      weighs in at 328 bytes, it's too big to do it on the stack.
      Signed-off-by: NJeff Mahoney <jeffm@suse.com>
      Reported-by: NBrian Rogers <brian@xyzw.org>
      Cc: Jeff Mahoney <jeffm@suse.com>
      Cc: Guillaume Chazarain <guichaz@gmail.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      4be2c95d
  12. 28 10月, 2010 1 次提交
    • M
      delay-accounting: reimplement -c for getdelays.c to report information on a target command · db9e5679
      Mel Gorman 提交于
      Task delay-accounting was identified as one means of determining how long
      a process spends in congestion_wait() without adding new statistics.  For
      example, if the workload should not be doing IO, delay-accounting could
      reveal how long it was spending in unexpected IO or delays.
      Unfortunately, on closer examination it was clear that getdelays does not
      act as documented.
      
      Commit a3baf649 ("per-task-delay-accounting: documentation") added
      Documentation/accounting/getdelays.c with a -c switch that was documented
      to fork/exec a child and report statistics on it but for reasons that are
      unclear to me, commit 9e06d3f9 deleted support for this switch but did not
      update the documentation.  It might be an oversight or it might be because
      the control flow of the program meant that accounting information would be
      printed once early in the lifetime of the program making it of limited
      use.
      
      This patch reimplements -c for getdelays.c to act as documented.  Unlike
      the original version, it waits until the command completes before printing
      any information on it.  An example of it being used looks like
      
      $ ./getdelays -d -c find /home/mel -name mel
      print delayacct stats ON
      /home/mel
      /home/mel/.notes-wine/drive_c/windows/profiles/mel
      /home/mel/.wine/drive_c/windows/profiles/mel
      /home/mel/git-configs/dot.kde/share/apps/konqueror/home/mel
      PID	5923
      
      CPU             count     real total  virtual total    delay total
                      42779     5051232096     5164722692      564207988
      IO              count    delay total
                      41727    97804147758
      SWAP            count    delay total
                          0              0
      RECLAIM         count    delay total
                          0              0
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NMel Gorman <mel@csn.ul.ie>
      Acked-by: NBalbir Singh <balbir@in.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      db9e5679
  13. 23 9月, 2009 1 次提交
  14. 17 6月, 2009 1 次提交
  15. 16 1月, 2009 1 次提交
  16. 13 8月, 2008 1 次提交
    • R
      docsrc: fix getdelays printk formats · 66659313
      Randy Dunlap 提交于
      Fix printf format type warnings (seen on alpha & ia64):
      
      Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 6 has type '__u64'
      Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 7 has type '__u64'
      Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 8 has type '__u64'
      Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 9 has type '__u64'
      Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 12 has type '__u64'
      Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 13 has type '__u64'
      Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 16 has type '__u64'
      Documentation/accounting/getdelays.c:206: warning: format '%15llu' expects type 'long long unsigned int', but argument 17 has type '__u64'
      Documentation/accounting/getdelays.c:214: warning: format '%15llu' expects type 'long long unsigned int', but argument 4 has type '__u64'
      Documentation/accounting/getdelays.c:214: warning: format '%15llu' expects type 'long long unsigned int', but argument 5 has type '__u64'
      Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 2 has type '__u64'
      Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 3 has type '__u64'
      Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 4 has type '__u64'
      Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 5 has type '__u64'
      Documentation/accounting/getdelays.c:221: warning: format '%llu' expects type 'long long unsigned int', but argument 6 has type '__u64'
      Documentation/accounting/getdelays.c:236: warning: 'cmd_type' may be used uninitialized in this function
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Sam Ravnborg <sam@ravnborg.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      66659313
  17. 26 7月, 2008 1 次提交
  18. 09 2月, 2008 1 次提交
    • R
      getdelays: fix gcc warnings · 10e6f32b
      Randy Dunlap 提交于
      Fix gcc warnings in getdelays.c:
      
      Documentation/accounting/getdelays.c: In function 'task_context_switch_counts':
      Documentation/accounting/getdelays.c:214: warning: format '%15lu' expects type 'long unsigned int', but argument 4 has type '__u64'
      Documentation/accounting/getdelays.c:214: warning: format '%15lu' expects type 'long unsigned int', but argument 5 has type '__u64'
      Documentation/accounting/getdelays.c: In function 'main':
      Documentation/accounting/getdelays.c:402: warning: format '%d' expects type 'int', but argument 2 has type 'long unsigned int'
      Documentation/accounting/getdelays.c: In function 'get_family_id':
      Documentation/accounting/getdelays.c:171: warning: 'id' may be used uninitialized in this function
      
      One warning is not a problem and can be dismissed:
      Documentation/accounting/getdelays.c: In function 'main':
      Documentation/accounting/getdelays.c:236: warning: 'cmd_type' may be used uninitialized in this function
      Signed-off-by: NRandy Dunlap <randy.dunlap@oracle.com>
      Acked-by: NBalbir Singh <balbir@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      10e6f32b
  19. 15 11月, 2007 1 次提交
  20. 17 10月, 2007 1 次提交
  21. 23 8月, 2007 1 次提交
  22. 17 7月, 2007 1 次提交
    • M
      taskstats: add context-switch counters · b663a79c
      Maxim Uvarov 提交于
      Make available to the user the following task and process performance
      statistics:
      
      	* Involuntary Context Switches (task_struct->nivcsw)
      	* Voluntary Context Switches (task_struct->nvcsw)
      
      Statistics information is available from:
      	1. taskstats interface (Documentation/accounting/)
      	2. /proc/PID/status (task only).
      
      This data is useful for detecting hyperactivity patterns between processes.
      
      [akpm@linux-foundation.org: cleanup]
      Signed-off-by: NMaxim Uvarov <muvarov@ru.mvista.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Jay Lan <jlan@engr.sgi.com>
      Cc: Jonathan Lim <jlim@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b663a79c
  23. 09 5月, 2007 2 次提交
  24. 11 12月, 2006 2 次提交
    • A
      [PATCH] io-accounting: add to getdelays · cf709844
      Andrew Morton 提交于
      Wire up the IO accounting into getdelays.c.
      
      Usage:
      
      To display I/O stats for each exitting task:
      
      vmm:/home/akpm> ./getdelays -m0,1,2,3 -i -l
      cpumask 0 maskset 1
      printing IO accounting
      listen forever
      rm: read=8192, write=0, cancelled_write=0
      cvs: read=733184, write=4255744, cancelled_write=4096
      make: read=217088, write=0, cancelled_write=0
      cc1: read=4263936, write=12288, cancelled_write=0
      as: read=811008, write=8192, cancelled_write=0
      gcc: read=323584, write=0, cancelled_write=12288
      cc1: read=0, write=8192, cancelled_write=0
      as: read=4096, write=4096, cancelled_write=0
      gcc: read=16384, write=0, cancelled_write=4096
      as: read=4096, write=4096, cancelled_write=0
      gcc: read=16384, write=0, cancelled_write=8192
      ld: read=1011712, write=16384, cancelled_write=0
      collect2: read=626688, write=0, cancelled_write=0
      gcc: read=204800, write=0, cancelled_write=0
      cc1: read=0, write=8192, cancelled_write=0
      as: read=4096, write=4096, cancelled_write=0
      gcc: read=16384, write=0, cancelled_write=8192
      ld: read=8192, write=16384, cancelled_write=0
      collect2: read=49152, write=0, cancelled_write=0
      gcc: read=0, write=0, cancelled_write=0
      cc1: read=0, write=4096, cancelled_write=0
      ld: read=4096, write=12288, cancelled_write=0
      collect2: read=49152, write=0, cancelled_write=0
      gcc: read=0, write=0, cancelled_write=0
      
      To display I/O stats for a particular presently-running task:
      
      vmm:/home/akpm> ./getdelays -i -p $(pidof crond)
      printing IO accounting
      crond: read=61440, write=0, cancelled_write=0
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      cf709844
    • A
      [PATCH] getdelays: various fixes · d2f7bf13
      Andrew Morton 提交于
      - Various cleanups
      
      - Report errors to stderr, not stdout
      
      - A printf was missing a \n and was hiding from me.
      
      Cc: Jay Lan <jlan@sgi.com>
      Cc: Shailabh Nagar <nagar@watson.ibm.com>
      Cc: Balbir Singh <balbir@in.ibm.com>
      Cc: Chris Sturtivant <csturtiv@sgi.com>
      Cc: Tony Ernst <tee@sgi.com>
      Cc: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
      Cc: David Wright <daw@sgi.com>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      d2f7bf13
  25. 04 11月, 2006 1 次提交
  26. 01 10月, 2006 1 次提交
  27. 15 7月, 2006 2 次提交