Correct few spelling mistakes in selftest output messages to improve
readability
Signed-off-by: bhanuseshukumar <bhanuseshukumar(a)gmail.com>
---
This fix is part of kselftest pre-requisite task for kernel mentorship fall 2025.
--changes in v2 to v1
grammar fix : instead -> instead of
tools/testing/selftests/futex/functional/futex_priv_hash.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/testing/selftests/futex/functional/futex_priv_hash.c b/tools/testing/selftests/futex/functional/futex_priv_hash.c
index aea001ac4946..8a5735391f2e 100644
--- a/tools/testing/selftests/futex/functional/futex_priv_hash.c
+++ b/tools/testing/selftests/futex/functional/futex_priv_hash.c
@@ -132,7 +132,7 @@ static void usage(char *prog)
{
printf("Usage: %s\n", prog);
printf(" -c Use color\n");
- printf(" -g Test global hash instead intead local immutable \n");
+ printf(" -g Test global hash instead of local immutable \n");
printf(" -h Display this help message\n");
printf(" -v L Verbosity level: %d=QUIET %d=CRITICAL %d=INFO\n",
VQUIET, VCRITICAL, VINFO);
@@ -267,7 +267,7 @@ int main(int argc, char *argv[])
join_max_threads();
ret = futex_hash_slots_get();
- ksft_test_result(ret == 2, "No more auto-resize after manaul setting, got %d\n",
+ ksft_test_result(ret == 2, "No more auto-resize after manual setting, got %d\n",
ret);
futex_hash_slots_set_must_fail(1 << 29);
--
2.34.1
Make ncdevmem clean up after itself. While at it make sure it sets
HDS threshold to 0 automatically.
v2: rework patch 4 into separate patches 4 and 5
v1: https://lore.kernel.org/20250822200052.1675613-1-kuba@kernel.org
Jakub Kicinski (5):
selftests: drv-net: ncdevmem: remove use of error()
selftests: drv-net: ncdevmem: save IDs of flow rules we added
selftests: drv-net: ncdevmem: restore old channel config
selftests: drv-net: ncdevmem: restore original HDS setting before
exiting
selftests: drv-net: ncdevmem: explicitly set HDS threshold to 0
.../selftests/drivers/net/hw/ncdevmem.c | 796 +++++++++++++-----
1 file changed, 588 insertions(+), 208 deletions(-)
--
2.51.0
When using GCC on x86-64 to compile an usdt prog with -O1 or higher
optimization, the compiler will generate SIB addressing mode for global
array and PC-relative addressing mode for global variable,
e.g. "1@-96(%rbp,%rax,8)" and "-1@4+t1(%rip)".
The current USDT implementation in libbpf cannot parse these two formats,
causing `bpf_program__attach_usdt()` to fail with -ENOENT
(unrecognized register).
This patch series adds support for SIB addressing mode in USDT probes.
The main changes include:
- add correct handling logic for SIB-addressed arguments in
`parse_usdt_arg`.
- add an usdt_o2 test case to cover SIB addressing mode.
Testing shows that the SIB probe correctly generates 8@(%rcx,%rax,8)
argument spec and passes all validation checks.
The modification history of this patch series:
Change since v1:
- refactor the code to make it more readable
- modify the commit message to explain why and how
Change since v2:
- fix the `scale` uninitialized error
Change since v3:
- force -O2 optimization for usdt.test.o to generate SIB addressing usdt
and pass all test cases.
Change since v4:
- split the patch into two parts, one for the fix and the other for the
test
Change since v5:
- Only enable optimization for x86 architecture to generate SIB addressing
usdt argument spec.
Change since v6:
- Add an usdt_o2 test case to cover SIB addressing mode.
- Reinstate the usdt.c test case.
Change since v7:
- Refactor modifications to __bpf_usdt_arg_spec to avoid increasing its size,
achieving better compatibility
- Fix some minor code style issues
- Refactor the usdt_o2 test case, removing semaphore and adding GCC attribute
to force -O2 optimization
Change since v8:
- Refactor the usdt_o2 test case, using assembly to force SIB addressing mode.
Change since v9:
- Only enable the usdt_o2 test case on x86_64 and i386 architectures since the
SIB addressing mode is only supported on x86_64 and i386.
Change since v10:
- Replace `__attribute__((optimize("O2")))` with `#pragma GCC optimize("O1")`
to fix the issue where the optimized compilation condition works improperly.
- Renamed test case usdt_o2 and relevant files name to usdt_o1 in that O1
level optimization is enough to generate SIB addressing usdt argument spec.
Change since v11:
- Replace `STAP_PROBE1` with `STAP_PROBE_ASM`
- Use bit fields instead of bit shifting operations
- Merge the usdt_o1 test case into the usdt test case
Change since v12:
- This patch is same with the v12 but with a new version number.
Change since v13(resolve some review comments):
- https://lore.kernel.org/bpf/CAEf4BzZWd2zUC=U6uGJFF3EMZ7zWGLweQAG3CJWTeHy-5y…
- https://lore.kernel.org/bpf/CAEf4Bzbs3hV_Q47+d93tTX13WkrpkpOb4=U04mZCjHyZg4…
Change since v14:
- fix a typo in __bpf_usdt_arg_spec
Jiawei Zhao (2):
libbpf: fix USDT SIB argument handling causing unrecognized register
error
selftests/bpf: Enrich subtest_basic_usdt case in selftests to cover
SIB handling logic
tools/lib/bpf/usdt.bpf.h | 44 ++++++++++++-
tools/lib/bpf/usdt.c | 57 +++++++++++++++--
tools/testing/selftests/bpf/prog_tests/usdt.c | 62 ++++++++++++++++++-
tools/testing/selftests/bpf/progs/test_usdt.c | 32 ++++++++++
4 files changed, 186 insertions(+), 9 deletions(-)
--
2.43.0
The __nolibc_enosys() fallback is used when the UAPI headers do not
provide a certain syscall number or any possible fallback syscall.
This is either because the syscall definition is fairly new and nolibc
tries to be compatible with old UAPI headers or an architecture does not
support a syscall at all.
Many of these __nolibc_enosys() fallbacks have become unnecessary.
Either because the "new" syscalls or not so new anymore or real
fallbacks have been implemented in the meantime.
Unnecessary usages of __nolibc_enosys() as it is not obvious anymore if
a given function is really implemented on all architectures.
Signed-off-by: Thomas Weißschuh <linux(a)weissschuh.net>
---
Thomas Weißschuh (7):
tools/nolibc: remove __nolibc_enosys() fallback from time64-related functions
tools/nolibc: remove __nolibc_enosys() fallback from *at() functions
tools/nolibc: remove __nolibc_enosys() fallback from dup2()
tools/nolibc: remove __nolibc_enosys() fallback from fork functions
tools/nolibc: fold llseek fallback into lseek()
kselftest/arm64: tpidr2: Switch to waitpid() over wait4()
tools/nolibc: drop wait4() support
tools/include/nolibc/poll.h | 4 +-
tools/include/nolibc/sys.h | 90 +++++++++---------------------
tools/include/nolibc/sys/timerfd.h | 8 +--
tools/include/nolibc/sys/wait.h | 17 ------
tools/include/nolibc/time.h | 8 +--
tools/testing/selftests/arm64/abi/tpidr2.c | 6 +-
6 files changed, 34 insertions(+), 99 deletions(-)
---
base-commit: 850047b19741490631855a475ccaa3ed29316039
change-id: 20250821-nolibc-enosys-2b2ec0b505ba
Best regards,
--
Thomas Weißschuh <linux(a)weissschuh.net>
update SKIP_TARGETS logic so that these targets are skipped when
TARGETS is taken from the Makefile but not when TARGETS is specified
via the command line
Signed-off-by: I Viswanath <viswanathiyyappan(a)gmail.com>
---
Currenly you can't run these targets by overriding the TARGETS variable in command line due to
how the SKIP_TARGETS logic is implemented, i.e. bpf and sched_ext are always filtered out.
tools/testing/selftests/Makefile | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile
index 030da61dbff3..42ff6bb4ea87 100644
--- a/tools/testing/selftests/Makefile
+++ b/tools/testing/selftests/Makefile
@@ -144,7 +144,10 @@ endif
# User can optionally provide a TARGETS skiplist. By default we skip
# targets using BPF since it has cutting edge build time dependencies
# which require more effort to install.
-SKIP_TARGETS ?= bpf sched_ext
+ifeq ($(origin TARGETS), file)
+ SKIP_TARGETS ?= bpf sched_ext
+endif
+
ifneq ($(SKIP_TARGETS),)
TMP := $(filter-out $(SKIP_TARGETS), $(TARGETS))
override TARGETS := $(TMP)
--
2.50.1