[PATCH v2] selftests/vDSO: support DT_GNU_HASH

2024-09-14 Thread Fangrui Song
glibc added support for DT_GNU_HASH in 2006 and DT_HASH has been obsoleted for more than one decade in many Linux distributions. Many vDSOs support DT_GNU_HASH. This patch adds selftests support. Signed-off-by: Fangrui Song Tested-by: Xi Ruoyao -- Changes from v1: * fix style of a multi-line co

Re: [PATCH] selftests: Makefile: add missing 'net/lib' to targets

2024-09-14 Thread Anders Roxell
On Thu, 12 Sept 2024 at 17:23, Jakub Kicinski wrote: > > On Thu, 12 Sep 2024 08:31:18 +0200 Anders Roxell wrote: > > Fixes: 1d0dc857b5d8 ("selftests: drv-net: add checksum tests") > > Signed-off-by: Anders Roxell > > --- > > tools/testing/selftests/Makefile | 1 + > > 1 file changed, 1 insertion

[syzbot] [acpi?] [nvdimm?] WARNING in to_nfit_bus_uuid

2024-09-14 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:8d8d276ba2fb Merge tag 'trace-v6.11-rc6' of git://git.kern.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=17987f2998 kernel config: https://syzkaller.appspot.com/x/.config?x=61d235cb8d15001c das

[PATCH bpf-next 2/2] bpf: selftests: verifier: Add nullness elision tests

2024-09-14 Thread Daniel Xu
Test that nullness elision works for common use cases. For example, we want to check that both full and subreg stack slots recognized. As well as multiple lookups. And obviously some bound checks. Signed-off-by: Daniel Xu --- .../bpf/progs/verifier_array_access.c | 143 ++

[PATCH bpf-next 0/2] Support eliding map lookup nullness

2024-09-14 Thread Daniel Xu
This patch allows progs to elide a null check on statically known map lookup keys. In other words, if the verifier can statically prove that the lookup will be in-bounds, allow the prog to drop the null check. This is useful for two reasons: 1. Large numbers of nullness checks (especially when th

[PATCH] vhost/net: Set num_buffers for virtio 1.0

2024-09-14 Thread Akihiko Odaki
The specification says the device MUST set num_buffers to 1 if VIRTIO_NET_F_MRG_RXBUF has not been negotiated. Fixes: 41e3e42108bc ("vhost/net: enable virtio 1.0") Signed-off-by: Akihiko Odaki --- drivers/vhost/net.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers

Re: [PATCH v2 7/7] kunit, slub: add test_kfree_rcu() and test_leak_destroy()

2024-09-14 Thread Vlastimil Babka
On 9/14/24 15:22, Hyeonggon Yoo wrote: > On Wed, Aug 7, 2024 at 7:31 PM Vlastimil Babka wrote: >> >> Add a test that will create cache, allocate one object, kfree_rcu() it >> and attempt to destroy it. As long as the usage of kvfree_rcu_barrier() >> in kmem_cache_destroy() works correctly, there s

Re: [syzbot] [virt?] [netfilter?] INFO: rcu detected stall in ip_list_rcv (6)

2024-09-14 Thread syzbot
syzbot suspects this issue was fixed by commit: commit e634134180885574d1fe7aa162777ba41e7fcd5b Author: Vladimir Oltean Date: Mon May 27 15:39:54 2024 + net/sched: taprio: make q->picos_per_byte available to fill_sched_entry() bisection log: https://syzkaller.appspot.com/x/bisect.txt

[PATCH 1/1 V4] selftests: net: improve missing modules error message

2024-09-14 Thread David Hunter
The error message describing the required modules is inaccurate. Currently, only "SKIP: Need act_mirred module" is printed when any of the modules are missing. As a result, users might only include that module; however, three modules are required. Fix the error message to show any/all modules nee

[PATCH v3] remoteproc: k3-dsp: Fix an error handling path in k3_dsp_rproc_probe()

2024-09-14 Thread Christophe JAILLET
If an error occurs after mbox_request_channel() in k3_dsp_rproc_request_mbox(), mbox_free_channel() must be called, as already done in the remove function. Instead of adding an error handling path in the probe and changing all error handling in the function, add a new devm_add_action_or_reset() an

Re: [PATCH v2 17/19] iommu/arm-smmu-v3: Add arm_smmu_viommu_cache_invalidate

2024-09-14 Thread Jason Gunthorpe
On Fri, Sep 13, 2024 at 02:33:59AM +, Tian, Kevin wrote: > > From: Jason Gunthorpe > > Sent: Thursday, September 12, 2024 7:08 AM > > > > On Wed, Sep 11, 2024 at 08:13:01AM +, Tian, Kevin wrote: > > > > > Probably there is a good reason e.g. for simplification or better > > > aligned wit

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-14 Thread Jakub Kicinski
On Sat, 14 Sep 2024 11:25:47 +0200 Lorenzo Bianconi wrote: > On Sep 13, Martin KaFai Lau wrote: > > test a physical network device that supports a certain XDP features. > > > > iiuc, test_xdp_features.sh only uses the veth and veth will also be the only > > device tested after moving to prog_tests

Re: [RFC PATCH 00/39] 1G page support for guest_memfd

2024-09-14 Thread Vishal Annapurve
On Fri, Sep 13, 2024 at 6:08 PM Du, Fan wrote: > > ... > > > > Hello, > > > > This patchset is our exploration of how to support 1G pages in guest_memfd, > > and > > how the pages will be used in Confidential VMs. > > > > The patchset covers: > > > > + How to get 1G pages > > + Allowing mmap() of

Re: [PATCH v2 7/7] kunit, slub: add test_kfree_rcu() and test_leak_destroy()

2024-09-14 Thread Hyeonggon Yoo
On Wed, Aug 7, 2024 at 7:31 PM Vlastimil Babka wrote: > > Add a test that will create cache, allocate one object, kfree_rcu() it > and attempt to destroy it. As long as the usage of kvfree_rcu_barrier() > in kmem_cache_destroy() works correctly, there should be no warnings in > dmesg and the test

Re: [PATCH bpf-next v3 1/2] bpf: Fix bpf_get/setsockopt to tos not take effect when TCP over IPv4 via INET6 API

2024-09-14 Thread Eric Dumazet
On Sat, Sep 14, 2024 at 12:32 PM Feng zhou wrote: > > From: Feng Zhou > > when TCP over IPv4 via INET6 API, bpf_get/setsockopt with ipv4 will > fail, because sk->sk_family is AF_INET6. With ipv6 will success, not > take effect, because inet_csk(sk)->icsk_af_ops is ipv6_mapped and > use ip_queue_x

Re: [RFC PATCH 2/3] ipv6: Run a reverse sk_lookup on sendmsg.

2024-09-14 Thread Eric Dumazet
On Fri, Sep 13, 2024 at 11:39 AM Tiago Lam wrote: > > This follows the same rationale provided for the ipv4 counterpart, where > it now runs a reverse socket lookup when source addresses and/or ports > are changed, on sendmsg, to check whether egress traffic should be > allowed to go through or no

[PATCH bpf-next v3 2/2] selftests/bpf: Setget_sockopt add a test for tcp over ipv4 via ipv6

2024-09-14 Thread Feng zhou
From: Feng Zhou This patch adds a test for TCP over IPv4 via INET6 API. Signed-off-by: Feng Zhou --- .../selftests/bpf/prog_tests/setget_sockopt.c | 33 +++ .../selftests/bpf/progs/setget_sockopt.c | 13 ++-- 2 files changed, 43 insertions(+), 3 deletions(-) diff --gi

[PATCH bpf-next v3 1/2] bpf: Fix bpf_get/setsockopt to tos not take effect when TCP over IPv4 via INET6 API

2024-09-14 Thread Feng zhou
From: Feng Zhou when TCP over IPv4 via INET6 API, bpf_get/setsockopt with ipv4 will fail, because sk->sk_family is AF_INET6. With ipv6 will success, not take effect, because inet_csk(sk)->icsk_af_ops is ipv6_mapped and use ip_queue_xmit, inet_sk(sk)->tos. Bpf_get/setsockopt use sk_is_inet() help

[PATCH bpf-next v3 0/2] Fix bpf_get/setsockopt failed when TCP over IPv4 via INET6 API

2024-09-14 Thread Feng zhou
From: Feng Zhou When TCP over IPv4 via INET6 API, sk->sk_family is AF_INET6, but it is a v4 pkt. inet_csk(sk)->icsk_af_ops is ipv6_mapped and use ip_queue_xmit. Some sockopt did not take effect, such as tos. 0001: Use sk_is_inet helper to fix it. 0002: Setget_sockopt add a test for tcp over ipv4

[PATCH bpf-next v1] selftests/bpf:Enhance bpf ability to detect ksym read error by libcap

2024-09-14 Thread Lin Yikai
Ksym addr access is restricted by ``kptr_restrict``(/proc/sys/kernel/kptr_restrict). On some OS systems(like Android), ksym addr access is not accessed because ``kptr_restrict=2`. And it took me a long time to find the root case. -When ``kptr_restrict==0``, addr is accessed. # echo 0 > /p

Re: [PATCH bpf-next v2] selftests/bpf: convert test_xdp_features.sh to test_progs

2024-09-14 Thread Lorenzo Bianconi
On Sep 13, Martin KaFai Lau wrote: > On 9/10/24 11:10 AM, Alexis Lothoré (eBPF Foundation) wrote: > > test_xdp_features.sh is a shell script allowing to test that xdp features > > advertised by an interface are indeed delivered. The test works by starting > > two instance of the same program, both

Re: [PATCH net] selftests: forwarding: Avoid false MDB delete/flush failures

2024-09-14 Thread Jamie Bainbridge
On Sat, 14 Sept 2024 at 00:56, Jakub Kicinski wrote: > > On Fri, 13 Sep 2024 19:40:04 +1000 Jamie Bainbridge wrote: > > Running this test on a small system produces different failures every > > test checking deletions, and some flushes. From different test runs: > > This increases the runtime of t

Re: [RFC PATCH 2/3] ipv6: Run a reverse sk_lookup on sendmsg.

2024-09-14 Thread Simon Horman
On Fri, Sep 13, 2024 at 10:39:20AM +0100, Tiago Lam wrote: > This follows the same rationale provided for the ipv4 counterpart, where > it now runs a reverse socket lookup when source addresses and/or ports > are changed, on sendmsg, to check whether egress traffic should be > allowed to go through