1. 16 12月, 2020 5 次提交
    • J
      selftests/vm: hmm-tests: remove the libhugetlbfs dependency · f3a45709
      John Hubbard 提交于
      HMM selftests are incredibly useful, but they are only effective if people
      actually build and run them.  All the other tests in selftests/vm can be
      built with very standard, always-available libraries: libpthread, librt.
      The hmm-tests.c program, on the other hand, requires something that is
      (much) less readily available: libhugetlbfs.  And so the build will
      typically fail for many developers.
      
      A simple attempt to install libhugetlbfs will also run into complications
      on some common distros these days: Fedora and Arch Linux (yes, Arch AUR
      has it, but that's fragile, as always with AUR).  The library is not
      maintained actively enough at the moment, for distros to deal with it.  I
      had to build it from source, for Fedora, and that didn't go too smoothly
      either.
      
      It turns out that, out of 21 tests in hmm-tests.c, only 2 actually require
      functionality from libhugetlbfs.  Therefore, if libhugetlbfs is missing,
      simply ifdef those two tests out and allow the developer to at least have
      the other 19 tests, if they don't want to pause to work through the above
      issues.  Also issue a warning, so that it's clear that there is an
      imperfection in the build.
      
      In order to do that, a tiny shell script (check_config.sh) runs a quick
      compile (not link, that's too prone to false failures with library paths),
      and basically, if the compiler doesn't find hugetlbfs.h in its standard
      locations, then the script concludes that libhugetlbfs is not available.
      The output is in two files, one for inclusion in hmm-test.c
      (local_config.h), and one for inclusion in the Makefile (local_config.mk).
      
      Link: https://lkml.kernel.org/r/20201026064021.3545418-9-jhubbard@nvidia.comSigned-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Jérôme Glisse <jglisse@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f3a45709
    • J
      selftests/vm: minor cleanup: Makefile and gup_test.c · f545605c
      John Hubbard 提交于
      A few cleanups that don't deserve separate patches, but that also should
      not clutter up other functional changes:
      
      1. Remove an unnecessary #include <prctl.h>
      
      2. Restore the sorted order of TEST_GEN_FILES.
      
      3. Add -lpthread to the common LDLIBS, as it is harmless and several
         tests use it. This gets rid of one special rule already.
      
      Link: https://lkml.kernel.org/r/20201026064021.3545418-5-jhubbard@nvidia.comSigned-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Cc: Jérôme Glisse <jglisse@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f545605c
    • J
      selftests/vm: rename run_vmtests --> run_vmtests.sh · c2aa8afc
      John Hubbard 提交于
      Rename to *.sh, in order to match the conventions of all of the other
      items in selftest/vm.
      
      The only reason not to use a .sh suffix a shell script like this, might be
      to make it look more like a normal program, but that's not an issue here.
      
      Link: https://lkml.kernel.org/r/20201026064021.3545418-4-jhubbard@nvidia.comSigned-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Cc: Jérôme Glisse <jglisse@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c2aa8afc
    • J
      selftests/vm: use a common gup_test.h · b9dcfdff
      John Hubbard 提交于
      Avoid the need to copy-paste the gup_test ioctl commands and the struct
      gup_test definition, between the kernel and the user space application, by
      providing a new header file for these.  This allows easier and safer
      adding of new ioctl calls, as well as reducing the overall line count.
      
      Details: The header file has to be able to compile independently, because
      of the arguably unfortunate way that the Makefile is written: the Makefile
      tries to build all of its prerequisites, when really it should be only
      building the .c files, and leaving the other prerequisites (LOCAL_HDRS) as
      pure dependencies.
      
      That Makefile limitation is probably not worth fixing, but it explains why
      one of the includes had to be moved into the new header file.
      
      Also: simplify the ioctl struct (struct gup_test), by deleting the unused
      __expansion[10] field.  This sort of thing is what you might see in a
      stable ABI, but this low-level, kernel-developer-oriented selftests/vm
      system is very much not subject to ABI stability.  So "expansion" and
      "reserved" fields are unnecessary here.
      
      Link: https://lkml.kernel.org/r/20201026064021.3545418-3-jhubbard@nvidia.comSigned-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Cc: Jérôme Glisse <jglisse@redhat.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b9dcfdff
    • J
      mm/gup_benchmark: rename to mm/gup_test · 9c84f229
      John Hubbard 提交于
      Patch series "selftests/vm: gup_test, hmm-tests, assorted improvements", v3.
      
      Summary: This series provides two main things, and a number of smaller
      supporting goodies.  The two main points are:
      
      1) Add a new sub-test to gup_test, which in turn is a renamed version
         of gup_benchmark.  This sub-test allows nicer testing of dump_pages(),
         at least on user-space pages.
      
         For quite a while, I was doing a quick hack to gup_test.c whenever I
         wanted to try out changes to dump_page().  Then Matthew Wilcox asked me
         what I meant when I said "I used my dump_page() unit test", and I
         realized that it might be nice to check in a polished up version of
         that.
      
         Details about how it works and how to use it are in the commit
         description for patch #6 ("selftests/vm: gup_test: introduce the
         dump_pages() sub-test").
      
      2) Fixes a limitation of hmm-tests: these tests are incredibly useful,
         but only if people actually build and run them.  And it turns out that
         libhugetlbfs is a little too effective at throwing a wrench in the
         works, there.  So I've added a little configuration check that removes
         just two of the 21 hmm-tests, if libhugetlbfs is not available.
      
         Further details in the commit description of patch #8
         ("selftests/vm: hmm-tests: remove the libhugetlbfs dependency").
      
      Other smaller things that this series does:
      
      a) Remove code duplication by creating gup_test.h.
      
      b) Clear up the sub-test organization, and their invocation within
         run_vmtests.sh.
      
      c) Other minor assorted improvements.
      
      [1] v2 is here:
      https://lore.kernel.org/linux-doc/20200929212747.251804-1-jhubbard@nvidia.com/
      
      [2] https://lore.kernel.org/r/CAHk-=wgh-TMPHLY3jueHX7Y2fWh3D+nMBqVS__AZm6-oorquWA@mail.gmail.com
      
      This patch (of 9):
      
      Rename nearly every "gup_benchmark" reference and file name to "gup_test".
      The one exception is for the actual gup benchmark test itself.
      
      The current code already does a *little* bit more than benchmarking, and
      definitely covers more than get_user_pages_fast().  More importantly,
      however, subsequent patches are about to add some functionality that is
      non-benchmark related.
      
      Closely related changes:
      
      * Kconfig: in addition to renaming the options from GUP_BENCHMARK to
        GUP_TEST, update the help text to reflect that it's no longer a
        benchmark-only test.
      
      Link: https://lkml.kernel.org/r/20201026064021.3545418-1-jhubbard@nvidia.com
      Link: https://lkml.kernel.org/r/20201026064021.3545418-2-jhubbard@nvidia.comSigned-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Jérôme Glisse <jglisse@redhat.com>
      Cc: Ralph Campbell <rcampbell@nvidia.com>
      Cc: Shuah Khan <shuah@kernel.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9c84f229
  2. 07 12月, 2020 1 次提交
    • X
      tools/testing/selftests/vm: fix build error · d8cbe8bf
      Xingxing Su 提交于
      Only x86 and PowerPC implement the pkey-xxx.h, and an error was reported
      when compiling protection_keys.c.
      
      Add a Arch judgment to compile "protection_keys" in the Makefile.
      
      If other arch implement this, add the arch name to the Makefile.
      eg:
          ifneq (,$(findstring $(ARCH),powerpc mips ... ))
      
      Following build errors:
      
          pkey-helpers.h:93:2: error: #error Architecture not supported
           #error Architecture not supported
          pkey-helpers.h:96:20: error: `PKEY_DISABLE_ACCESS' undeclared
           #define PKEY_MASK (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE)
                              ^
          protection_keys.c:218:45: error: `PKEY_DISABLE_WRITE' undeclared
           pkey_assert(flags & (PKEY_DISABLE_ACCESS | PKEY_DISABLE_WRITE));
                                                      ^
      Signed-off-by: NXingxing Su <suxingxing@loongson.cn>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Sandipan Das <sandipan@linux.ibm.com>
      Cc: John Hubbard <jhubbard@nvidia.com>
      Cc: Dave Hansen <dave.hansen@intel.com>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Brian Geffon <bgeffon@google.com>
      Cc: Mina Almasry <almasrymina@google.com>
      Link: https://lkml.kernel.org/r/1606826876-30656-1-git-send-email-suxingxing@loongson.cnSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      d8cbe8bf
  3. 14 10月, 2020 2 次提交
    • J
      selftests/vm: fix incorrect gcc invocation in some cases · 34d10913
      John Hubbard 提交于
      Avoid accidental wrong builds, due to built-in rules working just a little
      bit too well--but not quite as well as required for our situation here.
      
      In other words, "make userfaultfd" (for example) is supposed to fail to
      build at all, because this Makefile only supports either "make" (all), or
      "make /full/path".  However, the built-in rules, if not suppressed, will
      pick up CFLAGS and the initial LDLIBS (but not the target-specific LDLIBS,
      because those are only set for the full path target!).  This causes it to
      get pretty far into building things despite using incorrect values such as
      an *occasionally* incomplete LDLIBS value.
      Signed-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Link: https://lkml.kernel.org/r/20200915012901.1655280-3-jhubbard@nvidia.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      34d10913
    • J
      selftests/vm: fix false build success on the second and later attempts · efc9511c
      John Hubbard 提交于
      Patch series "selftests/vm: fix some minor aggravating factors in the Makefile".
      
      This fixes a couple of minor aggravating factors that I ran across while
      trying to do some changes in selftests/vm.  These are simple things, but
      like most things with GNU Make, it's rarely obvious what's wrong until you
      understand *the entire Makefile and all of its includes*.
      
      So while there is, of course, joy in learning those details, I thought I'd
      fix these little things, so as to allow others to skip out on the Joy if
      they so choose.  :)
      
      First of all, if you have an item (let's choose userfaultfd for an
      example) that fails to build, you might do this:
      
      $ make -j32
      
          # ...you observe a failed item in the threaded output
      
      # OK, let's get a closer look
      
      $ make
          # ...but now the build quietly "succeeds".
      
      That's what Patch 0001 fixes.
      
      Second, if you instead attempt this approach for your closer look (a casual
      mistake, as it's not supported):
      
      $ make userfaultfd
      
          # ...userfaultfd fails to link, due to incomplete LDLIBS
      
      That's what Patch 0002 fixes.
      
      This patch (of 2):
      
      If one or more of these selftest fail to build, then after the first
      failure, subsequent invocations of "make" will make it appear that there
      are no build failures, after all.
      
      That's because the failed build products remain, with up-to-date
      timestamps, thus tricking Make (and you!) into believing that there's
      nothing else to build.
      
      Fix this by telling Make to delete targets that didn't completely
      succeed.
      Signed-off-by: NJohn Hubbard <jhubbard@nvidia.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Cc: Shuah Khan <shuah@kernel.org>
      Cc: Jason Gunthorpe <jgg@ziepe.ca>
      Link: https://lkml.kernel.org/r/20200915012901.1655280-1-jhubbard@nvidia.com
      Link: https://lkml.kernel.org/r/20200915012901.1655280-2-jhubbard@nvidia.comSigned-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      efc9511c
  4. 05 6月, 2020 2 次提交
  5. 04 6月, 2020 1 次提交
  6. 20 5月, 2020 1 次提交
  7. 13 4月, 2020 2 次提交
  8. 03 4月, 2020 2 次提交
  9. 08 11月, 2019 1 次提交
  10. 06 6月, 2019 1 次提交
    • S
      selftests: vm: Fix test build failure when built by itself · e2e88325
      Shuah Khan 提交于
      vm test build fails when test is built by itself using
      
      make -C tools/testing/selftests/vm
      or
      cd tools/testing/selftests/vm; make
      
      When the test is built invoking its Makefile directly, it defines
      OUTPUT which conflicts with lib.mk's logic to install headers.
      
      make --no-builtin-rules INSTALL_HDR_PATH=$OUTPUT/usr \
              ARCH=x86 -C ../../../.. headers_install
      make[1]: Entering directory '/mnt/data/lkml/linux_5.2'
        REMOVE  shmparam.h
      rm: cannot remove '/usr/include/asm-generic/shmparam.h': Permission denied
      scripts/Makefile.headersinst:96: recipe for target '/usr/include/asm-generic/.install' failed
      make[3]: *** [/usr/include/asm-generic/.install] Error 1
      scripts/Makefile.headersinst:32: recipe for target 'asm-generic' failed
      make[2]: *** [asm-generic] Error 2
      Makefile:1199: recipe for target 'headers_install' failed
      make[1]: *** [headers_install] Error 2
      make[1]: Leaving directory '/mnt/data/lkml/linux_5.2'
      ../lib.mk:52: recipe for target 'khdr' failed
      make: *** [khdr] Error 2
      
      Fixes: 8ce72dc3 ("selftests: fix headers_install circular dependency")
      Signed-off-by: NShuah Khan <skhan@linuxfoundation.org>
      e2e88325
  11. 30 5月, 2019 1 次提交
  12. 18 12月, 2018 1 次提交
    • S
      selftests: Fix test errors related to lib.mk khdr target · 283ac6d5
      Shuah Khan 提交于
      Commit b2d35fa5 ("selftests: add headers_install to lib.mk") added
      khdr target to run headers_install target from the main Makefile. The
      logic uses KSFT_KHDR_INSTALL and top_srcdir as controls to initialize
      variables and include files to run headers_install from the top level
      Makefile. There are a few problems with this logic.
      
      1. Exposes top_srcdir to all tests
      2. Common logic impacts all tests
      3. Uses KSFT_KHDR_INSTALL, top_srcdir, and khdr in an adhoc way. Tests
         add "khdr" dependency in their Makefiles to TEST_PROGS_EXTENDED in
         some cases, and STATIC_LIBS in other cases. This makes this framework
         confusing to use.
      
      The common logic that runs for all tests even when KSFT_KHDR_INSTALL
      isn't defined by the test. top_srcdir is initialized to a default value
      when test doesn't initialize it. It works for all tests without a sub-dir
      structure and tests with sub-dir structure fail to build.
      
      e.g: make -C sparc64/drivers/ or make -C drivers/dma-buf
      
      ../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory
      make: *** No rule to make target '../../../../scripts/subarch.include'.  Stop.
      
      There is no reason to require all tests to define top_srcdir and there is
      no need to require tests to add khdr dependency using adhoc changes to
      TEST_* and other variables.
      
      Fix it with a consistent use of KSFT_KHDR_INSTALL and top_srcdir from tests
      that have the dependency on headers_install.
      
      Change common logic to include khdr target define and "all" target with
      dependency on khdr when KSFT_KHDR_INSTALL is defined.
      
      Only tests that have dependency on headers_install have to define just
      the KSFT_KHDR_INSTALL, and top_srcdir variables and there is no need to
      specify khdr dependency in the test Makefiles.
      
      Fixes: b2d35fa5 ("selftests: add headers_install to lib.mk")
      Cc: stable@vger.kernel.org
      Signed-off-by: NShuah Khan <shuah@kernel.org>
      Reviewed-by: NKhalid Aziz <khalid.aziz@oracle.com>
      Reviewed-by: NAnders Roxell <anders.roxell@linaro.org>
      Signed-off-by: NShuah Khan <shuah@kernel.org>
      283ac6d5
  13. 14 12月, 2018 1 次提交
    • S
      selftests: Fix test errors related to lib.mk khdr target · 211929fd
      Shuah Khan 提交于
      Commit b2d35fa5 ("selftests: add headers_install to lib.mk") added
      khdr target to run headers_install target from the main Makefile. The
      logic uses KSFT_KHDR_INSTALL and top_srcdir as controls to initialize
      variables and include files to run headers_install from the top level
      Makefile. There are a few problems with this logic.
      
      1. Exposes top_srcdir to all tests
      2. Common logic impacts all tests
      3. Uses KSFT_KHDR_INSTALL, top_srcdir, and khdr in an adhoc way. Tests
         add "khdr" dependency in their Makefiles to TEST_PROGS_EXTENDED in
         some cases, and STATIC_LIBS in other cases. This makes this framework
         confusing to use.
      
      The common logic that runs for all tests even when KSFT_KHDR_INSTALL
      isn't defined by the test. top_srcdir is initialized to a default value
      when test doesn't initialize it. It works for all tests without a sub-dir
      structure and tests with sub-dir structure fail to build.
      
      e.g: make -C sparc64/drivers/ or make -C drivers/dma-buf
      
      ../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory
      make: *** No rule to make target '../../../../scripts/subarch.include'.  Stop.
      
      There is no reason to require all tests to define top_srcdir and there is
      no need to require tests to add khdr dependency using adhoc changes to
      TEST_* and other variables.
      
      Fix it with a consistent use of KSFT_KHDR_INSTALL and top_srcdir from tests
      that have the dependency on headers_install.
      
      Change common logic to include khdr target define and "all" target with
      dependency on khdr when KSFT_KHDR_INSTALL is defined.
      
      Only tests that have dependency on headers_install have to define just
      the KSFT_KHDR_INSTALL, and top_srcdir variables and there is no need to
      specify khdr dependency in the test Makefiles.
      
      Fixes: b2d35fa5 ("selftests: add headers_install to lib.mk")
      Cc: stable@vger.kernel.org
      Signed-off-by: NShuah Khan <shuah@kernel.org>
      211929fd
  14. 27 10月, 2018 1 次提交
  15. 05 9月, 2018 1 次提交
  16. 23 8月, 2018 1 次提交
  17. 01 2月, 2018 1 次提交
  18. 18 11月, 2017 1 次提交
  19. 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
  20. 09 5月, 2017 1 次提交
  21. 04 5月, 2017 1 次提交
  22. 10 3月, 2017 1 次提交
  23. 23 2月, 2017 2 次提交
  24. 06 1月, 2017 3 次提交
  25. 08 10月, 2016 2 次提交
  26. 06 11月, 2015 1 次提交
    • E
      selftests: vm: add tests for lock on fault · b3b0d09c
      Eric B Munson 提交于
      Test the mmap() flag, and the mlockall() flag.  These tests ensure that
      pages are not faulted in until they are accessed, that the pages are
      unevictable once faulted in, and that VMA splitting and merging works with
      the new VM flag.  The second test ensures that mlock limits are respected.
       Note that the limit test needs to be run a normal user.
      
      Also add tests to use the new mlock2 family of system calls.
      
      [treding@nvidia.com: : Fix mlock2-tests for 32-bit architectures]
      [treding@nvidia.com: ensure the mlock2 syscall number can be found]
      [treding@nvidia.com: use the right arguments for main()]
      Signed-off-by: NEric B Munson <emunson@akamai.com>
      Cc: Shuah Khan <shuahkh@osg.samsung.com>
      Cc: Michal Hocko <mhocko@suse.cz>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Jonathan Corbet <corbet@lwn.net>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Geert Uytterhoeven <geert@linux-m68k.org>
      Cc: Guenter Roeck <linux@roeck-us.net>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
      Cc: Michael Kerrisk <mtk.manpages@gmail.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Signed-off-by: NThierry Reding <treding@nvidia.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b3b0d09c
  27. 23 9月, 2015 2 次提交