<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/seccomp, branch v6.8</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=v6.8</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.8'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2024-01-30T15:55:42Z</updated>
<entry>
<title>kselftest/seccomp: Report each expectation we assert as a KTAP test</title>
<updated>2024-01-30T15:55:42Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2024-01-24T13:00:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b54761f6e9773350c0d1fb8e1e5aacaba7769d0f'/>
<id>urn:sha1:b54761f6e9773350c0d1fb8e1e5aacaba7769d0f</id>
<content type='text'>
The seccomp benchmark test makes a number of checks on the performance it
measures and logs them to the output but does so in a custom format which
none of the automated test runners understand meaning that the chances that
anyone is paying attention are slim. Let's additionally log each result in
KTAP format so that automated systems parsing the test output will see each
comparison as a test case. The original logs are left in place since they
provide the actual numbers for analysis.

As part of this rework the flow for the main program so that when we skip
tests we still log all the tests we skip, this is because the standard KTAP
headers and footers include counts of the number of expected and run tests.

Tested-by: Anders Roxell &lt;anders.roxell@linaro.org&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>kselftest/seccomp: Use kselftest output functions for benchmark</title>
<updated>2024-01-30T15:55:42Z</updated>
<author>
<name>Mark Brown</name>
<email>broonie@kernel.org</email>
</author>
<published>2024-01-24T13:00:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5820cfee443f8a90ea3eb9f99f57f2049a4a93c3'/>
<id>urn:sha1:5820cfee443f8a90ea3eb9f99f57f2049a4a93c3</id>
<content type='text'>
In preparation for trying to output the test results themselves in TAP
format rework all the prints in the benchmark to use the kselftest output
functions. The uses of system() all produce single line output so we can
avoid having to deal with fully managing the child process and continue to
use system() by simply printing an empty message before we invoke system().
We also leave one printf() used to complete a line of output in place.

Tested-by: Anders Roxell &lt;anders.roxell@linaro.org&gt;
Acked-by: Kees Cook &lt;keescook@chromium.org&gt;
Signed-off-by: Mark Brown &lt;broonie@kernel.org&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/seccomp: Handle arm32 corner cases better</title>
<updated>2023-08-10T20:26:19Z</updated>
<author>
<name>Kees Cook</name>
<email>keescook@chromium.org</email>
</author>
<published>2023-08-03T04:04:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fbc5d382407eb5d6a2eeef245cc2ca278d590645'/>
<id>urn:sha1:fbc5d382407eb5d6a2eeef245cc2ca278d590645</id>
<content type='text'>
It turns out arm32 doesn't handle syscall -1 gracefully, so skip testing
for that. Additionally skip tests that depend on clone3 when it is not
available (for example when building the seccomp selftests on an old arm
image without clone3 headers). And improve error reporting for when
nanosleep fails, as seen on arm32 since v5.15.

Cc: Lecopzer Chen &lt;lecopzer.chen@mediatek.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>selftest/seccomp: add a new test for the sync mode of seccomp_user_notify</title>
<updated>2023-07-17T23:08:08Z</updated>
<author>
<name>Andrei Vagin</name>
<email>avagin@google.com</email>
</author>
<published>2023-03-08T07:32:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8feae5adec17ec190118ad84da84a6ad9fa3e30b'/>
<id>urn:sha1:8feae5adec17ec190118ad84da84a6ad9fa3e30b</id>
<content type='text'>
Test output:
 #  RUN           global.user_notification_sync ...
 #            OK  global.user_notification_sync
 ok 51 global.user_notification_sync

Signed-off-by: Andrei Vagin &lt;avagin@google.com&gt;
Acked-by: "Peter Zijlstra (Intel)" &lt;peterz@infradead.org&gt;
Link: https://lore.kernel.org/r/20230308073201.3102738-6-avagin@google.com
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'loongarch-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson</title>
<updated>2023-03-01T17:27:00Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-03-01T17:27:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a8356cdb5bd5abc74f814d76bd37900997fad35d'/>
<id>urn:sha1:a8356cdb5bd5abc74f814d76bd37900997fad35d</id>
<content type='text'>
Pull LoongArch updates from Huacai Chen:

 - Make -mstrict-align configurable

 - Add kernel relocation and KASLR support

 - Add single kernel image implementation for kdump

 - Add hardware breakpoints/watchpoints support

 - Add kprobes/kretprobes/kprobes_on_ftrace support

 - Add LoongArch support for some selftests.

* tag 'loongarch-6.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson: (23 commits)
  selftests/ftrace: Add LoongArch kprobe args string tests support
  selftests/seccomp: Add LoongArch selftesting support
  tools: Add LoongArch build infrastructure
  samples/kprobes: Add LoongArch support
  LoongArch: Mark some assembler symbols as non-kprobe-able
  LoongArch: Add kprobes on ftrace support
  LoongArch: Add kretprobes support
  LoongArch: Add kprobes support
  LoongArch: Simulate branch and PC* instructions
  LoongArch: ptrace: Add hardware single step support
  LoongArch: ptrace: Add function argument access API
  LoongArch: ptrace: Expose hardware breakpoints to debuggers
  LoongArch: Add hardware breakpoints/watchpoints support
  LoongArch: kdump: Add crashkernel=YM handling
  LoongArch: kdump: Add single kernel image implementation
  LoongArch: Add support for kernel address space layout randomization (KASLR)
  LoongArch: Add support for kernel relocation
  LoongArch: Add la_abs macro implementation
  LoongArch: Add JUMP_VIRT_ADDR macro implementation to avoid using la.abs
  LoongArch: Use la.pcrel instead of la.abs when it's trivially possible
  ...
</content>
</entry>
<entry>
<title>selftests/seccomp: Add LoongArch selftesting support</title>
<updated>2023-02-25T14:12:18Z</updated>
<author>
<name>Huacai Chen</name>
<email>chenhuacai@loongson.cn</email>
</author>
<published>2023-02-25T07:52:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eb4071b988397144a35c4aa98061f587cbb3b467'/>
<id>urn:sha1:eb4071b988397144a35c4aa98061f587cbb3b467</id>
<content type='text'>
BPF for LoongArch is supported now, add the selftesting support in
seccomp_bpf.c.

Signed-off-by: Tiezhu Yang &lt;yangtiezhu@loongson.cn&gt;
Signed-off-by: Huacai Chen &lt;chenhuacai@loongson.cn&gt;
</content>
</entry>
<entry>
<title>Merge tag 'linux-kselftest-next-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest</title>
<updated>2023-02-23T17:37:29Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-02-23T17:37:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d6296cb65320be16dbf20f2fd584ddc25f3437cd'/>
<id>urn:sha1:d6296cb65320be16dbf20f2fd584ddc25f3437cd</id>
<content type='text'>
Pull Kselftest update from Shuah Khan:

 - several patches to fix incorrect kernel headers search path from
   Mathieu Desnoyers

 - a few follow-on fixes found during testing the above change

 - miscellaneous fixes

 - support for filtering and enumerating tests

* tag 'linux-kselftest-next-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (40 commits)
  selftests/user_events: add a note about user_events.h dependency
  selftests/mount_setattr: fix to make run_tests failure
  selftests/mount_setattr: fix redefine struct mount_attr build error
  selftests/sched: fix warn_unused_result build warns
  selftests/ptp: Remove clean target from Makefile
  selftests: use printf instead of echo -ne
  selftests/ftrace: Fix bash specific "==" operator
  selftests: tpm2: remove redundant ord()
  selftests: find echo binary to use -ne options
  selftests: Fix spelling mistake "allright" -&gt; "all right"
  selftests: tdx: Use installed kernel headers search path
  selftests: ptrace: Use installed kernel headers search path
  selftests: memfd: Use installed kernel headers search path
  selftests: iommu: Use installed kernel headers search path
  selftests: x86: Fix incorrect kernel headers search path
  selftests: vm: Fix incorrect kernel headers search path
  selftests: user_events: Fix incorrect kernel headers search path
  selftests: sync: Fix incorrect kernel headers search path
  selftests: seccomp: Fix incorrect kernel headers search path
  selftests: sched: Fix incorrect kernel headers search path
  ...
</content>
</entry>
<entry>
<title>selftests: seccomp: Fix incorrect kernel headers search path</title>
<updated>2023-02-13T16:09:45Z</updated>
<author>
<name>Mathieu Desnoyers</name>
<email>mathieu.desnoyers@efficios.com</email>
</author>
<published>2023-01-27T13:57:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=07d42dd854446ba3177ad7a217870a5b4edee165'/>
<id>urn:sha1:07d42dd854446ba3177ad7a217870a5b4edee165</id>
<content type='text'>
Use $(KHDR_INCLUDES) as lookup path for kernel headers. This prevents
building against kernel headers from the build environment in scenarios
where kernel headers are installed into a specific output directory
(O=...).

Signed-off-by: Mathieu Desnoyers &lt;mathieu.desnoyers@efficios.com&gt;
Cc: Shuah Khan &lt;shuah@kernel.org&gt;
Cc: linux-kselftest@vger.kernel.org
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;  # 5.18+
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>selftests/seccomp: Add m68k support</title>
<updated>2023-01-30T15:40:15Z</updated>
<author>
<name>Michael Schmitz</name>
<email>schmitzmic@gmail.com</email>
</author>
<published>2023-01-12T03:55:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=be6c50d315f92071e481eacd1c0260cb4f7c325f'/>
<id>urn:sha1:be6c50d315f92071e481eacd1c0260cb4f7c325f</id>
<content type='text'>
Add m68k seccomp definitions to seccomp_bpf self test code.

Tested on ARAnyM.

Signed-off-by: Michael Schmitz &lt;schmitzmic@gmail.com&gt;
Reviewed-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
Link: https://lore.kernel.org/r/20230112035529.13521-4-schmitzmic@gmail.com
Signed-off-by: Geert Uytterhoeven &lt;geert@linux-m68k.org&gt;
</content>
</entry>
<entry>
<title>selftests/seccomp: Check CAP_SYS_ADMIN capability in the test mode_filter_without_nnp</title>
<updated>2022-12-02T19:32:53Z</updated>
<author>
<name>Gautam Menghani</name>
<email>gautammenghani201@gmail.com</email>
</author>
<published>2022-07-31T09:25:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fc1e3980044f0f812252f5f164a8350376d62eb7'/>
<id>urn:sha1:fc1e3980044f0f812252f5f164a8350376d62eb7</id>
<content type='text'>
In the "mode_filter_without_nnp" test in seccomp_bpf, there is currently
a TODO which asks to check the capability CAP_SYS_ADMIN instead of euid.
This patch adds support to check if the calling process has the flag
CAP_SYS_ADMIN, and also if this flag has CAP_EFFECTIVE set.

Signed-off-by: Gautam Menghani &lt;gautammenghani201@gmail.com&gt;
Signed-off-by: Kees Cook &lt;keescook@chromium.org&gt;
Link: https://lore.kernel.org/r/20220731092529.28760-1-gautammenghani201@gmail.com
</content>
</entry>
</feed>
