]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
selftests/landlock: Add filesystem access benchmark
authorGünther Noack <gnoack3000@gmail.com>
Fri, 6 Feb 2026 15:11:53 +0000 (16:11 +0100)
committerMickaël Salaün <mic@digikod.net>
Tue, 10 Feb 2026 15:46:42 +0000 (16:46 +0100)
commit9adbe8935152c511c1e43a47d69f44f0e969afc8
tree2d4238c96345896e2ce0719cae76ae0bf7154ceb
parentde4b09abf088ba0a6a0bebb8b618fd29b9ce5c35
selftests/landlock: Add filesystem access benchmark

fs_bench benchmarks the performance of Landlock's path walk
by exercising it in a scenario that amplifies Landlock's overhead:

* Create a large number of nested directories
* Enforce a Landlock policy in which a rule is associated with each of
  these subdirectories
* Benchmark openat() applied to the deepest directory,
  forcing Landlock to walk the entire path.

Signed-off-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20260206151154.97915-3-gnoack3000@gmail.com
[mic: Fix missing mode with O_CREAT, improve text consistency, sort
includes]
Signed-off-by: Mickaël Salaün <mic@digikod.net>
tools/testing/selftests/landlock/.gitignore
tools/testing/selftests/landlock/Makefile
tools/testing/selftests/landlock/fs_bench.c [new file with mode: 0644]