Re: [PATCH RESEND] x86: checksum: Fix unaligned checksums on < i686

2024-07-21 Thread Noah Goldstein
On Sat, Jul 20, 2024 at 2:40 PM David Gow wrote: > > The checksum_32 code was originally written to only handle 2-byte > aligned buffers, but was later extended to support arbitrary alignment. > However, the non-PPro variant doesn't apply the carry before jumping to > the 2- or 4-byte aligned vers

[PATCH 1/1] lib/kfifo-test.c: add tests for the kfifo structure

2024-07-21 Thread Diego Vieira
Add KUnit tests for the kfifo data structure. They test the vast majority of macros defined in the kfifo header (include/linux/kfifo.h). These are inspired by the existing tests for the 'list' doubly linked in lib/list-test.c [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linu

[PATCH 0/1] Add KUnit tests for kfifo

2024-07-21 Thread Diego Vieira
From: diegodvv Hi all, This is part of a hackathon organized by LKCAMP[1], focused on writing tests using KUnit. We reached out a while ago asking for advice on what would be a useful contribution[2] and ended up choosing data structures that did not yet have tests. This patch adds tests for t

[PATCH 1/1] lib/llist_kunit.c: add KUnit tests for llist

2024-07-21 Thread Artur Alves
Add KUnit tests for the llist data structure. They test the vast majority of methods and macros defined in include/linux/llist.h. These are inspired by the existing tests for the 'list' doubly linked in lib/list-test.c [1]. Each test case (llist_test_x) tests the behaviour of the llist function/ma

[PATCH 0/1] Add KUnit tests for llist

2024-07-21 Thread Artur Alves
Hi all, This is part of a hackathon organized by LKCAMP[1], focused on writing tests using KUnit. We reached out a while ago asking for advice on what would be a useful contribution[2] and ended up choosing data structures that did not yet have tests. This patch adds tests for the llist data str

[PATCH v4 2/2] selftests/bpf: integrate test_xdp_veth into test_progs

2024-07-21 Thread eBPF Foundation
test_xdp_veth.sh tests that XDP return codes work as expected, by bringing up multiple veth pairs isolated in different namespaces, attaching specific xdp programs to each interface, and ensuring that the whole chain allows to ping one end interface from the first one. The test runs well but is cur

[PATCH v4 1/2] selftests/bpf: update xdp_redirect_map prog sections for libbpf

2024-07-21 Thread eBPF Foundation
xdp_redirect_map.c is a bpf program used by test_xdp_veth.sh, which is not handled by the generic test runner (test_progs). To allow converting this test to test_progs, the corresponding program must be updated to allow handling it through skeletons generated by bpftool and libbpf. Update programs

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

2024-07-21 Thread eBPF Foundation
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 test_xdp_veth.sh, a small test which is not integrated yet in test_progs. The series is mostly about a rewrite of test_xdp_veth.sh to mak

Re: [PATCH v3 2/2] selftests/bpf: integrate test_xdp_veth into test_progs

2024-07-21 Thread Alexis Lothoré
Hello Daniel, On 7/19/24 17:14, Daniel Borkmann wrote: > On 7/16/24 12:13 PM, Alexis Lothoré (eBPF Foundation) wrote: [...] >> +    nstoken = open_netns(config[index].namespace); >> +    if (!ASSERT_OK_PTR(nstoken, "switch to remote veth namespace")) >> +    return -1; >> +    interface = if

RE: [PATCH v2 09/25] KVM: VMX: Switch FRED RSP0 between host and guest

2024-07-21 Thread Li, Xin3
> On Thu, Jul 18, 2024, H. Peter Anvin wrote: > > On July 12, 2024 8:12:51 AM PDT, Sean Christopherson > wrote: > > >On Wed, Jul 10, 2024, Xin3 Li wrote: > > >> > On Wed, Feb 07, 2024, Xin Li wrote: > > >> > > Switch MSR_IA32_FRED_RSP0 between host and guest in > > >> > > vmx_prepare_switch_to_{

Re: [PATCH 1/2] selftests: x86: vdso_restorer: remove manual counting of pass/fail tests

2024-07-21 Thread Muhammad Usama Anjum
On 7/21/24 9:24 PM, Muhammad Usama Anjum wrote: > On 7/19/24 9:40 PM, Shuah Khan wrote: >> On 7/12/24 01:30, Muhammad Usama Anjum wrote: >>> Use kselftest wrapper to mark tests pass/fail instead of manually >>> counting. >> >> You care combining two changes in the patch. >> >> This is needed to ret

Re: [PATCH 1/2] selftests: x86: vdso_restorer: remove manual counting of pass/fail tests

2024-07-21 Thread Muhammad Usama Anjum
On 7/19/24 9:40 PM, Shuah Khan wrote: > On 7/12/24 01:30, Muhammad Usama Anjum wrote: >> Use kselftest wrapper to mark tests pass/fail instead of manually >> counting. > > You care combining two changes in the patch. > > This is needed to return correct exit status. This also >> improves readabil

[PATCH bpf-next v1 1/2] selftests/bpf: Add missing system defines for mips

2024-07-21 Thread Tony Ambardar
Update get_sys_includes in Makefile with missing MIPS-related definitions to fix many, many compilation errors building selftests/bpf. The following added defines drive conditional logic in system headers for word-size and endianness selection: MIPSEL, MIPSEB _MIPS_SZPTR _MIPS_SZLONG _MIPS

[PATCH bpf-next v1 0/2] selftests/bpf: Add support for MIPS systems

2024-07-21 Thread Tony Ambardar
Hello, This series includes two fixes to support builds targeting MIPS systems. The patches have been tested both with the kernel-patches/bpf CI and locally using mips64el-gcc/musl-libc and QEMU with an OpenWrt rootfs. Patch 1 adds support for MIPS system includes when compiling BPF. Patch 2 fixe

[PATCH bpf-next v1 2/2] selftests/bpf: Fix error linking uprobe_multi on mips

2024-07-21 Thread Tony Ambardar
Linking uprobe_multi.c on mips64el fails due to relocation overflows, when the GOT entries required exceeds the default maximum. Add a specific CFLAGS (-mxgot) for uprobe_multi.c on MIPS that allows using a larger GOT and avoids errors such as: /tmp/ccBTNQzv.o: in function `bench': uprobe_mult