Spelling mistake (triple letters) in comment.
Detected with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall(a)inria.fr>
---
tools/testing/selftests/sync/sync_stress_parallelism.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/sync/sync_stress_parallelism.c b/tools/testing/selftests/sync/sync_stress_parallelism.c
index e6c9be671dfc..6ce56ca204c4 100644
--- a/tools/testing/selftests/sync/sync_stress_parallelism.c
+++ b/tools/testing/selftests/sync/sync_stress_parallelism.c
@@ -87,7 +87,7 @@ int test_stress_two_threads_shared_timeline(void)
/*
* Use a single timeline to synchronize two threads
- * hammmering on the same counter.
+ * hammering on the same counter.
*/
pthread_create(&a, NULL, (void *(*)(void *))
This series contains three fixup patches for vm selftests. They
are independent. Please see the patches.
Patrick Wang (3):
selftests: vm: check numa_available() before operating
"merge_across_nodes" in ksm_tests
selftests: vm: add "test_hmm.sh" to TEST_FILES
selftests: vm: add the "settings" file with timeout variable
tools/testing/selftests/vm/Makefile | 1 +
tools/testing/selftests/vm/ksm_tests.c | 9 ++++++---
tools/testing/selftests/vm/settings | 1 +
3 files changed, 8 insertions(+), 3 deletions(-)
create mode 100644 tools/testing/selftests/vm/settings
--
2.25.1
Add the following new guidelines:
- Add instruction to use lib.mk
- Add instruction about how to use headers from kernel source
- Add instruction to add .gitignore file
- Add instruction about how to add new test in selftests/Makefile
- Add instruction about different build commands to test
Signed-off-by: Muhammad Usama Anjum <usama.anjum(a)collabora.com>
---
Following patch is fixing build of kselftest when separate output
direcotry is specified using kernel's top most Makefile. It should be
accepted first:
https://lore.kernel.org/lkml/20220223191016.1658728-1-usama.anjum@collabora…
---
Documentation/dev-tools/kselftest.rst | 46 ++++++++++++++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst
index a833ecf12fbc1..637f83d1450dc 100644
--- a/Documentation/dev-tools/kselftest.rst
+++ b/Documentation/dev-tools/kselftest.rst
@@ -208,6 +208,13 @@ In general, the rules for selftests are
Contributing new tests (details)
================================
+ * Use lib.mk instead of writing Makefile from sratch. Specify flags and
+ binaries generation flags on need basis before including lib.mk. ::
+
+ CFLAGS = $(KHDR_INCLUDES)
+ TEST_GEN_PROGS := close_range_test
+ include ../lib.mk
+
* Use TEST_GEN_XXX if such binaries or files are generated during
compiling.
@@ -230,13 +237,50 @@ Contributing new tests (details)
* First use the headers inside the kernel source and/or git repo, and then the
system headers. Headers for the kernel release as opposed to headers
installed by the distro on the system should be the primary focus to be able
- to find regressions.
+ to find regressions. Use KHDR_INCLUDES in Makefile to include headers from
+ the kernel source.
* If a test needs specific kernel config options enabled, add a config file in
the test directory to enable them.
e.g: tools/testing/selftests/android/config
+ * Create a .gitignore file inside test directory and add all generated objects
+ in it.
+
+ * Add new test name in TARGETS in selftests/Makefile::
+
+ TARGETS += android
+
+ * All of the following build commands should be successful
+
+ - Same directory build of kselftests::
+
+ make kselftest-all
+ make kselftest-install
+ make kselftest-clean
+ make kselftest-gen_tar
+
+ - Build with absolute output directory path::
+
+ make kselftest-all O=/abs_build_path
+ make kselftest-install O=/abs_build_path
+ make kselftest-clean O=/abs_build_path
+ make kselftest-gen_tar O=/abs_build_path
+
+ - Build with relative output directory path::
+
+ make kselftest-all O=relative_path
+ make kselftest-install O=relative_path
+ make kselftest-clean O=relative_path
+ make kselftest-gen_tar O=relative_path
+
+ - Build from Makefile of selftests directly::
+
+ make -C tools/testing/selftests
+ make -C tools/testing/selftests O=/abs_build_path
+ make -C tools/testing/selftests O=relative_path
+
Test Module
===========
--
2.30.2
As suggested in [1], the kprobe_multi interface is to be fixed for 32-bit
architectures and compat, rather then disabled. As it turned out,
there are a couple of additional problems that are to be addressed:
- the absence of size overflow checks, leading to possible
out-of-bounds writes (addressed by the first patch; this one likely has
to be fixed in 5.18, where the version of the patch from [3]
may be preferrable, along with [4] to avoid applying the rest
of the series);
- the assumption that long has the same size as u64, which would make
cookies arrays size calculation incorrect on 32-bit architectures
(addressed by the second patch);
- the addrs array passing API, that is incompatible with compat and has
to be changed (addressed in the fourth patch): those are kernel
addresses and not user ones (as was incorrectly stated in [2]);
this change is only semantical for 64-bit user/kernelspace,
so it shouldn't impact ABI there, at least.
[1] https://lore.kernel.org/lkml/CAADnVQ+2gwhcMht4PuDnDOFKY68Wsq8QFz4Y69NBX_TLa…
[2] https://lore.kernel.org/lkml/20220510184155.GA8295@asgard.redhat.com/
[3] https://lore.kernel.org/lkml/20220516230455.GA25103@asgard.redhat.com/
[4] https://lore.kernel.org/lkml/20220506142148.GA24802@asgard.redhat.com/
v3:
- Rebased on top of bpf-next
- Removed unnecessary size/cookies_size assignments as suggested
by Yonghong Sond
v2: https://lore.kernel.org/lkml/20220516230441.GA22091@asgard.redhat.com/
- Fixed the isses reported by CI
v1: https://lore.kernel.org/lkml/20220516182657.GA28596@asgard.redhat.com/
Eugene Syromiatnikov (4):
bpf_trace: check size for overflow in bpf_kprobe_multi_link_attach
bpf_trace: support 32-bit kernels in bpf_kprobe_multi_link_attach
bpf_trace: handle compat in copy_user_syms
bpf_trace: pass array of u64 values in kprobe_multi.addrs
kernel/trace/bpf_trace.c | 67 ++++++++++++++++------
tools/lib/bpf/bpf.h | 2 +-
tools/lib/bpf/libbpf.c | 8 +--
tools/lib/bpf/libbpf.h | 2 +-
.../testing/selftests/bpf/prog_tests/bpf_cookie.c | 2 +-
.../selftests/bpf/prog_tests/kprobe_multi_test.c | 8 +--
6 files changed, 62 insertions(+), 27 deletions(-)
--
2.1.4
The ima_setup.sh is needed by test_progs test_ima. But the file is
missed if we build test_progs separately or installed bpf test to
another folder. This patch set fixed the issue in 2 different
scenarios.
Hangbin Liu (2):
selftests/bpf: Fix build error with ima_setup.sh
selftests/bpf: add missed ima_setup.sh in Makefile
tools/testing/selftests/bpf/Makefile | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--
2.35.1