<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/exec, branch v5.14</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.14</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.14'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-05-23T01:09:07Z</updated>
<entry>
<title>tools/testing/selftests/exec: fix link error</title>
<updated>2021-05-23T01:09:07Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2021-05-23T00:41:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4d1cd3b2c5c1c32826454de3a18c6183238d47ed'/>
<id>urn:sha1:4d1cd3b2c5c1c32826454de3a18c6183238d47ed</id>
<content type='text'>
Fix the link error by adding '-static':

  gcc -Wall  -Wl,-z,max-page-size=0x1000 -pie load_address.c -o /home/yang/linux/tools/testing/selftests/exec/load_address_4096
  /usr/bin/ld: /tmp/ccopEGun.o: relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `stderr@@GLIBC_2.17' which may bind externally can not be used when making a shared object; recompile with -fPIC
  /usr/bin/ld: /tmp/ccopEGun.o(.text+0x158): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `stderr@@GLIBC_2.17'
  /usr/bin/ld: final link failed: bad value
  collect2: error: ld returned 1 exit status
  make: *** [Makefile:25: tools/testing/selftests/exec/load_address_4096] Error 1

Link: https://lkml.kernel.org/r/20210514092422.2367367-1-yangyingliang@huawei.com
Fixes: 206e22f01941 ("tools/testing/selftests: add self-test for verifying load alignment")
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Cc: Chris Kennelly &lt;ckennelly@google.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>tools/testing/selftests: add self-test for verifying load alignment</title>
<updated>2020-10-16T18:11:21Z</updated>
<author>
<name>Chris Kennelly</name>
<email>ckennelly@google.com</email>
</author>
<published>2020-10-16T03:12:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=206e22f01941b19f9466f48b53cc0d19de493e7a'/>
<id>urn:sha1:206e22f01941b19f9466f48b53cc0d19de493e7a</id>
<content type='text'>
This produces a PIE binary with a variety of p_align requirements,
suitable for verifying that the load address meets that alignment
requirement.

Signed-off-by: Chris Kennelly &lt;ckennelly@google.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: David Rientjes &lt;rientjes@google.com&gt;
Cc: Fangrui Song &lt;maskray@google.com&gt;
Cc: Hugh Dickens &lt;hughd@google.com&gt;
Cc: Ian Rogers &lt;irogers@google.com&gt;
Cc: "Kirill A. Shutemov" &lt;kirill.shutemov@linux.intel.com&gt;
Cc: Mike Kravetz &lt;mike.kravetz@oracle.com&gt;
Cc: Nick Desaulniers &lt;ndesaulniers@google.com&gt;
Cc: Sandeep Patil &lt;sspatil@google.com&gt;
Cc: Song Liu &lt;songliubraving@fb.com&gt;
Cc: Suren Baghdasaryan &lt;surenb@google.com&gt;
Link: https://lkml.kernel.org/r/20200820170541.1132271-3-ckennelly@google.com
Link: https://lkml.kernel.org/r/20200821233848.3904680-3-ckennelly@google.com
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/exec: add file type errno tests</title>
<updated>2020-08-15T02:56:56Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2020-08-15T00:30:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0f71241a8e32baf9ac290cf915bc9b3ff265f7d3'/>
<id>urn:sha1:0f71241a8e32baf9ac290cf915bc9b3ff265f7d3</id>
<content type='text'>
Make sure execve() returns the expected errno values for non-regular
files.

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Marc Zyngier &lt;maz@kernel.org&gt;
Link: http://lkml.kernel.org/r/20200813231723.2725102-3-keescook@chromium.org
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'linux-kselftest-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2020-06-09T17:03:12Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2020-06-09T17:03:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc2fb38c85508a875fc2e95f1e14e0bdcf59e1e9'/>
<id>urn:sha1:fc2fb38c85508a875fc2e95f1e14e0bdcf59e1e9</id>
<content type='text'>
Pull kselftest updates from Shuah Khan:
 "This consists of:

   - Several fixes from Masami Hiramatsu to improve coverage for lib and
     sysctl tests.

   - Clean up to vdso test and a new test for getcpu() from Mark Brown.

   - Add new gen_tar selftests Makefile target generate selftest package
     running "make gen_tar" in selftests directory from Veronika
     Kabatova.

   - Other miscellaneous fixes to timens, exec, tpm2 tests"

* tag 'linux-kselftest-5.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
  selftests/sysctl: Make sysctl test driver as a module
  selftests/sysctl: Fix to load test_sysctl module
  lib: Make test_sysctl initialized as module
  lib: Make prime number generator independently selectable
  selftests/ftrace: Return unsupported if no error_log file
  selftests/ftrace: Use printf for backslash included command
  selftests/timens: handle a case when alarm clocks are not supported
  Kernel selftests: Add check if TPM devices are supported
  selftests: vdso: Add a selftest for vDSO getcpu()
  selftests: vdso: Use a header file to prototype parse_vdso API
  selftests: vdso: Rename vdso_test to vdso_test_gettimeofday
  selftests/exec: Verify execve of non-regular files fail
  selftests: introduce gen_tar Makefile target
</content>
</entry>
<entry>
<title>selftests/exec: Verify execve of non-regular files fail</title>
<updated>2020-05-22T15:29:00Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2020-05-18T04:47:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=61016db15b8e20f371352db6a75b044ec3183fe7'/>
<id>urn:sha1:61016db15b8e20f371352db6a75b044ec3183fe7</id>
<content type='text'>
Add a named pipe as an exec target to make sure that non-regular
files are rejected by execve() with EACCES. This can help verify
commit 73601ea5b7b1 ("fs/open.c: allow opening only regular files
during execve()").

Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/exec: Add binfmt_script regression test</title>
<updated>2020-05-21T15:24:39Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2020-05-20T09:05:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b081320f0693cce0394f7c8bad9fba0b25982186'/>
<id>urn:sha1:b081320f0693cce0394f7c8bad9fba0b25982186</id>
<content type='text'>
While working on commit b5372fe5dc84 ("exec: load_script: Do not exec
truncated interpreter path"), I wrote a series of test scripts to verify
corner cases. However, soon after, commit 6eb3c3d0a52d ("exec: increase
BINPRM_BUF_SIZE to 256") landed, resulting in the tests needing to be
refactored for the larger BINPRM_BUF_SIZE, which got lost on my TODO
list. During the recent exec refactoring work[1], the need for these tests
resurfaced, so I've finished them up for addition to the kernel selftests.

[1] https://lore.kernel.org/lkml/202005191144.E3112135@keescook/

Link: https://lkml.kernel.org/r/202005200204.D07DF079@keescook
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Eric W. Biederman &lt;ebiederm@xmission.com&gt;
</content>
</entry>
<entry>
<title>.gitignore: add SPDX License Identifier</title>
<updated>2020-03-25T10:50:48Z</updated>
<author>
<name>Masahiro Yamada</name>
<email>masahiroy@kernel.org</email>
</author>
<published>2020-03-03T13:35:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d198b34f3855eee2571dda03eea75a09c7c31480'/>
<id>urn:sha1:d198b34f3855eee2571dda03eea75a09c7c31480</id>
<content type='text'>
Add SPDX License Identifier to all .gitignore files.

Signed-off-by: Masahiro Yamada &lt;masahiroy@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 166</title>
<updated>2019-05-30T18:26:39Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-27T06:55:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4f19048fd0a0036e02443237952db5bfa5b5cdf0'/>
<id>urn:sha1:4f19048fd0a0036e02443237952db5bfa5b5cdf0</id>
<content type='text'>
Based on 1 normalized pattern(s):

  licensed under the terms of the gnu gpl license version 2

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-only

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

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Reviewed-by: Kate Stewart &lt;kstewart@linuxfoundation.org&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190527070033.929121379@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>exec selftests: test -&gt;recursion_depth</title>
<updated>2019-05-15T02:52:50Z</updated>
<author>
<name>Alexey Dobriyan</name>
<email>adobriyan@gmail.com</email>
</author>
<published>2019-05-14T22:44:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4e7301e6df9595e34e52acc18b943d00c4865e3d'/>
<id>urn:sha1:4e7301e6df9595e34e52acc18b943d00c4865e3d</id>
<content type='text'>
Test that trivially recursing script onto itself doesn't work.

Note: this is different test from ELOOP tests in execveat.c Those test
that execveat(2) doesn't follow symlinks when told to do so.

Link: http://lkml.kernel.org/r/20190423192720.GA21433@avx2
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&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>selftests: exec: return Kselftest Skip code for skipped tests</title>
<updated>2018-05-30T21:21:52Z</updated>
<author>
<name>Shuah Khan (Samsung OSG)</name>
<email>shuah@kernel.org</email>
</author>
<published>2018-05-03T00:24:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=964224d7a861955a07080e3acff481f6ff772546'/>
<id>urn:sha1:964224d7a861955a07080e3acff481f6ff772546</id>
<content type='text'>
When execveat test is skipped because of unmet dependencies and/or
unsupported configuration, it exits with error which is treated as
a fail by the Kselftest framework. This leads to false negative
result even when the test could not be run.

Change it to return kselftest skip code when a test gets skipped to
clearly report that the test could not be run.

Change it to use ksft_exit_skip() when kernel doesn't support execveat.

Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
</content>
</entry>
</feed>
