<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/vm, branch v5.4</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.4</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.4'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2019-11-06T16:28:58Z</updated>
<entry>
<title>mm/gup_benchmark: fix MAP_HUGETLB case</title>
<updated>2019-11-06T16:28:58Z</updated>
<author>
<name>John Hubbard</name>
<email>jhubbard@nvidia.com</email>
</author>
<published>2019-11-06T05:16:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=64801d19eba156170340c76f70ade743defcb8ce'/>
<id>urn:sha1:64801d19eba156170340c76f70ade743defcb8ce</id>
<content type='text'>
The MAP_HUGETLB ("-H" option) of gup_benchmark fails:

  $ sudo ./gup_benchmark -H
  mmap: Invalid argument

This is because gup_benchmark.c is passing in a file descriptor to
mmap(), but the fd came from opening up the /dev/zero file.  This
confuses the mmap syscall implementation, which thinks that, if the
caller did not specify MAP_ANONYMOUS, then the file must be a huge page
file.  So it attempts to verify that the file really is a huge page
file, as you can see here:

ksys_mmap_pgoff()
{
    if (!(flags &amp; MAP_ANONYMOUS)) {
        retval = -EINVAL;
        if (unlikely(flags &amp; MAP_HUGETLB &amp;&amp; !is_file_hugepages(file)))
            goto out_fput; /* THIS IS WHERE WE END UP */

    else if (flags &amp; MAP_HUGETLB) {
        ...proceed normally, /dev/zero is ok here...

...and of course is_file_hugepages() returns "false" for the /dev/zero
file.

The problem is that the user space program, gup_benchmark.c, really just
wants anonymous memory here.  The simplest way to get that is to pass
MAP_ANONYMOUS whenever MAP_HUGETLB is specified, so that's what this
patch does.

Link: http://lkml.kernel.org/r/20191021212435.398153-2-jhubbard@nvidia.com
Signed-off-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Reviewed-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Reviewed-by: Jérôme Glisse &lt;jglisse@redhat.com&gt;
Cc: Keith Busch &lt;keith.busch@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>mm/gup_benchmark: add a missing "w" to getopt string</title>
<updated>2019-10-19T10:32:32Z</updated>
<author>
<name>John Hubbard</name>
<email>jhubbard@nvidia.com</email>
</author>
<published>2019-10-19T03:19:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6f24c8d30d08f270b54f4c2cb9b08dfccbe59c57'/>
<id>urn:sha1:6f24c8d30d08f270b54f4c2cb9b08dfccbe59c57</id>
<content type='text'>
Even though gup_benchmark.c has code to handle the -w command-line option,
the "w" is not part of the getopt string.  It looks as if it has been
missing the whole time.

On my machine, this leads naturally to the following predictable result:

  $ sudo ./gup_benchmark -w
  ./gup_benchmark: invalid option -- 'w'

...which is fixed with this commit.

Link: http://lkml.kernel.org/r/20191014184639.1512873-2-jhubbard@nvidia.com
Signed-off-by: John Hubbard &lt;jhubbard@nvidia.com&gt;
Acked-by: Kirill A. Shutemov &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Keith Busch &lt;keith.busch@intel.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: Christoph Hellwig &lt;hch@infradead.org&gt;
Cc: "Aneesh Kumar K . V" &lt;aneesh.kumar@linux.ibm.com&gt;
Cc: Ira Weiny &lt;ira.weiny@intel.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: kbuild test robot &lt;lkp@intel.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 499</title>
<updated>2019-06-19T15:09:53Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-06-04T08:11:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=20c8ccb1975b8d5639789d1025ad6ada38bd6f48'/>
<id>urn:sha1:20c8ccb1975b8d5639789d1025ad6ada38bd6f48</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this work is licensed under the terms of the gnu gpl version 2 see
  the copying file in the top level directory

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 35 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Enrico Weigelt &lt;info@metux.net&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081206.797835076@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 485</title>
<updated>2019-06-19T15:09:52Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-06-04T08:11:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=910751a782b54dabc3e00a72e5912fcb9af2f602'/>
<id>urn:sha1:910751a782b54dabc3e00a72e5912fcb9af2f602</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program is free software you can redistribute it and or modify
  it under the terms of the gnu general public license version 2 as
  published by the free software foundation this program is
  distributed in the hope that it would be useful but without any
  warranty without even the implied warranty of merchantability or
  fitness for a particular purpose

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 1 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Enrico Weigelt &lt;info@metux.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190604081204.982710800@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'linux-kselftest-5.2-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2019-06-08T17:57:32Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-06-08T17:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0ad43e29b6e845758f0ceb80e3c1d1a9cebfad06'/>
<id>urn:sha1:0ad43e29b6e845758f0ceb80e3c1d1a9cebfad06</id>
<content type='text'>
Pull Kselftest fix from Shuah Khan:
 "This consists of a single fix for a vm test build failure regression
  when it is built by itself"

* tag 'linux-kselftest-5.2-rc4-2' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests: vm: Fix test build failure when built by itself
</content>
</entry>
<entry>
<title>selftests: vm: Fix test build failure when built by itself</title>
<updated>2019-06-05T22:05:40Z</updated>
<author>
<name>Shuah Khan</name>
<email>skhan@linuxfoundation.org</email>
</author>
<published>2019-06-05T21:16:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e2e88325f4bcaea51f454723971f7b5ee0e1aa80'/>
<id>urn:sha1:e2e88325f4bcaea51f454723971f7b5ee0e1aa80</id>
<content type='text'>
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: 8ce72dc32578 ("selftests: fix headers_install circular dependency")
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'linux-kselftest-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2019-06-05T20:09:55Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2019-06-05T20:09:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=156c05917e0920ef5643eb54c0ea71aae5d60c3d'/>
<id>urn:sha1:156c05917e0920ef5643eb54c0ea71aae5d60c3d</id>
<content type='text'>
Pull Kselftest fixes from Shuah Khan:

 - fixes to cgroup tests (Alex Shi)

 - fix to userfaultfd compiler warning (Alakesh Haloi)

 - fix to vm install to include test script to run the test (Naresh
   Kamboju)

* tag 'linux-kselftest-5.2-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests: vm: install test_vmalloc.sh for run_vmtests
  userfaultfd: selftest: fix compiler warning
  kselftest/cgroup: fix incorrect test_core skip
  kselftest/cgroup: fix unexpected testing failure on test_core
  kselftest/cgroup: fix unexpected testing failure on test_memcontrol
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 191</title>
<updated>2019-05-30T18:29:21Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-28T16:57:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f50a7f3d9225dd374455f28138f79ae3074a7a3d'/>
<id>urn:sha1:f50a7f3d9225dd374455f28138f79ae3074a7a3d</id>
<content type='text'>
Based on 1 normalized pattern(s):

  licensed under gplv2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

has been chosen to replace the boilerplate/reference in 99 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Alexios Zavras &lt;alexios.zavras@intel.com&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Steve Winslow &lt;swinslow@gmail.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190528170027.163048684@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: vm: install test_vmalloc.sh for run_vmtests</title>
<updated>2019-05-30T14:32:57Z</updated>
<author>
<name>Naresh Kamboju</name>
<email>naresh.kamboju@linaro.org</email>
</author>
<published>2019-05-28T12:18:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bc2cce3f2ebcae02aa4bb29e3436bf75ee674c32'/>
<id>urn:sha1:bc2cce3f2ebcae02aa4bb29e3436bf75ee674c32</id>
<content type='text'>
Add test_vmalloc.sh to TEST_FILES to make sure it gets installed for
run_vmtests.

Fixed below error:
./run_vmtests: line 217: ./test_vmalloc.sh: No such file or directory

Tested with: make TARGETS=vm install INSTALL_PATH=$PWD/x

Signed-off-by: Naresh Kamboju &lt;naresh.kamboju@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>userfaultfd: selftest: fix compiler warning</title>
<updated>2019-05-30T14:21:36Z</updated>
<author>
<name>Alakesh Haloi</name>
<email>alakesh.haloi@gmail.com</email>
</author>
<published>2019-05-27T15:18:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=98a13a8d253999cf25eb16d901c35fbd2a8455c4'/>
<id>urn:sha1:98a13a8d253999cf25eb16d901c35fbd2a8455c4</id>
<content type='text'>
Fixes following compiler warning

userfaultfd.c: In function ‘usage’:
userfaultfd.c:126:2: warning: format not a string literal and no format
	arguments [-Wformat-security]
  fprintf(stderr, examples);

Signed-off-by: Alakesh Haloi &lt;alakesh.haloi@gmail.com&gt;
Reviewed-by: Peter Xu &lt;peterx@redhat.com&gt;
Reviewed-by: Mike Rapoport &lt;rppt@linux.ibm.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
</feed>
