[PATCH v5] tools/testing:Fix the wrong format specifier

2024-07-25 Thread Zhu Jun
The format specifier in fprintf is "%u", that "%u" should use unsigned int type instead.the problem is discovered by reading code. Signed-off-by: Zhu Jun --- v1->v2: modify commit info add how to find the problem in the log v2->v3: Seems this can use macro WTERMSIG like those ab

Re: [RFC PATCH v5 10/29] KVM: selftests: TDX: Adding test case for TDX port IO

2024-07-25 Thread Sagi Shahar
On Sun, Mar 3, 2024 at 8:49 PM Yan Zhao wrote: > > On Tue, Dec 12, 2023 at 12:46:25PM -0800, Sagi Shahar wrote: > > From: Erdem Aktas > > > > Verifies TDVMCALL READ and WRITE operations. > > > > Signed-off-by: Erdem Aktas > > Signed-off-by: Sagi Shahar > > Signed-off-by: Ackerley Tng > > Signe

Re: [PATCH net] virtio: fix GSO with frames unaligned to size

2024-07-25 Thread Willem de Bruijn
On Thu, Jul 25, 2024 at 10:27 AM Willem de Bruijn wrote: > > On Thu, Jul 25, 2024 at 5:22 AM Denis Arefev wrote: > > > > I checked the patch on three reproducers and all three DEFINITELY broke the > > core. > > > > There are two malfunctions. > > > > 1. No flag skb_shinfo(skb)->tx_flags |= SKBFL

Re: [RFC PATCH v5 09/29] KVM: selftests: TDX: Add report_fatal_error test

2024-07-25 Thread Sagi Shahar
On Fri, Mar 1, 2024 at 12:52 AM Binbin Wu wrote: > > > > On 12/13/2023 4:46 AM, Sagi Shahar wrote: > > The test checks report_fatal_error functionality. > > > > Signed-off-by: Sagi Shahar > > Signed-off-by: Ackerley Tng > > Signed-off-by: Ryan Afranji > > --- > > .../selftests/kvm/include/x86

Re: [PATCH bpf-next v1 7/8] selftests/bpf: Fix using stdout, stderr as struct field names

2024-07-25 Thread Andrii Nakryiko
On Thu, Jul 25, 2024 at 3:39 AM Tony Ambardar wrote: > > From: Tony Ambardar > > Typically stdin, stdout, stderr are treated as reserved identifiers under > ISO/ANSI C, and a libc implementation is free to define these as macros. Ok, wow that. Do you have a pointer to where in the standard it is

Re: [PATCH bpf-next v1 6/8] selftests/bpf: Fix compile if backtrace support missing in libc

2024-07-25 Thread Andrii Nakryiko
On Thu, Jul 25, 2024 at 3:39 AM Tony Ambardar wrote: > > From: Tony Ambardar > > Use backtrace functions only with glibc and otherwise provide stubs in > test_progs.c. This avoids compile errors (e.g. with musl libc) like: > > test_progs.c:13:10: fatal error: execinfo.h: No such file or directo

Re: [PATCH bpf-next v1 5/8] selftests/bpf: Fix order-of-include compile errors in lwt_reroute.c

2024-07-25 Thread Andrii Nakryiko
On Thu, Jul 25, 2024 at 3:39 AM Tony Ambardar wrote: > > From: Tony Ambardar > > Fix redefinition errors seen compiling lwt_reroute.c for mips64el/musl-libc > by adjusting the order of includes in lwt_helpers.h. The ordering required > is: > --> (from "test_progs.h") --> . > > Because of th

Re: [PATCH bpf-next v1 2/8] selftests/bpf: Fix arg parsing in veristat, test_progs

2024-07-25 Thread Andrii Nakryiko
On Thu, Jul 25, 2024 at 3:39 AM Tony Ambardar wrote: > > From: Tony Ambardar > > Current code parses arguments with strtok_r() using a construct like > > char *state = NULL; > while ((next = strtok_r(state ? NULL : input, ",", &state))) { > ... > } > > where logic assumes the

Re: [RFC PATCH v5 08/29] KVM: selftests: TDX: Add TDX lifecycle test

2024-07-25 Thread Sagi Shahar
On Fri, Mar 22, 2024 at 4:33 PM Chen, Zide wrote: > > > > On 12/12/2023 12:46 PM, Sagi Shahar wrote: > > From: Erdem Aktas > > > > Adding a test to verify TDX lifecycle by creating a TD and running a > > dummy TDG.VP.VMCALL inside it. > > > > Signed-off-by: Erdem Aktas > > Signed-off-by: Ryan A

Re: [PATCH v8 00/13] riscv: Add support for xtheadvector

2024-07-25 Thread patchwork-bot+linux-riscv
Hello: This series was applied to riscv/linux.git (for-next) by Palmer Dabbelt : On Wed, 24 Jul 2024 21:16:17 -0700 you wrote: > xtheadvector is a custom extension that is based upon riscv vector > version 0.7.1 [1]. All of the vector routines have been modified to > support this alternative vect

Re: [RFC PATCH v5 07/29] KVM: selftests: TDX: Update load_td_memory_region for VM memory backed by guest memfd

2024-07-25 Thread Ackerley Tng
Ackerley Tng writes: > Yan Zhao writes: > >> On Tue, Dec 12, 2023 at 12:46:22PM -0800, Sagi Shahar wrote: >>> From: Ackerley Tng >>> >>> If guest memory is backed by restricted memfd >>> >>> + UPM is being used, hence encrypted memory region has to be >>> registered >>> + Can avoid making

Re: [PATCH v2] kselftest: cpufreq: Add RTC wakeup alarm

2024-07-25 Thread Shuah Khan
On 7/24/24 21:57, Viresh Kumar wrote: On 16-07-24, 00:56, Shreeya Patel wrote: Add RTC wakeup alarm for devices to resume after specific time interval. This improvement in the test will help in enabling this test in the CI systems and will eliminate the need of manual intervention for resuming b

Re: [RFC PATCH 1/1] kselftests: Add test to detect boot event slowdowns

2024-07-25 Thread Shuah Khan
On 7/25/24 05:06, Laura Nao wrote: Introduce a new kselftest to identify slowdowns in key boot events. The test uses ftrace to track timings for specific boot events. The kprobe_timestamps_to_yaml.py script can be run once to generate a YAML file with the initial reference timestamps for these ev

Re: [RFC PATCH 0/1] Add kselftest to detect boot event slowdowns

2024-07-25 Thread Shuah Khan
On 7/25/24 05:06, Laura Nao wrote: Add a new kselftest to detect and report slowdowns in key boot events. The test uses ftrace to track timings for specific boot events and compares these timestamps against reference values provided in YAML format. The test includes the following files: - `b

Re: [PATCH HID 0/4] HID: selftest fixes after merge into 6.11-rc0 tree

2024-07-25 Thread Jiri Kosina
On Tue, 23 Jul 2024, Benjamin Tissoires wrote: > After HID-BPF struct_ops was merged into 6.11-rc0, there are a few > mishaps: > - the bpf_wq API changed and needs to be updated here > - libbpf now auto-attach all the struct_ops it sees in the bpf object, > leading to attempting at attaching the

Re: [PATCH v4] tools/testing:Fix the wrong format specifier

2024-07-25 Thread Shuah Khan
On 7/24/24 20:34, Zhu Jun wrote: The format specifier in fprintf is "%u", that "%u" should use unsigned int type instead.the problem is discovered by reading code. Signed-off-by: Zhu Jun --- v1->v2: modify commit info add how to find the problem in the log v2->v3: Seems this

Re: [PATCH v2] selftests: lib: remove strscpy test

2024-07-25 Thread Shuah Khan
On 7/25/24 06:11, Muhammad Usama Anjum wrote: The strscpy test loads test_strscpy module for testing. But test_strscpy was converted to Kunit (see fixes). Hence remove strscpy. Fixes: 41eefc46a3a4 ("string: Convert strscpy() self-test to KUnit") Remove fixes tag - this isn't a fix and we don't

Re: [PATCH] selftests: user: remove user suite

2024-07-25 Thread Shuah Khan
On 7/25/24 05:08, Muhammad Usama Anjum wrote: The user test suite has only one test, test_user_copy which loads test_user_copy module for testing. But test_user_copy module has already been converted to kunit (see fixes). Hence remove the entire suite. Fixes: cf6219ee889f ("usercopy: Convert tes

Re: [PATCH net] virtio: fix GSO with frames unaligned to size

2024-07-25 Thread Willem de Bruijn
On Thu, Jul 25, 2024 at 5:22 AM Denis Arefev wrote: > > I checked the patch on three reproducers and all three DEFINITELY broke the > core. > > There are two malfunctions. > > 1. No flag skb_shinfo(skb)->tx_flags |= SKBFL_SHARED_FRAG; > If it is not set then __skb_linearize will not be executed

Re: [PATCH v2 06/10] selftests: kvm: s390: Add VM run test case

2024-07-25 Thread Christoph Schlameuss
On Thu, 25 Jul 2024 14:03:12 +0200 Janosch Frank wrote: > On 7/23/24 11:31, Christoph Schlameuss wrote: > > Add test case running code interacting with registers within a > > ucontrol VM. > > > > * Add uc_gprs test case > > > > The test uses the same VM setup using the fixture and debug macros

[PATCH 3/3] selftests/bpf: add wrong type test to cgroup dev

2024-07-25 Thread eBPF Foundation
Current cgroup_dev test mostly tests that device operation is accepted or refused base on passed major/minor (and so, any operation performed during test involves only char device) Add a small subtest ensuring that the device type passed to bpf program allows it to take decisions as well. Signed-

[PATCH 2/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-25 Thread eBPF Foundation
test_dev_cgroup is defined as a standalone test program, and so is not executed in CI. Convert it to test_progs framework so it is tested automatically in CI, and remove the old test. In order to be able to run it in test_progs, /dev/null must remain usable, so change the new test to test operatio

[PATCH 1/3] selftests/bpf: do not disable /dev/null device access in cgroup dev test

2024-07-25 Thread eBPF Foundation
test_dev_cgroup currently loads a small bpf program allowing any access on urandom and zero devices, disabling access to any other device. It makes migrating this test to test_progs impossible, since this one manipulates extensively /dev/null. Allow /dev/null manipulation in dev_cgroup program to

[PATCH 0/3] selftests/bpf: convert test_dev_cgroup to test_progs

2024-07-25 Thread eBPF Foundation
Hello, this small series aims to integrate test_dev_cgroup in test_progs so it could be run automatically in CI. The new version brings a few differences with the current one: - test now uses directly syscalls instead of wrapping commandline tools into system() calls - test_progs manipulates /dev

Re: [PATCH v4 0/2] selftests/bpf: convert test_xdp_veth to test_progs framework

2024-07-25 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Daniel Borkmann : On Sun, 21 Jul 2024 21:33:02 +0200 you wrote: > Hello everyone, > > this small series is a first step in a larger effort aiming to help improve > eBPF selftests and the testing coverage in CI. It focuses for now on

[PATCH v2] selftests: lib: remove strscpy test

2024-07-25 Thread Muhammad Usama Anjum
The strscpy test loads test_strscpy module for testing. But test_strscpy was converted to Kunit (see fixes). Hence remove strscpy. Fixes: 41eefc46a3a4 ("string: Convert strscpy() self-test to KUnit") Signed-off-by: Muhammad Usama Anjum --- Changes since v1: - Remove from Makefile and config file

Re: [PATCH v2 06/10] selftests: kvm: s390: Add VM run test case

2024-07-25 Thread Janosch Frank
On 7/23/24 11:31, Christoph Schlameuss wrote: Add test case running code interacting with registers within a ucontrol VM. * Add uc_gprs test case The test uses the same VM setup using the fixture and debug macros introduced in earlier patches in this series. Signed-off-by: Christoph Schlameuss

[PATCH] selftests: lib: remove strscpy test

2024-07-25 Thread Muhammad Usama Anjum
The strscpy test loads test_strscpy module for testing. But test_strscpy was converted to Kunit (see fixes). Hence remove strscpy. Fixes: 41eefc46a3a4 ("string: Convert strscpy() self-test to KUnit") Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/lib/strscpy.sh | 3 --- 1 file c

[PATCH] selftests: user: remove user suite

2024-07-25 Thread Muhammad Usama Anjum
The user test suite has only one test, test_user_copy which loads test_user_copy module for testing. But test_user_copy module has already been converted to kunit (see fixes). Hence remove the entire suite. Fixes: cf6219ee889f ("usercopy: Convert test_user_copy to KUnit test") Signed-off-by: Muham

[RFC PATCH 1/1] kselftests: Add test to detect boot event slowdowns

2024-07-25 Thread Laura Nao
Introduce a new kselftest to identify slowdowns in key boot events. The test uses ftrace to track timings for specific boot events. The kprobe_timestamps_to_yaml.py script can be run once to generate a YAML file with the initial reference timestamps for these events. The test_boot_time.py script ca

[RFC PATCH 0/1] Add kselftest to detect boot event slowdowns

2024-07-25 Thread Laura Nao
Add a new kselftest to detect and report slowdowns in key boot events. The test uses ftrace to track timings for specific boot events and compares these timestamps against reference values provided in YAML format. The test includes the following files: - `bootconfig` file: configures ftrace and

[PATCH bpf-next v1 8/8] selftests/bpf: Fix error compiling tc_redirect.c with musl libc

2024-07-25 Thread Tony Ambardar
From: Tony Ambardar Linux 5.1 implemented 64-bit time types and related syscalls to address the Y2038 problem generally across archs. Userspace handling of Y2038 varies with the libc however. While musl libc uses 64-bit time across all 32-bit and 64-bit platforms, GNU glibc uses 64-bit time on 64

[PATCH bpf-next v1 7/8] selftests/bpf: Fix using stdout, stderr as struct field names

2024-07-25 Thread Tony Ambardar
From: Tony Ambardar Typically stdin, stdout, stderr are treated as reserved identifiers under ISO/ANSI C, and a libc implementation is free to define these as macros. This is the case in musl libc and results in compile errors when these names are reused as struct fields, as with 'struct test_env

[PATCH bpf-next v1 6/8] selftests/bpf: Fix compile if backtrace support missing in libc

2024-07-25 Thread Tony Ambardar
From: Tony Ambardar Use backtrace functions only with glibc and otherwise provide stubs in test_progs.c. This avoids compile errors (e.g. with musl libc) like: test_progs.c:13:10: fatal error: execinfo.h: No such file or directory 13 | #include /* backtrace */ | ^~~~

[PATCH bpf-next v1 5/8] selftests/bpf: Fix order-of-include compile errors in lwt_reroute.c

2024-07-25 Thread Tony Ambardar
From: Tony Ambardar Fix redefinition errors seen compiling lwt_reroute.c for mips64el/musl-libc by adjusting the order of includes in lwt_helpers.h. The ordering required is: --> (from "test_progs.h") --> . Because of the complexity and large number of includes, ordering appears to be frag

[PATCH bpf-next v1 4/8] selftests/bpf: Fix C++ compile error from missing _Bool type

2024-07-25 Thread Tony Ambardar
From: Tony Ambardar While building, bpftool makes a skeleton from test_core_extern.c, which itself includes and uses the 'bool' type. However, the skeleton test_core_extern.skel.h generated *does not* include or use the 'bool' type, instead using the C-only '_Bool' type. Compiling test_cpp.cpp

[PATCH bpf-next v1 3/8] selftests/bpf: Fix error compiling test_lru_map.c

2024-07-25 Thread Tony Ambardar
From: Tony Ambardar Although the post-increment in macro 'CPU_SET(next++, &cpuset)' seems safe, the sequencing can raise compile errors, so move the increment outside the macro. This avoids an error seen using gcc 12.3.0 for mips64el/musl-libc: In file included from test_lru_map.c:11: test_l

[PATCH bpf-next v1 2/8] selftests/bpf: Fix arg parsing in veristat, test_progs

2024-07-25 Thread Tony Ambardar
From: Tony Ambardar Current code parses arguments with strtok_r() using a construct like char *state = NULL; while ((next = strtok_r(state ? NULL : input, ",", &state))) { ... } where logic assumes the 'state' var can distinguish between first and subsequent strtok_r() calls

[PATCH bpf-next v1 1/8] selftests/bpf: Use portable POSIX basename()

2024-07-25 Thread Tony Ambardar
From: Tony Ambardar Use the POSIX version of basename() to allow compilation against non-gnu libc (e.g. musl). Include ahead of to enable using functions from the latter while preferring POSIX over GNU basename(). In veristat.c, rely on strdupa() to avoid basename() altering the passed "const

[PATCH bpf-next v1 0/8] selftests/bpf: Improve libc portability / musl support (part 2)

2024-07-25 Thread Tony Ambardar
From: Tony Ambardar Hello all, This is part 2 of a series of fixes for libc-related issues encountered building for musl-based systems. The series has been tested with the kernel-patches/bpf CI and locally using mips64el-gcc/musl-libc and QEMU with an OpenWrt rootfs. The patches cover a few are

[PATCH net] virtio: fix GSO with frames unaligned to size

2024-07-25 Thread Denis Arefev
Here are the open-source reproducers: https://groups.google.com/g/syzkaller-lts-bugs/c/L-bg0Q8fMqg/m/OdVlQWaBAgAJ https://groups.google.com/g/syzkaller-lts-bugs/c/gXOw2lJIFdM/m/4bnSETnTBQAJ https://syzkaller.appspot.com/bug?extid=e1db31216c789f552871 https://lore.kernel.org/netdev/5039

Re: [PATCH v5 2/5] cgroup/pids: Make event counters hierarchical

2024-07-25 Thread Michal Koutný
Hello Jianfeng. On Tue, Jul 16, 2024 at 11:27:39AM GMT, xiujianfeng wrote: > On 2024/7/3 14:59, xiujianfeng wrote: ... > > for (; parent_pids(p); p = parent_pids(p)) { > > if (p == pids_over_limit) { > > limit = true; > > at

[PATCH net] virtio: fix GSO with frames unaligned to size

2024-07-25 Thread Denis Arefev
I checked the patch on three reproducers and all three DEFINITELY broke the core. There are two malfunctions. 1. No flag skb_shinfo(skb)->tx_flags |= SKBFL_SHARED_FRAG; If it is not set then __skb_linearize will not be executed in skb_checksum_help. sk_buff remains fragmented (non-linear) and