Re: [PATCH v8 1/8] xarray: add xas_try_split() to split a multi-index entry

2025-02-25 Thread Baolin Wang
Hi Zi, On 2025/2/19 07:50, Zi Yan wrote: A preparation patch for non-uniform folio split, which always split a folio into half iteratively, and minimal xarray entry split. Currently, xas_split_alloc() and xas_split() always split all slots from a multi-index entry. They cost the same number of

[PATCH v10 3/3] selftests/rseq: Add test for mm_cid compaction

2025-02-25 Thread Gabriele Monaco
A task in the kernel (task_mm_cid_work) runs somewhat periodically to compact the mm_cid for each process. Add a test to validate that it runs correctly and timely. The test spawns 1 thread pinned to each CPU, then each thread, including the main one, runs in short bursts for some time. During thi

[PATCH sched_ext/for-6.15] selftests/sched_ext: Add NUMA-aware scheduler test

2025-02-25 Thread Andrea Righi
Add a selftest to validate the behavior of the NUMA-aware scheduler functionalities, including idle CPU selection within nodes, per-node DSQs and CPU to node mapping. Signed-off-by: Andrea Righi --- tools/testing/selftests/sched_ext/Makefile | 1 + tools/testing/selftests/sched_ext/numa.bpf.

Re: [PATCH v6 5/6] vhost: Add new UAPI to support change to task mode

2025-02-25 Thread Cindy Lu
On Tue, Feb 25, 2025 at 5:46 AM Michael S. Tsirkin wrote: > > better subject: > > vhost: uapi to control task mode (owner vs kthread) > > > On Sun, Feb 23, 2025 at 11:36:20PM +0800, Cindy Lu wrote: > > Add a new UAPI to enable setting the vhost device to task mode. > > better: > > Add a new UAPI t

Re: [PATCH bpf-next v3 3/6] selftests/bpf: move open_tuntap to network helpers

2025-02-25 Thread Jason Wang
On Mon, Feb 24, 2025 at 11:29 PM Marcus Wichelmann wrote: > > To test the XDP metadata functionality of the tun driver, it's necessary > to create a new tap device first. A helper function for this already > exists in lwt_helpers.h. Move it to the common network helpers header, > so it can be reus

Re: [PATCH v6 5/6] vhost: Add new UAPI to support change to task mode

2025-02-25 Thread Cindy Lu
On Tue, Feb 25, 2025 at 7:31 PM Stefano Garzarella wrote: > > On Sun, Feb 23, 2025 at 11:36:20PM +0800, Cindy Lu wrote: > >Add a new UAPI to enable setting the vhost device to task mode. > >The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > >to configure the mode if necessary. > >Thi

Re: [PATCH bpf-next v3 2/6] net: tun: enable transfer of XDP metadata to skb

2025-02-25 Thread Jason Wang
On Mon, Feb 24, 2025 at 11:29 PM Marcus Wichelmann wrote: > > When the XDP metadata area was used, it is expected that the same > metadata can also be accessed from TC, as can be read in the description > of the bpf_xdp_adjust_meta helper function. In the tun driver, this was > not yet implemented

Re: [PATCH bpf-next v3 1/6] net: tun: enable XDP metadata support

2025-02-25 Thread Jason Wang
On Mon, Feb 24, 2025 at 11:29 PM Marcus Wichelmann wrote: > > Enable the support for the bpf_xdp_adjust_meta helper function for XDP > buffers initialized by the tun driver. This allows to reserve a metadata > area that is useful to pass any information from one XDP program to > another one, for e

Re: [PATCH net-next v4 2/4] virtio-net: Refactor napi_disable paths

2025-02-25 Thread Jason Wang
On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > Create virtnet_napi_disable helper and refactor virtnet_napi_tx_disable > to take a struct send_queue. > > Signed-off-by: Joe Damato > --- Acked-by: Jason Wang Thanks

Re: [PATCH net-next v4 1/4] virtio-net: Refactor napi_enable paths

2025-02-25 Thread Jason Wang
On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > Refactor virtnet_napi_enable and virtnet_napi_tx_enable to take a struct > receive_queue. Create a helper, virtnet_napi_do_enable, which contains > the logic to enable a NAPI. > > Signed-off-by: Joe Damato Acked-by: Jason Wang Thanks

Re: [PATCH net-next v4 3/4] virtio-net: Map NAPIs to queues

2025-02-25 Thread Jason Wang
On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > Use netif_queue_set_napi to map NAPIs to queue IDs so that the mapping > can be accessed by user apps, taking care to hold RTNL as needed. I may miss something but I wonder whether letting the caller hold the lock is better. More below. > >

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-25 Thread Alexei Starovoitov
On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: > > Hi, > > On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: > > On Sat, Feb 8, 2025 at 2:17 AM Hou Tao wrote: > >> Hi Toke, > >> > >> On 2/6/2025 11:05 PM, Toke Høiland-Jørgensen wrote: > >>> Hou Tao writes: > >>> > +cc Cody Haas > >

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-25 Thread Hou Tao
Hi, On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: > On Sat, Feb 8, 2025 at 2:17 AM Hou Tao wrote: >> Hi Toke, >> >> On 2/6/2025 11:05 PM, Toke Høiland-Jørgensen wrote: >>> Hou Tao writes: >>> +cc Cody Haas Sorry for the resend. I sent the reply in the HTML format. On

Re: [PATCH v2 2/2] livepatch: Replace tasklist_lock with RCU

2025-02-25 Thread Yafang Shao
On Wed, Feb 26, 2025 at 2:33 AM Josh Poimboeuf wrote: > > On Sun, Feb 23, 2025 at 02:20:46PM +0800, Yafang Shao wrote: > > +++ b/kernel/livepatch/patch.c > > @@ -95,7 +95,12 @@ static void notrace klp_ftrace_handler(unsigned long ip, > > > > patch_state = current->patch_state; > > >

Re: [RESEND] [PATCH bpf-next 2/3] bpf: Overwrite the element in hash map atomically

2025-02-25 Thread Alexei Starovoitov
On Sat, Feb 8, 2025 at 2:17 AM Hou Tao wrote: > > Hi Toke, > > On 2/6/2025 11:05 PM, Toke Høiland-Jørgensen wrote: > > Hou Tao writes: > > > >> +cc Cody Haas > >> > >> Sorry for the resend. I sent the reply in the HTML format. > >> > >> On 2/4/2025 4:28 PM, Hou Tao wrote: > >>> Currently, the upd

Re: [PATCH net-next] selftests/net: ensure mptcp is enabled in netns

2025-02-25 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 24 Feb 2025 09:40:13 + you wrote: > Some distributions may not enable MPTCP by default. All other MPTCP tests > source mptcp_lib.sh to ensure MPTCP is enabled before testing. However, > the ip_local_port_r

[RFC 2/2] kvm: retry nx_huge_page_recovery_thread creation

2025-02-25 Thread Keith Busch
From: Keith Busch A VMM may send a signal to its threads while they've entered KVM_RUN. If that thread happens to be trying to make the huge page recovery vhost task, then it fails with -ERESTARTNOINTR. We need to retry if that happens, so we can't use call_once anymore. Replace it with a simple

[RFC 1/2] vhost: return error instead of NULL on create

2025-02-25 Thread Keith Busch
From: Keith Busch Let callers distinguish why the vhost create failed. Signed-off-by: Keith Busch --- arch/x86/kvm/mmu/mmu.c | 2 +- drivers/vhost/vhost.c | 2 +- kernel/vhost_task.c| 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/

[RFC 0/2] kvm/x86: more huge page recovery fallout

2025-02-25 Thread Keith Busch
From: Keith Busch Another corner case on the KVM vhost task! The crosvm VMM might send signals to its threads that have entered KVM_RUN. The signal specifically is SIGRTRMIN from here: https://github.com/google/crosvm/blob/main/src/crosvm/sys/linux/vcpu.rs#L651 If this happens to occur when

Re: [PATCH v2 7/7] iommu: Turn iova_cookie to dma-iommu private pointer

2025-02-25 Thread Nicolin Chen
On Fri, Feb 21, 2025 at 10:39:59AM -0400, Jason Gunthorpe wrote: > diff --git a/include/linux/iommu.h b/include/linux/iommu.h > index 99dd72998cb7f7..082274e8ba6a3d 100644 > --- a/include/linux/iommu.h > +++ b/include/linux/iommu.h > @@ -1534,12 +1534,16 @@ void iommu_debugfs_setup(void); > static

Re: [PATCH v6 3/6] vhost: Add the cgroup related function

2025-02-25 Thread Cindy Lu
On Mon, Feb 24, 2025 at 9:40 AM Jason Wang wrote: > > On Sun, Feb 23, 2025 at 11:41 PM Cindy Lu wrote: > > > > Add back the previously removed cgroup function to support the kthread > > The biggest change for this part is in vhost_attach_cgroups() and > > vhost_attach_task_to_cgroups(). > > > > R

Re: [PATCH v6 4/6] vhost: introduce worker ops to support multiple thread models

2025-02-25 Thread Cindy Lu
On Mon, Feb 24, 2025 at 9:45 AM Jason Wang wrote: > > On Sun, Feb 23, 2025 at 11:41 PM Cindy Lu wrote: > > > > This commit restores the previously removed functions kthread_wakeup and > > kthread_stop, and introduces a new ops structure to handle worker wakeup, > > stop, and creation. The functio

Re: [PATCH v6 0/6] vhost: Add support of kthread API

2025-02-25 Thread Cindy Lu
On Tue, Feb 25, 2025 at 5:43 AM Michael S. Tsirkin wrote: > > On Sun, Feb 23, 2025 at 11:36:15PM +0800, Cindy Lu wrote: > > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > > the vhost now uses vhost_task and operates as a child of the > > owner thread. This aligns with cont

Re: [PATCH] selftests/dma: Fix bad array reference.

2025-02-25 Thread liuye
Friendly ping. 在 2025/2/6 10:12, Liu Ye 写道: > dir[directions] should be directions[dir] to correctly index the > directions array. > > Signed-off-by: Liu Ye > --- > tools/testing/selftests/dma/dma_map_benchmark.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/test

[PATCH 2/9] selftests/x86/xstate: Refactor XSAVE helpers for general use

2025-02-25 Thread Chang S. Bae
The AMX test introduced several XSAVE-related helper functions, but so far, it has been the only user of them. These helpers can be generalized for broader test of multiple xstate features. Move most XSAVE-related code into xsave.h, making it shareable. The restructuring includes: * Establishing

[PATCH 0/9] selftests/x86/xstate: Introduce common code for testing extended states

2025-02-25 Thread Chang S. Bae
Hi all, This series proposes a rework of xstate-related tests to improve maintainability and expand test coverage. == Motivation: Addressing Missing and New XSTATE Tests == With the introduction of AMX, a new test suite [1] was created to verify dynamic state handling by the kernel as observed f

[PATCH 1/9] selftests/x86: Consolidate redundant signal helper functions

2025-02-25 Thread Chang S. Bae
The x86 selftests frequently register and clean up signal handlers, but the sethandler() and clearhandler() functions have been redundantly copied across multiple .c files. Move these functions to helpers.h to enable reuse across tests, eliminating around 250 lines of duplicate code. Converge the

[PATCH 9/9] selftests/x86/avx: Add AVX test

2025-02-25 Thread Chang S. Bae
Add xstate testing specifically for those vector register states, validating kernel's context switching and ensuring ABI compliance. Use the established xstate testing framework. Signed-off-by: Chang S. Bae --- Alternatively, this invocation could be placed directly in xstate.c::main(). However,

[PATCH 7/9] selftests/x86/xstate: Consolidate test invocations into a single entry

2025-02-25 Thread Chang S. Bae
Currently, each of the three xstate tests runs as a separate invocation, requiring the xstate number to be passed and state information to be reconstructed repeatedly. This approach arose from their individual and isolated development, but now it makes sense to unify them. Introduce a wrapper func

[PATCH 8/9] selftests/x86/xstate: Clarify supported xstates

2025-02-25 Thread Chang S. Bae
The established xstate test code is designed to be generic, but certain xstates require special handling and cannot be tested without additional adjustments. Clarify which xstates are currently supported, and enforce testing only for them. Signed-off-by: Chang S. Bae --- tools/testing/selftests

[PATCH 4/9] selftests/x86/xstate: Refactor context switching test

2025-02-25 Thread Chang S. Bae
The existing context switching and ptrace tests in amx.c are not specific to dynamic states, making them reusable for general xstate testing. As a first step, move the context switching test to xstate.c. Refactor the test code to allow specifying which xstate component being tested. To decouple t

[PATCH 5/9] selftests/x86/xstate: Refactor ptrace ABI test

2025-02-25 Thread Chang S. Bae
Following the refactor of the context switching test, the ptrace test is another component reusable for other xstate features. As part of this restructuring, add a missing check to validate the user_xstateregs->xstate_fx_sw field in the ABI. Also, replace err() and fatal_error() with ksft_exit_fai

[PATCH 6/9] selftests/x86/xstate: Introduce signal ABI test

2025-02-25 Thread Chang S. Bae
With the refactored test cases, another xstate exposure to userspace is through signal delivery. While amx.c includes signal-related scenarios, its primary focus is on xstate permission management, which is largely specific to dynamic states. The remaining gap is testing xstate preservation and re

[PATCH 3/9] selftests/x86/xstate: Enumerate and name xstate components

2025-02-25 Thread Chang S. Bae
After moving essential helpers from amx.c, the code remains neutral regarding which xstate components it handles. However, explicitly listing known components helps users identify which features are ready for testing. Enumerate xstate components to facilitate identification. Extend struct xstate_i

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-25 Thread Indu Bhagat
On 2/25/25 3:54 PM, Weinan Liu wrote: On Tue, Feb 25, 2025 at 11:38 AM Indu Bhagat wrote: On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote: I already have a WIP patch to add sframe support to the kernel module. However, it is not yet working. I had trouble unwinding frames for the kernel mo

Re: [PATCH 2/3] rcu/exp: Remove confusing needless full barrier on task unblock

2025-02-25 Thread Paul E. McKenney
On Tue, Feb 25, 2025 at 04:59:08PM -0500, Joel Fernandes wrote: > On Fri, Feb 14, 2025 at 12:25:58AM +0100, Frederic Weisbecker wrote: > > A full memory barrier in the RCU-PREEMPT task unblock path advertizes > > to order the context switch (or rather the accesses prior to > > rcu_read_unlock()) wi

Re: [PATCH 3/3] rcu/exp: Remove needless CPU up quiescent state report

2025-02-25 Thread Paul E. McKenney
On Fri, Feb 21, 2025 at 04:52:39PM +0100, Frederic Weisbecker wrote: > Le Wed, Feb 19, 2025 at 06:58:36AM -0800, Paul E. McKenney a écrit : > > On Sat, Feb 15, 2025 at 11:23:45PM +0100, Frederic Weisbecker wrote: > > > > Before. There was also some buggy debug code in play. Also, to get the > > >

Re: [PATCH net] selftests: drv-net: Check if combined-count exists

2025-02-25 Thread Joe Damato
On Tue, Feb 25, 2025 at 03:11:24PM -0800, David Wei wrote: > On 2025-02-25 10:14, Joe Damato wrote: [...] > > diff --git a/tools/testing/selftests/drivers/net/queues.py > > b/tools/testing/selftests/drivers/net/queues.py > > index 38303da957ee..baa8845d9f64 100755 > > --- a/tools/testing/selftests

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-25 Thread Weinan Liu
On Tue, Feb 25, 2025 at 11:38 AM Indu Bhagat wrote: > > On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote: > >> I already have a WIP patch to add sframe support to the kernel module. > >> However, it is not yet working. I had trouble unwinding frames for the > >> kernel module using the current a

Re: [PATCH net] selftests: drv-net: Check if combined-count exists

2025-02-25 Thread David Wei
On 2025-02-25 10:14, Joe Damato wrote: > Some drivers, like tg3, do not set combined-count: > > $ ethtool -l enp4s0f1 > Channel parameters for enp4s0f1: > Pre-set maximums: > RX: 4 > TX: 4 > Other:n/a > Combined: n/a > Current hardware settings: > RX:

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-25 Thread Weinan Liu
On Tue, Feb 25, 2025 at 10:13 AM Josh Poimboeuf wrote: > > On Tue, Feb 25, 2025 at 01:02:24AM +, Weinan Liu wrote: > > On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote: > > > I already have a WIP patch to add sframe support to the kernel module. > > > However, it is not yet working. I had tr

[PATCH 1/3] selftests/damon/damos_quota: make real expectation of quota exceeds

2025-02-25 Thread SeongJae Park
damos_quota.py assumes the quota will always exceeded. But whether quota will be exceeded or not depend on the monitoring results. Actually the monitored workload has chaning access pattern and hence sometimes the quota may not really be exceeded. As a result, false positive test failures happen.

[PATCH 2/3] selftests/damon/damon_nr_regions: set ops update for merge results check to 100ms

2025-02-25 Thread SeongJae Park
damon_nr_regions.py updates max_nr_regions to a number smaller than expected number of real regions and confirms DAMON respect the harsh limit. To give time for DAMON to make changes for the regions, 3 aggregation intervals (300 milliseconds) are given. The internal mechanism works with not only

[PATCH 3/3] selftests/damon/damon_nr_regions: sort collected regiosn before checking with min/max boundaries

2025-02-25 Thread SeongJae Park
damon_nr_regions.py starts DAMON, periodically collect number of regions in snapshots, and see if it is in the requested range. The check code assumes the numbers are sorted on the collection list, but there is no such guarantee. Hence this can result in false positive test success. Sort the list

[PATCH 0/3] selftests/damon: three fixes for false results

2025-02-25 Thread SeongJae Park
Fix three DAMON selftest bugs that causes two and one false positive failures and success. SeongJae Park (3): selftests/damon/damos_quota: make real expectation of quota exceeds selftests/damon/damon_nr_regions: set ops update for merge results check to 100ms selftests/damon/damon_nr_reg

Re: [PATCH 2/3] rcu/exp: Remove confusing needless full barrier on task unblock

2025-02-25 Thread Joel Fernandes
On Fri, Feb 14, 2025 at 12:25:58AM +0100, Frederic Weisbecker wrote: > A full memory barrier in the RCU-PREEMPT task unblock path advertizes > to order the context switch (or rather the accesses prior to > rcu_read_unlock()) with the expedited grace period fastpath. > > However the grace period ca

Re: [PATCH v3 1/3] rcutorture: Allow a negative value for nfakewriters

2025-02-25 Thread Joel Fernandes
On Tue, Feb 25, 2025 at 12:00:18PM +0100, Uladzislau Rezki (Sony) wrote: > Currently "nfakewriters" parameter can be set to any value but > there is no possibility to adjust it automatically based on how > many CPUs a system has where a test is run on. > > To address this, if the "nfakewriters" is

Re: [RFC PATCH 26/39] KVM: guest_memfd: Track faultability within a struct kvm_gmem_private

2025-02-25 Thread Peter Xu
On Tue, Sep 10, 2024 at 11:43:57PM +, Ackerley Tng wrote: > @@ -1079,12 +1152,20 @@ static struct inode > *kvm_gmem_inode_make_secure_inode(const char *name, > if (err) > goto out; > > + err = -ENOMEM; > + private = kzalloc(sizeof(*private), GFP_KERNEL); > + i

Re: [PATCH RFC v2 00/10] SLUB percpu sheaves

2025-02-25 Thread Suren Baghdasaryan
On Mon, Feb 24, 2025 at 1:12 PM Suren Baghdasaryan wrote: > > On Mon, Feb 24, 2025 at 12:53 PM Vlastimil Babka wrote: > > > > On 2/24/25 02:36, Suren Baghdasaryan wrote: > > > On Sat, Feb 22, 2025 at 8:44 PM Suren Baghdasaryan > > > wrote: > > >> > > >> Don't know about this particular part but

[PATCH v3 2/2] selftests: sched: skip cs_prctl_test for systems with core scheduling disabled

2025-02-25 Thread Sinadin Shan
For kernels with CONFIG_SCHED_CORE=n, the sched selftest cs_prctl_test fails with "Not a core sched system" error. Change this to gracefully skip the test for systems with core scheduling disabled. Exiting early would also ensure failures reported in obtaining cookie are valid failures and not beca

[PATCH v3 1/2] selftests: sched: add sched as a default selftest target

2025-02-25 Thread Sinadin Shan
The sched tests are missing a target entry and hence out-of-tree build support. For instance: make -C tools/testing/selftests install INSTALL_PATH=/foo/bar is expected to build the sched tests and place them at /foo/bar. But this is not observed since a TARGET entry is not present for sched. Thi

[PATCH v3 0/2] selftests: sched: Add default target support for sched

2025-02-25 Thread Sinadin Shan
This patch series introduces changes to add default build support for the sched tests in selftests. The only test under sched is cs_prctl_test which validates cookies when core scheduling is in effect. This test fails on systems where core scheduling is disabled. The patch series also modifies thi

Re: [PATCH] selftests/net: deflake GRO tests and fix return value and output

2025-02-25 Thread Kevin Krakauer
On Mon, Feb 24, 2025 at 12:48:30PM -0800, Jakub Kicinski wrote: > With msec-long deferrals we'll flush due to jiffies change. At least > that explains a bit. Could you maybe try lower timeouts than 1msec? > Previously we'd just keep partially-completed packets in GRO for up > to 1msec, now we'll d

Re: [PATCH net] selftests: drv-net: Check if combined-count exists

2025-02-25 Thread Gerhard Engleder
On 25.02.25 19:14, Joe Damato wrote: Some drivers, like tg3, do not set combined-count: $ ethtool -l enp4s0f1 Channel parameters for enp4s0f1: Pre-set maximums: RX: 4 TX: 4 Other: n/a Combined: n/a Current hardware settings: RX: 4 TX:

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-25 Thread Indu Bhagat
On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote: I already have a WIP patch to add sframe support to the kernel module. However, it is not yet working. I had trouble unwinding frames for the kernel module using the current algorithm. Indu has likely identified the issue and will be addressing

Re: [PATCH 0/8] unwind, arm64: add sframe unwinder for kernel

2025-02-25 Thread Josh Poimboeuf
On Tue, Feb 25, 2025 at 01:02:24AM +, Weinan Liu wrote: > On Mon, Feb 10, 2025 at 12:30 AM Weinan Liu wrote: > > I already have a WIP patch to add sframe support to the kernel module. > > However, it is not yet working. I had trouble unwinding frames for the > > kernel module using the current

Re: [PATCH v2 2/2] livepatch: Replace tasklist_lock with RCU

2025-02-25 Thread Josh Poimboeuf
On Sun, Feb 23, 2025 at 02:20:46PM +0800, Yafang Shao wrote: > +++ b/kernel/livepatch/patch.c > @@ -95,7 +95,12 @@ static void notrace klp_ftrace_handler(unsigned long ip, > > patch_state = current->patch_state; > > - WARN_ON_ONCE(patch_state == KLP_TRANSITION_IDLE); >

Re: [PATCH bpf-next v3 4/6] selftests/bpf: refactor xdp_context_functional test and bpf program

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > The existing XDP metadata test works by creating a veth pair and > attaching XDP & TC programs that drop the packet when the condition of > the test isn't fulfilled. The test then pings through the veth pair and > succeeds when the ping comes through. > > While this test

[PATCH printk] Flush console log from kernel_power_off()

2025-02-25 Thread Paul E. McKenney
Kernels built with CONFIG_PREEMPT_RT=y can lose significant console output and shutdown time, which hides shutdown-time RCU issues from rcutorture. Therefore, make pr_flush() public and invoke it after then last print in kernel_power_off(). [ paulmck: Apply John Ogness feedback. ] [ paulmck: Appy

Re: [PATCH bpf-next v3 2/6] net: tun: enable transfer of XDP metadata to skb

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > When the XDP metadata area was used, it is expected that the same > metadata can also be accessed from TC, as can be read in the description > of the bpf_xdp_adjust_meta helper function. In the tun driver, this was > not yet implemented. > > To make this work, the skb th

Re: [PATCH bpf-next v3 6/6] selftests/bpf: fix file descriptor assertion in open_tuntap helper

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > The open_tuntap helper function uses open() to get a file descriptor for > /dev/net/tun. > > The open(2) manpage writes this about its return value: > > On success, open(), openat(), and creat() return the new file > descriptor (a nonnegative integer). On error, -1

Re: [PATCH bpf-next v3 3/6] selftests/bpf: move open_tuntap to network helpers

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > To test the XDP metadata functionality of the tun driver, it's necessary > to create a new tap device first. A helper function for this already > exists in lwt_helpers.h. Move it to the common network helpers header, > so it can be reused in other tests. > > Signed-off-b

Re: [PATCH bpf-next v3 4/6] selftests/bpf: refactor xdp_context_functional test and bpf program

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > Am 24.02.25 um 16:29 schrieb Marcus Wichelmann: > > [...] > > + /* By default, Linux sends IPv6 multicast listener reports which > > +* interfere with this test. Set the IFF_NOARP flag to ensure > > +* silence on the interface. > > +*/ > > + SYS(close, "ip

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Uladzislau Rezki
On Tue, Feb 25, 2025 at 07:11:05PM +0100, Vlastimil Babka wrote: > On 2/25/25 18:41, Uladzislau Rezki wrote: > > > > but i had to adapt slightly the Vlastimil's test: > > Great, works for me too, thanks! > Sounds good :) -- Uladzislau Rezki

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Uladzislau Rezki
On Tue, Feb 25, 2025 at 06:41:19PM +0100, Uladzislau Rezki wrote: > On Tue, Feb 25, 2025 at 10:05:37AM -0700, Keith Busch wrote: > > On Tue, Feb 25, 2025 at 09:03:38AM -0700, Keith Busch wrote: > > > On Tue, Feb 25, 2025 at 10:57:38AM +0100, Vlastimil Babka wrote: > > > > I tried to create a kunit

Re: [PATCH bpf-next v3 0/6] XDP metadata support for tun driver

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > Am 25.02.25 um 15:55 schrieb Willem de Bruijn: > > Marcus Wichelmann wrote: > >> [...] > >> > >> Signed-off-by: Marcus Wichelmann > >> Acked-by: Jason Wang > >> Reviewed-by: Willem de Bruijn > > > > Please don't add tags, unless a person has explicitly added them. > >

[PATCH net] selftests: drv-net: Check if combined-count exists

2025-02-25 Thread Joe Damato
Some drivers, like tg3, do not set combined-count: $ ethtool -l enp4s0f1 Channel parameters for enp4s0f1: Pre-set maximums: RX: 4 TX: 4 Other: n/a Combined: n/a Current hardware settings: RX: 4 TX: 1 Other: n/a Combined:

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Vlastimil Babka
On 2/25/25 18:41, Uladzislau Rezki wrote: > > but i had to adapt slightly the Vlastimil's test: Great, works for me too, thanks!

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Uladzislau Rezki
On Tue, Feb 25, 2025 at 10:05:37AM -0700, Keith Busch wrote: > On Tue, Feb 25, 2025 at 09:03:38AM -0700, Keith Busch wrote: > > On Tue, Feb 25, 2025 at 10:57:38AM +0100, Vlastimil Babka wrote: > > > I tried to create a kunit test for it, but it doesn't trigger anything. > > > Maybe > > > it's too

Re: [PATCH v3 2/4] kernel: refactor lookup_or_create_module_kobject()

2025-02-25 Thread Shyam Saini
Hi Petr, Thank you for the reviews On Tue, Feb 25, 2025 at 09:33:10AM +0100, Petr Pavlu wrote: > On 2/21/25 11:42, Rasmus Villemoes wrote: > > On Thu, Feb 13 2025, Petr Pavlu wrote: > > > >> On 2/11/25 22:48, Shyam Saini wrote: > >>> In the unlikely event of the allocation failing, it is better

[PATCH v2 0/4] tools/nolibc: MIPS: entrypoint cleanups and N32/N64 ABIs

2025-02-25 Thread Thomas Weißschuh
Introduce support for the N32 and N64 ABIs. As preparation, the entrypoint is first simplified significantly. Thanks to Maciej for all the valuable information. Signed-off-by: Thomas Weißschuh --- Changes in v2: - Clean up entrypoint first - Annotate #endifs - Link to v1: https://lore.kernel.org

[PATCH v2 2/4] tools/nolibc: MIPS: drop manual stack pointer alignment

2025-02-25 Thread Thomas Weißschuh
The stack pointer is already aligned by the kernel to a multiple of 16. All modifications of the register have been removed from the entrypoint, so the manual realignment is unnecessary. Drop the manual alignment. Suggested-by: Maciej W. Rozycki Link: https://lore.kernel.org/lkml/alpine.deb.2.2

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Keith Busch
On Tue, Feb 25, 2025 at 09:03:38AM -0700, Keith Busch wrote: > On Tue, Feb 25, 2025 at 10:57:38AM +0100, Vlastimil Babka wrote: > > I tried to create a kunit test for it, but it doesn't trigger anything. > > Maybe > > it's too simple, or racy, and thus we are not flushing any of the queues > > fr

[PATCH v2 4/4] tools/nolibc: MIPS: add support for N64 and N32 ABIs

2025-02-25 Thread Thomas Weißschuh
Add support for the MIPS 64bit N64 and ILP32 N32 ABIs. In addition to different byte orders and ABIs there are also different releases of the MIPS architecture. To avoid blowing up the test matrix, only add a subset of all possible test combinations. Signed-off-by: Thomas Weißschuh --- tools/in

[PATCH v2 1/4] tools/nolibc: MIPS: drop $gp setup

2025-02-25 Thread Thomas Weißschuh
The setup of the global pointer "$gp" register was necessary when the C entrypoint was called through "jal ". However since commit 0daf8c86a451 ("tools/nolibc: mips: load current function to $t9") "jalr" is used instead which does not require "$gp". Remove the unnecessary $gp setup, simplifying t

[PATCH v2 3/4] tools/nolibc: MIPS: drop noreorder option

2025-02-25 Thread Thomas Weißschuh
There are no more statements in the assembly code which would require the usage of ".set noreorder". Remove the option. This also allows removal of the manual "nop" instruction in the delay slot. Suggested-by: Maciej W. Rozycki Link: https://lore.kernel.org/lkml/alpine.deb.2.21.2502172208570.6

Re: [PATCH] selftests/nolibc: only run constructor tests on nolibc

2025-02-25 Thread Thomas Weißschuh
Hi Willy, On 2025-02-22 10:38:51+0100, Willy Tarreau wrote: > On Mon, Feb 17, 2025 at 10:24:11PM +0100, Thomas Weißschuh wrote: > > On 2025-02-16 10:39:40+0100, Willy Tarreau wrote: > > > On Wed, Feb 12, 2025 at 07:01:01PM +0100, Thomas Weißschuh wrote: > > > > The nolibc testsuite can be run agai

Re: [PATCH v3 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-02-25 Thread Paul E. McKenney
On Tue, Feb 25, 2025 at 12:00:20PM +0100, Uladzislau Rezki (Sony) wrote: > Switch for using of get_state_synchronize_rcu_full() and > poll_state_synchronize_rcu_full() pair for debug a normal > synchronize_rcu() call. > > Just using "not" full APIs to identify if a grace period > is passed or not

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-25 Thread David Hildenbrand
As for compatibility with VM_LOCKONFAULT, do we need a new MADV_GUARD_INSTALL_LOCKED or can we say MADV_GUARD_INSTALL is new enough that it can be just retrofitted (like you retrofit file backed mappings)? AFAIU the only risk would be breaking somebody that already relies on a failure for VM_LOCKO

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-25 Thread Lorenzo Stoakes
On Tue, Feb 25, 2025 at 04:54:22PM +0100, Vlastimil Babka wrote: > On 2/18/25 18:28, Lorenzo Stoakes wrote: > > On Tue, Feb 18, 2025 at 06:25:35PM +0100, David Hildenbrand wrote: > >> > >> > > > > >> > > > It fails because it tries to 'touch' the memory, but 'touching' guard > >> > > > region memor

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-25 Thread David Hildenbrand
On 25.02.25 16:54, Vlastimil Babka wrote: On 2/18/25 18:28, Lorenzo Stoakes wrote: On Tue, Feb 18, 2025 at 06:25:35PM +0100, David Hildenbrand wrote: It fails because it tries to 'touch' the memory, but 'touching' guard region memory causes a segfault. This kind of breaks the idea of mlock()

Re: [PATCH v3 3/3] rcu: Use _full() API to debug synchronize_rcu()

2025-02-25 Thread Uladzislau Rezki
On Tue, Feb 25, 2025 at 07:48:55AM -0800, Paul E. McKenney wrote: > On Tue, Feb 25, 2025 at 12:00:20PM +0100, Uladzislau Rezki (Sony) wrote: > > Switch for using of get_state_synchronize_rcu_full() and > > poll_state_synchronize_rcu_full() pair for debug a normal > > synchronize_rcu() call. > > >

Re: [PATCH v2 1/2] dt-bindings: input/touchscreen: imagis: add compatible for ist3038h

2025-02-25 Thread Rob Herring (Arm)
On Tue, 25 Feb 2025 09:47:00 +0100, Andras Sebok wrote: > IST3038H is a touchscreen IC which seems mostly compatible with IST3038C > except that it reports a different chip ID value. > > Signed-off-by: Andras Sebok > Link: > https://lore.kernel.org/r/20250224090354.102903-4-sebokandris2...@gma

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Keith Busch
On Tue, Feb 25, 2025 at 10:57:38AM +0100, Vlastimil Babka wrote: > I tried to create a kunit test for it, but it doesn't trigger anything. Maybe > it's too simple, or racy, and thus we are not flushing any of the queues from > kvfree_rcu_barrier()? Thanks, your test readily triggers it for me, but

Re: [PATCH net-next v4 0/4] virtio-net: Link queues to NAPIs

2025-02-25 Thread Michael S. Tsirkin
On Tue, Feb 25, 2025 at 02:04:47AM +, Joe Damato wrote: > Greetings: > > Welcome to v4. > > Jakub recently commented [1] that I should not hold this series on > virtio-net linking queues to NAPIs behind other important work that is > on-going and suggested I re-spin, so here we are :) > > Th

Re: [PATCH 0/4] mm: permit guard regions for file-backed/shmem mappings

2025-02-25 Thread Vlastimil Babka
On 2/18/25 18:28, Lorenzo Stoakes wrote: > On Tue, Feb 18, 2025 at 06:25:35PM +0100, David Hildenbrand wrote: >> >> > > > >> > > > It fails because it tries to 'touch' the memory, but 'touching' guard >> > > > region memory causes a segfault. This kind of breaks the idea of >> > > > mlock()'ing gua

Re: [PATCH net-next v4 0/4] virtio-net: Link queues to NAPIs

2025-02-25 Thread Lei Yang
I tested this series of patches with virtio-net regression tests, everything works fine. Tested-by: Lei Yang On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > Greetings: > > Welcome to v4. > > Jakub recently commented [1] that I should not hold this series on > virtio-net linking queues t

Re: [PATCH v7 6/6] rust: add parameter support to the `module!` macro

2025-02-25 Thread Andreas Hindborg
"Gary Guo" writes: > On Tue, 18 Feb 2025 14:00:48 +0100 > Andreas Hindborg wrote: > >> This patch includes changes required for Rust kernel modules to utilize >> module parameters. This code implements read only support for integer >> types without `sysfs` support. >> >> Signed-off-by: Andreas H

Re: [PATCH net-next v6 8/8] selftest: net: add proc_net_pktgen

2025-02-25 Thread Simon Horman
On Fri, Feb 21, 2025 at 10:52:46PM +0100, Peter Seiderer wrote: > Add some test for /proc/net/pktgen/... interface. > > - enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config > > Signed-off-by: Peter Seiderer Reviewed-by: Simon Horman

Re: [PATCH v7 6/6] rust: add parameter support to the `module!` macro

2025-02-25 Thread Gary Guo
On Tue, 18 Feb 2025 14:00:48 +0100 Andreas Hindborg wrote: > This patch includes changes required for Rust kernel modules to utilize > module parameters. This code implements read only support for integer > types without `sysfs` support. > > Signed-off-by: Andreas Hindborg > Acked-by: Petr Pavl

Re: [PATCH net-next v6 1/8] net: pktgen: fix mix of int/long

2025-02-25 Thread Simon Horman
On Fri, Feb 21, 2025 at 10:52:39PM +0100, Peter Seiderer wrote: > Fix mix of int/long (and multiple conversion from/to) by using consequently > size_t for i and max and ssize_t for len and adjust function signatures > of hex32_arg(), count_trail_chars(), num_arg() and strn_len() accordingly. > > S

[syzbot] Monthly virt report (Feb 2025)

2025-02-25 Thread syzbot
Hello virt maintainers/developers, This is a 31-day syzbot report for the virt subsystem. All related reports/information can be found at: https://syzkaller.appspot.com/upstream/s/virt During the period, 0 new issues were detected and 0 were fixed. In total, 5 issues are still open and 47 have al

Re: [PATCH bpf-next v3 4/6] selftests/bpf: refactor xdp_context_functional test and bpf program

2025-02-25 Thread Marcus Wichelmann
Am 24.02.25 um 16:29 schrieb Marcus Wichelmann: [...] + /* By default, Linux sends IPv6 multicast listener reports which +* interfere with this test. Set the IFF_NOARP flag to ensure +* silence on the interface. +*/ + SYS(close, "ip link set dev " RX_NAME " arp

Re: [PATCH bpf-next v3 0/6] XDP metadata support for tun driver

2025-02-25 Thread Marcus Wichelmann
Am 25.02.25 um 15:55 schrieb Willem de Bruijn: Marcus Wichelmann wrote: [...] Signed-off-by: Marcus Wichelmann Acked-by: Jason Wang Reviewed-by: Willem de Bruijn Please don't add tags, unless a person has explicitly added them. And they are only sticky when the code has not been changed s

Re: [PATCH bpf-next v3 0/6] XDP metadata support for tun driver

2025-02-25 Thread Willem de Bruijn
Marcus Wichelmann wrote: > Hi, > > thank you for your reviw. As promised, here is V3 of this patch series. > > I noticed that the updated selftests were flaky sometimes due to the kernel > networking stack sending IPv6 multicast listener reports on the created > test interfaces. > This can be see

Re: [PATCH v3 2/8] dt-bindings: dsp: fsl,dsp: Add resets property

2025-02-25 Thread Daniel Baluta
Hello Philipp, Thanks for your comments! > The DAP core reset is mentioned in the commit message. Why is it > missing here? After reading the discussion in [1], I'd expect both the > stall and the (core) reset signal to be documented, something like: There is no reset controller driver for DAP a

Re: [PATCHv2 net 1/3] bonding: move mutex lock to a work queue for XFRM GC tasks

2025-02-25 Thread Nikolay Aleksandrov
On 2/25/25 16:00, Cosmin Ratiu wrote: > On Tue, 2025-02-25 at 09:40 +, Hangbin Liu wrote: >> The fixed commit placed mutex_lock() inside spin_lock_bh(), which >> triggers >> a warning like: >> >> BUG: sleeping function called from invalid context at... >> >> Fix this by moving the mutex_lock()

Re: [PATCH v5 2/4] virtio_rtc: Add PTP clocks

2025-02-25 Thread Michael S. Tsirkin
On Tue, Feb 25, 2025 at 02:12:40PM +, Simon Horman wrote: > On Tue, Feb 25, 2025 at 12:28:24PM +0100, Peter Hilber wrote: > > On Mon, Feb 24, 2025 at 05:56:18PM +, Simon Horman wrote: > > > On Wed, Feb 19, 2025 at 08:32:57PM +0100, Peter Hilber wrote: > > > > > > ... > > > > > > > +/** >

Re: [PATCH v2 6/7] mm, slab: call kvfree_rcu_barrier() from kmem_cache_destroy()

2025-02-25 Thread Vlastimil Babka
On 2/25/25 14:39, Uladzislau Rezki wrote: > On Tue, Feb 25, 2025 at 10:57:38AM +0100, Vlastimil Babka wrote: >> On 2/24/25 12:44, Uladzislau Rezki wrote: >> > On Fri, Feb 21, 2025 at 06:28:49PM +0100, Vlastimil Babka wrote: >> >> On 2/21/25 17:30, Keith Busch wrote: >> >> > [ cut here

Re: [PATCH] virtio: break and reset virtio devices on device_shutdown()

2025-02-25 Thread Eric Auger
Hi Michael, On 2/24/25 8:31 PM, Michael S. Tsirkin wrote: > On Mon, Feb 24, 2025 at 08:49:09AM +0100, Eric Auger wrote: >> Hi Michael, >> >> On 2/21/25 12:42 AM, Michael S. Tsirkin wrote: >>> Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory >>> accesses during the hang. >>> >>

  1   2   >