[PATCH bpf-next v1 0/3] bpf: Fix use-after-free of sockmap

2025-02-26 Thread Jiayuan Chen
1. Issue Syzkaller reported this issue [1]. 2. Reproduce We can reproduce this issue by using the test_sockmap_with_close_on_write() test I provided in selftest, also you need to apply the following patch to ensure 100% reproducibility (sleep after checking sock): ''' static void sk_psock_verdic

[PATCH bpf-next v1 3/3] selftests/bpf: Add edge case tests for sockmap

2025-02-26 Thread Jiayuan Chen
Add edge case tests for sockmap. Signed-off-by: Jiayuan Chen --- .../selftests/bpf/prog_tests/sockmap_basic.c | 57 +++ 1 file changed, 57 insertions(+) diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c b/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c

[PATCH bpf-next v1 2/3] selftests/bpf: Add socketpair to create_pair to support unix socket

2025-02-26 Thread Jiayuan Chen
Current wrapper function create_pair() is used to create a pair of connected links and returns two fds, but it does not support unix sockets. Here we introduce socketpair() into create_pair(), which supports creating a pair of unix sockets, since the semantics of the two are the same. Signed-off-

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

2025-02-26 Thread Cosmin Ratiu
On Wed, 2025-02-26 at 12:07 +, Hangbin Liu wrote: > > During bonding testing, we also found a case that would trigger > the WARN_ON(xs->xso.real_dev != real_dev). > > If we create active-backup mode bonding and create ipsec tunnel over > bonding device, then remove bonding device. There is a

[PATCH 0/3] Fairphone 5 DisplayPort over USB-C support

2025-02-26 Thread Luca Weiss
This series adds all the necessary bits to enable DisplayPort-out over USB-C on Fairphone 5. There's currently a dt validation error with this, not quite sure how to resolve this: arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dtb: typec-mux@42: port:endpoint: Unevaluated properties are not al

[PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver

2025-02-26 Thread Luca Weiss
Add a node for the "Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo redriver" found on this device. Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 32 +- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/qcom

[PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add OCP96011 audio switch

2025-02-26 Thread Luca Weiss
Add a node for the OCP96011 on the board which is used to handle USB-C analog audio switch and handles the SBU mux for DisplayPort-over-USB-C. Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff

[PATCH 3/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Hook up DisplayPort over USB-C

2025-02-26 Thread Luca Weiss
Extend the USB graph to connect the OCP96011 switch, the PTN36502 redriver, the USB controllers and the MDSS, so that DisplayPort over USB-C is working. Signed-off-by: Luca Weiss --- arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dts | 67 +- arch/arm64/boot/dts/qcom/sc7280.d

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

2025-02-26 Thread Frederic Weisbecker
Le Wed, Feb 26, 2025 at 10:26:34AM -0500, Joel Fernandes a écrit : > > > On 2/26/2025 10:04 AM, Paul E. McKenney wrote: > >>> I was wondering if you could also point to the fastpath that this is > >>> racing > >>> with, it is not immediately clear (to me) what this smp_mb() is pairing > >>> wit

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

2025-02-26 Thread Uladzislau Rezki
On Wed, Feb 26, 2025 at 06:50:02AM -0800, Paul E. McKenney wrote: > On Wed, Feb 26, 2025 at 03:29:09PM +0100, Uladzislau Rezki wrote: > > On Tue, Feb 25, 2025 at 04:24:09PM -0500, Joel Fernandes wrote: > > > On Tue, Feb 25, 2025 at 12:00:18PM +0100, Uladzislau Rezki (Sony) wrote: > > > > Currently

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

2025-02-26 Thread Uladzislau Rezki
On Wed, Feb 26, 2025 at 03:36:39PM +0100, Vlastimil Babka wrote: > On 2/26/25 3:31 PM, Uladzislau Rezki wrote: > > On Wed, Feb 26, 2025 at 11:59:53AM +0100, Vlastimil Babka wrote: > >> On 2/25/25 7:21 PM, Uladzislau Rezki wrote: > > >>> WQ_MEM_RECLAIM-patch fixes this for me: > >> > >> Sounds

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

2025-02-26 Thread Vlastimil Babka
On 2/26/25 4:42 PM, Uladzislau Rezki wrote: > On Wed, Feb 26, 2025 at 03:36:39PM +0100, Vlastimil Babka wrote: >> On 2/26/25 3:31 PM, Uladzislau Rezki wrote: >>> On Wed, Feb 26, 2025 at 11:59:53AM +0100, Vlastimil Babka wrote: On 2/25/25 7:21 PM, Uladzislau Rezki wrote: >> > WQ_MEM_REC

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

2025-02-26 Thread Uladzislau Rezki
On Wed, Feb 26, 2025 at 04:46:38PM +0100, Vlastimil Babka wrote: > On 2/26/25 4:42 PM, Uladzislau Rezki wrote: > > On Wed, Feb 26, 2025 at 03:36:39PM +0100, Vlastimil Babka wrote: > >> On 2/26/25 3:31 PM, Uladzislau Rezki wrote: > >>> On Wed, Feb 26, 2025 at 11:59:53AM +0100, Vlastimil Babka wrote:

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

2025-02-26 Thread Marcus Wichelmann
Am 25.02.25 um 19:23 schrieb 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

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

2025-02-26 Thread Indu Bhagat
On 2/26/25 2:23 AM, Puranjay Mohan wrote: Indu Bhagat writes: 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

Re: [PATCH 2/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add OCP96011 audio switch

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 3:10 PM, Luca Weiss wrote: > Add a node for the OCP96011 on the board which is used to handle USB-C > analog audio switch and handles the SBU mux for DisplayPort-over-USB-C. > > Signed-off-by: Luca Weiss > --- Reviewed-by: Konrad Dybcio Konrad

Re: [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 6:40 PM, Konrad Dybcio wrote: > On 26.02.2025 3:10 PM, Luca Weiss wrote: >> Add a node for the "Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo >> redriver" found on this device. >> >> Signed-off-by: Luca Weiss >> --- > > Reviewed-by: Konrad Dybcio Actually, please also rename the

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

2025-02-26 Thread Jason Gunthorpe
On Tue, Feb 25, 2025 at 06:25:27PM -0800, Nicolin Chen wrote: > 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/iom

Re: [PATCH v2] dt-bindings: remoteproc: qcom,sm6115-pas: Use recommended MBN firmware format in DTS example

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 3:51 PM, Krzysztof Kozlowski wrote: > All Qualcomm firmwares uploaded to linux-firmware are in MBN format, > instead of split MDT. No functional changes, just correct the DTS > example so people will not rely on unaccepted files. > > Signed-off-by: Krzysztof Kozlowski > --- Review

Re: [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 3:10 PM, Luca Weiss wrote: > Add a node for the "Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo > redriver" found on this device. > > Signed-off-by: Luca Weiss > --- Reviewed-by: Konrad Dybcio Konrad

Re: [PATCH 0/3] Fairphone 5 DisplayPort over USB-C support

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 3:10 PM, Luca Weiss wrote: > This series adds all the necessary bits to enable DisplayPort-out over > USB-C on Fairphone 5. > > There's currently a dt validation error with this, not quite sure how to > resolve this: > > arch/arm64/boot/dts/qcom/qcm6490-fairphone-fp5.dtb: typec-mu

Re: [PATCH 1/3] arm64: dts: qcom: qcm6490-fairphone-fp5: Add PTN36502 redriver

2025-02-26 Thread Konrad Dybcio
On 26.02.2025 6:45 PM, Konrad Dybcio wrote: > On 26.02.2025 6:40 PM, Konrad Dybcio wrote: >> On 26.02.2025 3:10 PM, Luca Weiss wrote: >>> Add a node for the "Type-C USB 3.1 Gen 1 and DisplayPort v1.2 combo >>> redriver" found on this device. >>> >>> Signed-off-by: Luca Weiss >>> --- >> >> Reviewed

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

2025-02-26 Thread Joel Fernandes
On 2/26/2025 9:29 AM, Uladzislau Rezki wrote: > On Tue, Feb 25, 2025 at 04:24:09PM -0500, Joel Fernandes wrote: >> 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

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

2025-02-26 Thread Joe Damato
On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote: > On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote: > > 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, ta

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

2025-02-26 Thread Boqun Feng
Hi Ulad, 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 pass

Re: [PATCH bpf-next v3 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-26 Thread Stanislav Fomichev
On 02/26, Marcus Wichelmann wrote: > Am 24.02.25 um 18:14 schrieb Stanislav Fomichev: > > On 02/24, Marcus Wichelmann wrote: > > > Add a selftest that creates a tap device, attaches XDP and TC programs, > > > writes a packet with a test payload into the tap device and checks the > > > test result.

Re: [RFC PATCH 14/39] KVM: guest_memfd: hugetlb: initialization and cleanup

2025-02-26 Thread Ackerley Tng
Ackerley Tng writes: > Peter Xu writes: > >> On Tue, Sep 10, 2024 at 11:43:45PM +, Ackerley Tng wrote: >>> +/** >>> + * Removes folios in range [@lstart, @lend) from page cache of inode, >>> updates >>> + * inode metadata and hugetlb reservations. >>> + */ >>> +static void kvm_gmem_hugetlb_

Re: [PATCH bpf-next v3 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-26 Thread Marcus Wichelmann
Am 24.02.25 um 18:14 schrieb Stanislav Fomichev: On 02/24, Marcus Wichelmann wrote: Add a selftest that creates a tap device, attaches XDP and TC programs, writes a packet with a test payload into the tap device and checks the test result. This test ensures that the XDP metadata support in the t

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

2025-02-26 Thread Tejun Heo
On Wed, Feb 26, 2025 at 07:50:57AM +0100, Andrea Righi wrote: > 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 Applied to sched_ext/for-6.15

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

2025-02-26 Thread Jason Gunthorpe
On Wed, Feb 26, 2025 at 10:57:00AM -0800, Nicolin Chen wrote: > OK, I see. But we are also changing the behavior for the > !CONFIG_IOMMU_DMA configuration, in which case all other iommu > functions seem to return -ENODEV. And I assume we would need a > justification for such a change? > > Perhaps,

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

2025-02-26 Thread Nicolin Chen
On Wed, Feb 26, 2025 at 01:36:10PM -0400, Jason Gunthorpe wrote: > On Tue, Feb 25, 2025 at 06:25:27PM -0800, Nicolin Chen wrote: > > 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..082274e8

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

2025-02-26 Thread David Wei
On 2025-02-26 10:19, 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:

[PATCH v2 2/3] selftests/net: only print passing message in GRO tests when tests pass

2025-02-26 Thread Kevin Krakauer
gro.c:main no longer erroneously claims a test passes when running as a sender. Tested: Ran `gro.sh -t large` to verify the sender no longer prints a status. Signed-off-by: Kevin Krakauer --- tools/testing/selftests/net/gro.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff -

[PATCH v2 3/3] selftests/net: deflake GRO tests

2025-02-26 Thread Kevin Krakauer
GRO tests are timing dependent and can easily flake. This is partially mitigated in gro.sh by giving each subtest 3 chances to pass. However, this still flakes on some machines. Reduce the flakiness by: - Bumping retries to 6. - Setting napi_defer_hard_irqs to 1 to reduce the chance that GRO is

[PATCH v2 1/3] selftests/net: have `gro.sh -t` return a correct exit code

2025-02-26 Thread Kevin Krakauer
Modify gro.sh to return a useful exit code when the -t flag is used. It formerly returned 0 no matter what. Tested: Ran `gro.sh -t large` and verified that test failures return 1. Signed-off-by: Kevin Krakauer --- tools/testing/selftests/net/gro.sh | 3 ++- 1 file changed, 2 insertions(+), 1 del

Re: [PATCH bpf-next v3 5/6] selftests/bpf: add test for XDP metadata support in tun driver

2025-02-26 Thread Marcus Wichelmann
Am 26.02.25 um 20:00 schrieb Stanislav Fomichev: On 02/26, Marcus Wichelmann wrote: Am 24.02.25 um 18:14 schrieb Stanislav Fomichev: On 02/24, Marcus Wichelmann wrote: [...] +void test_xdp_context_tuntap(void) tap0 is already used by lwt tests, so there is a chance this new test will clash

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-26 Thread Davidlohr Bueso
On Wed, 26 Feb 2025, Alexei Starovoitov wrote: On Wed, Feb 26, 2025 at 9:01???AM Davidlohr Bueso wrote: On Fri, 14 Feb 2025, Vlastimil Babka wrote: >From: Sebastian Andrzej Siewior > >In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect >critical section, but it doesn't preven

Re: [PATCH v2] selftests/vDSO: fix GNU hash table entry size for s390x

2025-02-26 Thread Vasily Gorbik
On Tue, Feb 18, 2025 at 12:52:31AM +0100, Vasily Gorbik wrote: > On Mon, Feb 17, 2025 at 02:04:18PM +0100, Thomas Weißschuh wrote: > > Commit 14be4e6f3522 ("selftests: vDSO: fix ELF hash table entry size for > > s390x") > > changed the type of the ELF hash table entries to 64bit on s390x. > > Howe

[PATCH v2 0/3] selftests/net: deflake GRO tests and fix return value and output

2025-02-26 Thread Kevin Krakauer
The GRO selftests can flake and have some confusing behavior. These changes make the output and return value of GRO behave as expected, then deflake the tests. v2: - Split into multiple commits. - Reduced napi_defer_hard_irqs to 1. - Reduced gro_flush_timeout to 100us. - Fixed comment that wasn't

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

2025-02-26 Thread Zi Yan
On 26 Feb 2025, at 2:11, Baolin Wang wrote: > 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 sl

Re: (subset) [PATCH v3 0/3] Add missing SDCC resets for SDM630/660

2025-02-26 Thread Bjorn Andersson
On Mon, 03 Feb 2025 09:34:23 +0300, Alexey Minnekhanov wrote: > These resets are part of GCC space and were missed during initial > porting of the platform. > > Changelog: > > v3: > * dropped fixes tags, picked r-b > > [...] Applied, thanks! [3/3] arm64: dts: qcom: sdm630: Add missing reset

Re: [PATCH 0/2] Enable panel and GPU on Fairphone 5

2025-02-26 Thread Bjorn Andersson
On Sun, 02 Feb 2025 23:45:50 +0100, Luca Weiss wrote: > Now since upstream DPU driver can use 1:1:1 DSC topology, we can finally > enable the panel and GPU on Fairphone 5. > > Depends on > https://lore.kernel.org/linux-arm-msm/20250122-dpu-111-topology-v2-1-505e95964...@somainline.org/ > > A

[PATCH bpf-next v1 1/3] bpf, sockmap: avoid using sk_socket after free

2025-02-26 Thread Jiayuan Chen
Use RCU lock to protect sk_socket, preventing concurrent close and release by another thread. Because TCP/UDP are already within a relatively large critical section: ''' ip_local_deliver_finish rcu_read_lock ip_protocol_deliver_rcu tcp_rcv/udp_rcv rcu_read_unlock ''' Adding rcu_read_{

Re: [PATCH 0/2] Some small preparations around CAMSS D-PHY / C-PHY support

2025-02-26 Thread Luca Weiss
Hi all, On Mon Dec 9, 2024 at 1:01 PM CET, Luca Weiss wrote: > Since the hardware blocks on the SoCs generally support both D-PHY and > C-PHY standards for camera, but the camss driver currently is only > supporting D-PHY, do some preparations in order to add C-PHY support at > some point. > > Mak

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

2025-02-26 Thread Joel Fernandes
On 2/26/2025 10:04 AM, Paul E. McKenney wrote: >>> I was wondering if you could also point to the fastpath that this is racing >>> with, it is not immediately clear (to me) what this smp_mb() is pairing with >>> 🙁 >> It is supposed to pair with the barrier in sync_exp_work_done() but then >> ag

Re: [PATCH 2/2] remoteproc: k3-r5: Refactor Data Structures to Align with DSP and M4

2025-02-26 Thread Beleswar Prasad Padhi
Hi Andrew, On 26/02/25 20:14, Andrew Davis wrote: On 2/19/25 3:10 AM, Beleswar Padhi wrote: Currently, struct members such as mem, num_mems, reset, tsp, ti_sci and ti_sci_id are part of the k3_r5_core structure. To align the rproc->priv data structure of the R5 remote processor with that of the

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

2025-02-26 Thread Uladzislau Rezki
On Wed, Feb 26, 2025 at 11:59:53AM +0100, Vlastimil Babka wrote: > On 2/25/25 7:21 PM, Uladzislau Rezki wrote: > >> > > WQ_MEM_RECLAIM-patch fixes this for me: > > Sounds good, can you send a formal patch then? > Do you mean both? Test case and fix? I can :) > Some nits below: > > > > > diff --

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

2025-02-26 Thread Vlastimil Babka
On 2/26/25 3:31 PM, Uladzislau Rezki wrote: > On Wed, Feb 26, 2025 at 11:59:53AM +0100, Vlastimil Babka wrote: >> On 2/25/25 7:21 PM, Uladzislau Rezki wrote: >>> WQ_MEM_RECLAIM-patch fixes this for me: >> >> Sounds good, can you send a formal patch then? >> > Do you mean both? Test case and fi

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

2025-02-26 Thread Uladzislau Rezki
On Tue, Feb 25, 2025 at 04:24:09PM -0500, Joel Fernandes wrote: > 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 ha

Re: [PATCH 0/2] Some small preparations around CAMSS D-PHY / C-PHY support

2025-02-26 Thread Bryan O'Donoghue
On 26/02/2025 14:13, Luca Weiss wrote: Hi all, On Mon Dec 9, 2024 at 1:01 PM CET, Luca Weiss wrote: Since the hardware blocks on the SoCs generally support both D-PHY and C-PHY standards for camera, but the camss driver currently is only supporting D-PHY, do some preparations in order to add C-

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

2025-02-26 Thread Paul E. McKenney
On Wed, Feb 26, 2025 at 03:29:09PM +0100, Uladzislau Rezki wrote: > On Tue, Feb 25, 2025 at 04:24:09PM -0500, Joel Fernandes wrote: > > 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 pos

Re: [PATCH 2/2] remoteproc: k3-r5: Refactor Data Structures to Align with DSP and M4

2025-02-26 Thread Andrew Davis
On 2/19/25 3:10 AM, Beleswar Padhi wrote: Currently, struct members such as mem, num_mems, reset, tsp, ti_sci and ti_sci_id are part of the k3_r5_core structure. To align the rproc->priv data structure of the R5 remote processor with that of the DSP and M4, move the above members from k3_r5_core

[PATCH v2] dt-bindings: remoteproc: qcom,sm6115-pas: Use recommended MBN firmware format in DTS example

2025-02-26 Thread Krzysztof Kozlowski
All Qualcomm firmwares uploaded to linux-firmware are in MBN format, instead of split MDT. No functional changes, just correct the DTS example so people will not rely on unaccepted files. Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/remoteproc/qcom,sm6115-pas.yaml | 2

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

2025-02-26 Thread Paul E. McKenney
On Wed, Feb 26, 2025 at 01:52:09PM +0100, Frederic Weisbecker wrote: > Le Tue, Feb 25, 2025 at 04:59:08PM -0500, Joel Fernandes a écrit : > > 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 ord

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

2025-02-26 Thread Baolin Wang
On 2025/2/26 23:00, Zi Yan wrote: On 26 Feb 2025, at 2:11, Baolin Wang wrote: 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_sp

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

2025-02-26 Thread Uladzislau Rezki
On Wed, Feb 26, 2025 at 08:51:37AM -0700, Keith Busch wrote: > On Tue, Feb 25, 2025 at 07:21:19PM +0100, Uladzislau Rezki wrote: > > WQ_MEM_RECLAIM-patch fixes this for me: > > This is successful with the new kuint test for me as well. I can't > readily test this in production where I first learne

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

2025-02-26 Thread Keith Busch
On Tue, Feb 25, 2025 at 07:21:19PM +0100, Uladzislau Rezki wrote: > WQ_MEM_RECLAIM-patch fixes this for me: This is successful with the new kuint test for me as well. I can't readily test this in production where I first learned of this issue (at least not in the near term), but for what it's wort

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

2025-02-26 Thread Marcus Wichelmann
Am 24.02.25 um 18:12 schrieb Stanislav Fomichev: On 02/24, Marcus Wichelmann wrote: [..] +int send_test_packet(int ifindex) nit: static? same for assert_test_result below Yeah why not. Will change it. Thanks!

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

2025-02-26 Thread Zvi Effron
On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov wrote: > > 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

Re: [PATCH v7 07/16] rust: add `io::{Io, IoRaw}` base types

2025-02-26 Thread Alistair Popple
On Tue, Feb 25, 2025 at 12:04:35PM +0100, Danilo Krummrich wrote: > On Tue, Feb 25, 2025 at 04:50:05PM +1100, Alistair Popple wrote: > > Kind of, but given the current state of build_assert's and the impossiblity > > of > > debugging them should we avoid adding them until they can be fixed? > > I

[PATCH net-next v20 00/25] Introducing OpenVPN Data Channel Offload

2025-02-26 Thread Antonio Quartulli
After some time of struggle trying to fix all hidden bugs that Sabrina has found...here is v20! Notable changes since v19: * copyright years updated to 2025 * rtnl_link_ops.newlink adapted to new signature * removed admindown del-peer-reason attribute from netlink API (it should have gone away i

[PATCH net-next v20 01/25] mailmap: remove unwanted entry for Antonio Quartulli

2025-02-26 Thread Antonio Quartulli
anto...@openvpn.net is still used for sending patches under the OpenVPN Inc. umbrella, therefore this address should not be re-mapped. Cc: Andrew Morton Signed-off-by: Antonio Quartulli --- .mailmap | 1 - 1 file changed, 1 deletion(-) diff --git a/.mailmap b/.mailmap index a897c16d3baef92aa6

[PATCH net-next v20 02/25] net: introduce OpenVPN Data Channel Offload (ovpn)

2025-02-26 Thread Antonio Quartulli
OpenVPN is a userspace software existing since around 2005 that allows users to create secure tunnels. So far OpenVPN has implemented all operations in userspace, which implies several back and forth between kernel and user land in order to process packets (encapsulate/decapsulate, encrypt/decrypt

[PATCH net-next v20 04/25] ovpn: add basic interface creation/destruction/management routines

2025-02-26 Thread Antonio Quartulli
Add basic infrastructure for handling ovpn interfaces. Tested-by: Donald Hunter Signed-off-by: Antonio Quartulli --- Documentation/netlink/specs/rt_link.yaml | 16 + drivers/net/ovpn/Makefile| 1 + drivers/net/ovpn/io.c| 22 ++ drivers/net/ovpn/io

[PATCH net-next v20 06/25] ovpn: introduce the ovpn_peer object

2025-02-26 Thread Antonio Quartulli
An ovpn_peer object holds the whole status of a remote peer (regardless whether it is a server or a client). This includes status for crypto, tx/rx buffers, napi, etc. Only support for one peer is introduced (P2P mode). Multi peer support is introduced with a later patch. Along with the ovpn_pee

[PATCH net-next v20 08/25] ovpn: implement basic TX path (UDP)

2025-02-26 Thread Antonio Quartulli
Packets sent over the ovpn interface are processed and transmitted to the connected peer, if any. Implementation is UDP only. TCP will be added by a later patch. Note: no crypto/encapsulation exists yet. Packets are just captured and sent. Signed-off-by: Antonio Quartulli --- drivers/net/Kconf

[PATCH net-next v20 05/25] ovpn: keep carrier always on for MP interfaces

2025-02-26 Thread Antonio Quartulli
An ovpn interface configured in MP mode will keep carrier always on and let the user decide when to bring it administratively up and down. This way a MP node (i.e. a server) will keep its interface always up and running, even when no peer is connected. Signed-off-by: Antonio Quartulli --- drive

[PATCH net-next v20 09/25] ovpn: implement basic RX path (UDP)

2025-02-26 Thread Antonio Quartulli
Packets received over the socket are forwarded to the user device. Implementation is UDP only. TCP will be added by a later patch. Note: no decryption/decapsulation exists yet, packets are forwarded as they arrive without much processing. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/i

[PATCH net-next v20 07/25] ovpn: introduce the ovpn_socket object

2025-02-26 Thread Antonio Quartulli
This specific structure is used in the ovpn kernel module to wrap and carry around a standard kernel socket. ovpn takes ownership of passed sockets and therefore an ovpn specific objects is attached to them for status tracking purposes. Initially only UDP support is introduced. TCP will come in a

[PATCH net-next v20 13/25] skb: implement skb_send_sock_locked_with_flags()

2025-02-26 Thread Antonio Quartulli
When sending an skb over a socket using skb_send_sock_locked(), it is currently not possible to specify any flag to be set in msghdr->msg_flags. However, we may want to pass flags the user may have specified, like MSG_NOSIGNAL. Extend __skb_send_sock() with a new argument 'flags' and add a new in

[PATCH net-next v20 10/25] ovpn: implement packet processing

2025-02-26 Thread Antonio Quartulli
This change implements encryption/decryption and encapsulation/decapsulation of OpenVPN packets. Support for generic crypto state is added along with a wrapper for the AEAD crypto kernel API. Signed-off-by: Antonio Quartulli --- drivers/net/Kconfig| 4 + drivers/net/ovpn/Makefile

[PATCH net-next v20 11/25] ovpn: store tunnel and transport statistics

2025-02-26 Thread Antonio Quartulli
Byte/packet counters for in-tunnel and transport streams are now initialized and updated as needed. To be exported via netlink. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/Makefile | 1 + drivers/net/ovpn/io.c | 12 +++- drivers/net/ovpn/peer.c | 2 ++ drivers/net/ovpn

[PATCH net-next v20 12/25] ovpn: implement TCP transport

2025-02-26 Thread Antonio Quartulli
With this change ovpn is allowed to communicate to peers also via TCP. Parsing of incoming messages is implemented through the strparser API. Note that ovpn redefines sk_prot and sk_socket->ops for the TCP socket used to communicate with the peer. For this reason it needs to access inet6_stream_op

[PATCH net-next v20 16/25] ovpn: implement peer lookup logic

2025-02-26 Thread Antonio Quartulli
In a multi-peer scenario there are a number of situations when a specific peer needs to be looked up. We may want to lookup a peer by: 1. its ID 2. its VPN destination IP 3. its transport IP/port couple For each of the above, there is a specific routing table referencing all peers for fast look u

[PATCH net-next v20 17/25] ovpn: implement keepalive mechanism

2025-02-26 Thread Antonio Quartulli
OpenVPN supports configuring a periodic keepalive packet. message to allow the remote endpoint detect link failures. This change implements the keepalive sending and timer expiring logic. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 74 drivers/net/ovpn/i

[PATCH net-next v20 18/25] ovpn: add support for updating local UDP endpoint

2025-02-26 Thread Antonio Quartulli
In case of UDP links, the local endpoint used to communicate with a given peer may change without a connection restart. Add support for learning the new address in case of change. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/peer.c | 45 + dr

[PATCH net-next v20 14/25] ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg

2025-02-26 Thread Antonio Quartulli
Userspace may want to pass the MSG_NOSIGNAL flag to tcp_sendmsg() in order to avoid generating a SIGPIPE. To pass this flag down the TCP stack a new skb sending API accepting a flags argument is introduced. Cc: Eric Dumazet Cc: Paolo Abeni Signed-off-by: Antonio Quartulli --- drivers/net/ovpn

[PATCH net-next v20 15/25] ovpn: implement multi-peer support

2025-02-26 Thread Antonio Quartulli
With this change an ovpn instance will be able to stay connected to multiple remote endpoints. This functionality is strictly required when running ovpn on an OpenVPN server. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/main.c | 68 - drivers/net/ovpn/ovpnpriv.h |

[PATCH net-next v20 19/25] ovpn: add support for peer floating

2025-02-26 Thread Antonio Quartulli
A peer connected via UDP may change its IP address without reconnecting (float). Add support for detecting and updating the new peer IP/port in case of floating. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/io.c | 8 ++ drivers/net/ovpn/peer.c | 243

[PATCH net-next v20 22/25] ovpn: kill key and notify userspace in case of IV exhaustion

2025-02-26 Thread Antonio Quartulli
IV wrap-around is cryptographically dangerous for a number of ciphers, therefore kill the key and inform userspace (via netlink) should the IV space go exhausted. Userspace has two ways of deciding when the key has to be renewed before exhausting the IV space: 1) time based approach: after X se

[PATCH net-next v20 23/25] ovpn: notify userspace when a peer is deleted

2025-02-26 Thread Antonio Quartulli
Whenever a peer is deleted, send a notification to userspace so that it can react accordingly. This is most important when a peer is deleted due to ping timeout, because it all happens in kernelspace and thus userspace has no direct way to learn about it. Signed-off-by: Antonio Quartulli --- dr

[PATCH net-next v20 25/25] testing/selftests: add test tool and scripts for ovpn module

2025-02-26 Thread Antonio Quartulli
The ovpn-cli tool can be compiled and used as selftest for the ovpn kernel module. [NOTE: it depends on libmedtls for decoding base64-encoded keys] ovpn-cli implements the netlink and RTNL APIs and can thus be integrated in any script for more automated testing. Along with the tool, a bunch of s

[PATCH net-next v20 03/25] ovpn: add basic netlink support

2025-02-26 Thread Antonio Quartulli
This commit introduces basic netlink support with family registration/unregistration functionalities and stub pre/post-doit. More importantly it introduces the YAML uAPI description along with its auto-generated files: - include/uapi/linux/ovpn.h - drivers/net/ovpn/netlink-gen.c - drivers/net/ovpn

[PATCH net-next v20 21/25] ovpn: implement key add/get/del/swap via netlink

2025-02-26 Thread Antonio Quartulli
This change introduces the netlink commands needed to add, get, delete and swap keys for a specific peer. Userspace is expected to use these commands to create, inspect (non sensitive data only), destroy and rotate session keys for a specific peer. Signed-off-by: Antonio Quartulli --- drivers/n

[PATCH net-next v20 24/25] ovpn: add basic ethtool support

2025-02-26 Thread Antonio Quartulli
Implement support for basic ethtool functionality. Note that ovpn is a virtual device driver, therefore various ethtool APIs are just not meaningful and thus not implemented. Signed-off-by: Antonio Quartulli Reviewed-by: Andrew Lunn --- drivers/net/ovpn/main.c | 15 +++ 1 file chan

[PATCH net-next v20 20/25] ovpn: implement peer add/get/dump/delete via netlink

2025-02-26 Thread Antonio Quartulli
This change introduces the netlink command needed to add, delete and retrieve/dump known peers. Userspace is expected to use these commands to handle known peer lifecycles. Signed-off-by: Antonio Quartulli --- drivers/net/ovpn/netlink.c | 677 - driver

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

2025-02-26 Thread Hou Tao
Hi, On 2/27/2025 7:17 AM, Zvi Effron wrote: > On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov > wrote: >> 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, > >>

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

2025-02-26 Thread Alexei Starovoitov
On Wed, Feb 26, 2025 at 5:48 PM Hou Tao wrote: > > Hi, > > On 2/27/2025 7:17 AM, Zvi Effron wrote: > > On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov > > wrote: > >> On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: > >>> Hi, > >>> > >>> On 2/26/2025 11:24 AM, Alexei Starovoitov wrote: > O

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

2025-02-26 Thread Hou Tao
Hi, On 2/27/2025 9:59 AM, Alexei Starovoitov wrote: > On Wed, Feb 26, 2025 at 5:48 PM Hou Tao wrote: >> Hi, >> >> On 2/27/2025 7:17 AM, Zvi Effron wrote: >>> On Tue, Feb 25, 2025 at 9:42 PM Alexei Starovoitov >>> wrote: On Tue, Feb 25, 2025 at 8:05 PM Hou Tao wrote: > Hi, > > O

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-26 Thread Alexei Starovoitov
On Wed, Feb 26, 2025 at 9:01 AM Davidlohr Bueso wrote: > > On Fri, 14 Feb 2025, Vlastimil Babka wrote: > > >From: Sebastian Andrzej Siewior > > > >In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect > >critical section, but it doesn't prevent NMI, so the fully reentrant > >code can

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

2025-02-26 Thread Joe Damato
On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote: > 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 wond

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

2025-02-26 Thread Paul E. McKenney
On Wed, Feb 26, 2025 at 12:49:41PM -0500, Joel Fernandes wrote: > > > On 2/26/2025 9:29 AM, Uladzislau Rezki wrote: > > On Tue, Feb 25, 2025 at 04:24:09PM -0500, Joel Fernandes wrote: > >> On Tue, Feb 25, 2025 at 12:00:18PM +0100, Uladzislau Rezki (Sony) wrote: > >>> Currently "nfakewriters" para

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

2025-02-26 Thread Uladzislau Rezki
On Wed, Feb 26, 2025 at 10:04:35AM -0800, Paul E. McKenney wrote: > On Wed, Feb 26, 2025 at 12:49:41PM -0500, Joel Fernandes wrote: > > > > > > On 2/26/2025 9:29 AM, Uladzislau Rezki wrote: > > > On Tue, Feb 25, 2025 at 04:24:09PM -0500, Joel Fernandes wrote: > > >> On Tue, Feb 25, 2025 at 12:00:

Re: [PATCH RFC v2 03/10] locking/local_lock: Introduce localtry_lock_t

2025-02-26 Thread Davidlohr Bueso
On Fri, 14 Feb 2025, Vlastimil Babka wrote: From: Sebastian Andrzej Siewior In !PREEMPT_RT local_lock_irqsave() disables interrupts to protect critical section, but it doesn't prevent NMI, so the fully reentrant code cannot use local_lock_irqsave() for exclusive access. Introduce localtry_loc

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

2025-02-26 Thread Chris Hyser
On 2/26/25 01:39, Sinadin Shan wrote: > 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 ob

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

2025-02-26 Thread Marcus Wichelmann
Am 25.02.25 um 19:32 schrieb 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 th

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

2025-02-26 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:

[PATCH 1/4] RISC-V: KVM: Disable the kernel perf counter during configure

2025-02-26 Thread Atish Patra
The perf event should be marked disabled during the creation as it is not ready to be scheduled until there is SBI PMU start call or config matching is called with auto start. Otherwise, event add/start gets called during perf_event_create_kernel_counter function. It will be enabled and scheduled t

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

2025-02-26 Thread Joe Damato
On Wed, Feb 26, 2025 at 01:08:49PM -0500, Joe Damato wrote: > On Wed, Feb 26, 2025 at 01:03:09PM -0500, Joe Damato wrote: > > On Wed, Feb 26, 2025 at 01:48:50PM +0800, Jason Wang wrote: > > > On Tue, Feb 25, 2025 at 10:05 AM Joe Damato wrote: > > > > > > > > Use netif_queue_set_napi to map NAPIs t

Re: [RFC 2/2] kvm: retry nx_huge_page_recovery_thread creation

2025-02-26 Thread Keith Busch
On Wed, Feb 26, 2025 at 12:13:42PM -0800, Sean Christopherson wrote: > I much prefer my (misguided in the original context[*]) approach of marking > the > call_once() COMPLETED if and only if it succeeds. I have a new appreciation for this approach given our recent discoveries. I was mistaken in

  1   2   >