[PATCH AUTOSEL 6.13 15/16] selftests: netfilter: skip br_netfilter queue tests if kernel is tainted

2025-03-17 Thread Sasha Levin
From: Florian Westphal [ Upstream commit c21b02fd9cbf15aed6e32c89e0fd70070281e3d1 ] These scripts fail if the kernel is tainted which leads to wrong test failure reports in CI environments when an unrelated test triggers some splat. Check taint state at start of script and SKIP if its already d

[PATCH AUTOSEL 6.12 08/13] x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled

2025-03-17 Thread Sasha Levin
From: Vladis Dronov [ Upstream commit 65be5c95d08eedda570a6c888a12384c77fe7614 ] The kernel requires X86_FEATURE_SGX_LC to be able to create SGX enclaves, not just X86_FEATURE_SGX. There is quite a number of hardware which has X86_FEATURE_SGX but not X86_FEATURE_SGX_LC. A kernel running on such

[PATCH AUTOSEL 6.12 12/13] selftests: netfilter: skip br_netfilter queue tests if kernel is tainted

2025-03-17 Thread Sasha Levin
From: Florian Westphal [ Upstream commit c21b02fd9cbf15aed6e32c89e0fd70070281e3d1 ] These scripts fail if the kernel is tainted which leads to wrong test failure reports in CI environments when an unrelated test triggers some splat. Check taint state at start of script and SKIP if its already d

[PATCH AUTOSEL 6.1 2/4] x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled

2025-03-17 Thread Sasha Levin
From: Vladis Dronov [ Upstream commit 65be5c95d08eedda570a6c888a12384c77fe7614 ] The kernel requires X86_FEATURE_SGX_LC to be able to create SGX enclaves, not just X86_FEATURE_SGX. There is quite a number of hardware which has X86_FEATURE_SGX but not X86_FEATURE_SGX_LC. A kernel running on such

[PATCH AUTOSEL 6.6 5/8] x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled

2025-03-17 Thread Sasha Levin
From: Vladis Dronov [ Upstream commit 65be5c95d08eedda570a6c888a12384c77fe7614 ] The kernel requires X86_FEATURE_SGX_LC to be able to create SGX enclaves, not just X86_FEATURE_SGX. There is quite a number of hardware which has X86_FEATURE_SGX but not X86_FEATURE_SGX_LC. A kernel running on such

Re: [PATCH] tools/nolibc: Add support for SPARC

2025-03-17 Thread Thomas Weißschuh
On 2025-03-17 08:37:46+0100, Willy Tarreau wrote: > On Sun, Mar 16, 2025 at 02:55:02PM +0100, Thomas Weißschuh wrote: > > Add support for 32bit and 64bit SPARC to nolibc. > > Oh nice! > > > Signed-off-by: Thomas Weißschuh > > --- > > This is only tested on QEMU. > > Any tests on real hardware wo

[PATCH AUTOSEL 6.13 09/16] x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled

2025-03-17 Thread Sasha Levin
From: Vladis Dronov [ Upstream commit 65be5c95d08eedda570a6c888a12384c77fe7614 ] The kernel requires X86_FEATURE_SGX_LC to be able to create SGX enclaves, not just X86_FEATURE_SGX. There is quite a number of hardware which has X86_FEATURE_SGX but not X86_FEATURE_SGX_LC. A kernel running on such

Re: [PATCH v5 2/5] arm64: dts: imx8mp: Add mu2 root clock

2025-03-17 Thread Daniel Baluta
On Mon, Mar 17, 2025 at 5:30 PM Alexander Stein wrote: > > Am Montag, 17. März 2025, 14:33:03 CET schrieb Daniel Baluta: > > Enable MU2 node and add mu2 root clock. > > MU2 is used to communicate with DSP core. > > > > Reviewed-by: Iuliana Prodan > > Reviewed-by: Peng Fan > > Signed-off-by: Dani

Re: [PATCH v2] openrisc: Add cacheinfo support

2025-03-17 Thread Sahil Siddiq
Hello Stafford and Geert, Thank you for the reviews. On 3/17/25 1:55 PM, Geert Uytterhoeven wrote: On Sun, 16 Mar 2025 at 07:59, Stafford Horne wrote: [...] +struct cache_desc { + u32 size; + u32 sets; + u32 block_size; + u32 ways; Considering the changes below to add cache

[PATCH RFC v3 0/8] SLUB percpu sheaves

2025-03-17 Thread Vlastimil Babka
Hi, This is the v3 RFC to add an opt-in percpu array-based caching layer to SLUB. This is to publish accumulated fixes since v2 ahead of LSF/MM. I have also squashed the usage of localtry_lock to be used immediately (not converted to in a separate patch) as the lock should be going to 6.15 at this

[PATCH RFC v3 1/8] locking/local_lock: Introduce localtry_lock_t

2025-03-17 Thread Vlastimil Babka
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_lock_t and localtry_lock_irqsave() that disables i

[PATCH v5 5/5] arm64: dts: Add dsp rproc related mem regions

2025-03-17 Thread Daniel Baluta
With imx8mp-evk board we are now configuring 'dsp' node for rproc usage, so add rproc specific memory regions. Also, enable dsp node because it is ready to be used. Reviewed-by: Ahmad Fatoum Reviewed-by: Iuliana Prodan Reviewed-by: Peng Fan Signed-off-by: Daniel Baluta --- arch/arm64/boot/dt

[PATCH RFC v3 5/8] slab: determine barn status racily outside of lock

2025-03-17 Thread Vlastimil Babka
The possibility of many barn operations is determined by the current number of full or empty sheaves. Taking the barn->lock just to find out that e.g. there are no empty sheaves results in unnecessary overhead and lock contention. Thus perform these checks outside of the lock with a data_race() ann

[PATCH v5 4/5] arm64: dts: imx8mp: Add DSP clocks

2025-03-17 Thread Daniel Baluta
DSP core needs ocram, core and debug clocks. Reviewed-by: Iuliana Prodan Reviewed-by: Peng Fan Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mp.dtsi b/arch/arm64/boot/dts/fr

[PATCH v5 3/5] arm64: dts: imx8mp: Configure dsp node for rproc usage

2025-03-17 Thread Daniel Baluta
DSP can be used with various frameworks (e.g audio firmware, rproc). Currently 'dsp' configuration is intended for audio firmware but it doesn't work well with board level DTs (e.g imx8mp-evk) because board level DT enables audio related IPs (e.g SAI) while audio firmware needs this IPs disabled (b

[PATCH v5 1/5] arm64: dts: imx8mp: Use resets property

2025-03-17 Thread Daniel Baluta
Add resets property to dsp node in order to be able to control the dsp run/stall bit from audio block control. Reviewed-by: Peng Fan Reviewed-by: Frank Li Signed-off-by: Daniel Baluta --- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm6

[PATCH RFC v3 2/8] slab: add opt-in caching layer of percpu sheaves

2025-03-17 Thread Vlastimil Babka
Specifying a non-zero value for a new struct kmem_cache_args field sheaf_capacity will setup a caching layer of percpu arrays called sheaves of given capacity for the created cache. Allocations from the cache will allocate via the percpu sheaves (main or spare) as long as they have no NUMA node pr

[PATCH RFC v3 3/8] slab: add sheaf support for batching kfree_rcu() operations

2025-03-17 Thread Vlastimil Babka
Extend the sheaf infrastructure for more efficient kfree_rcu() handling. For caches with sheaves, on each cpu maintain a rcu_free sheaf in addition to main and spare sheaves. kfree_rcu() operations will try to put objects on this sheaf. Once full, the sheaf is detached and submitted to call_rcu()

[PATCH RFC v3 4/8] slab: sheaf prefilling for guaranteed allocations

2025-03-17 Thread Vlastimil Babka
Add functions for efficient guaranteed allocations e.g. in a critical section that cannot sleep, when the exact number of allocations is not known beforehand, but an upper limit can be calculated. kmem_cache_prefill_sheaf() returns a sheaf containing at least given number of objects. kmem_cache_a

[PATCH RFC v3 7/8] tools: Add sheafs support to testing infrastructure

2025-03-17 Thread Vlastimil Babka
From: "Liam R. Howlett" Allocate a sheaf and fill it to the count amount. Does not fill to the sheaf limit to detect incorrect allocation requests. Signed-off-by: Liam R. Howlett --- tools/include/linux/slab.h | 24 + tools/testing/shared/linux.c | 84 +++

[PATCH RFC v3 8/8] maple_tree: use percpu sheaves for maple_node_cache

2025-03-17 Thread Vlastimil Babka
Setup the maple_node_cache with percpu sheaves of size 32 to hopefully improve its performance. Change the single node rcu freeing in ma_free_rcu() to use kfree_rcu() instead of the custom callback, which allows the rcu_free sheaf batching to be used. Note there are other users of mt_free_rcu() whe

[PATCH RFC v3 6/8] tools: Add testing support for changes to rcu and slab for sheaves

2025-03-17 Thread Vlastimil Babka
From: "Liam R. Howlett" Make testing work for the slab and rcu changes that have come in with the sheaves work. This only works with one kmem_cache, and only the first one used. Subsequent setting of kmem_cache will not update the active kmem_cache and will be silently dropped because there are

Re: [PATCH 1/7] dt-bindings: mailbox: qcom: add compatible for MSM8226 SoC

2025-03-17 Thread Luca Weiss
On 6/19/24 11:02 PM, Luca Weiss wrote: Add the mailbox compatible for MSM8226 SoC. Hi all, This patch is still pending. Regards Luca Signed-off-by: Luca Weiss --- Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/D

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

2025-03-17 Thread Suren Baghdasaryan
On Mon, Mar 17, 2025 at 4:08 AM Vlastimil Babka wrote: > > On 3/14/25 18:10, Suren Baghdasaryan wrote: > > On Tue, Mar 4, 2025 at 11:08 AM Liam R. Howlett > > wrote: > >> > >> * Vlastimil Babka [250304 05:55]: > >> > On 2/25/25 21:26, Suren Baghdasaryan wrote: > >> > > On Mon, Feb 24, 2025 at 1

Re: [PATCH v5 0/5] Configure imx8mp dsp node for rproc usage

2025-03-17 Thread Rob Herring (Arm)
On Mon, 17 Mar 2025 15:33:01 +0200, Daniel Baluta wrote: > DSP found in i.MX8MP SOC can be used by multiple frameworks in order to > enable various applications: > - rproc/rpmsg framework, used to load for example Zephyr samples > - Sound Open Firmware, used to enable various audi

Re: [PATCH v5 2/5] arm64: dts: imx8mp: Add mu2 root clock

2025-03-17 Thread Alexander Stein
Am Montag, 17. März 2025, 14:33:03 CET schrieb Daniel Baluta: > Enable MU2 node and add mu2 root clock. > MU2 is used to communicate with DSP core. > > Reviewed-by: Iuliana Prodan > Reviewed-by: Peng Fan > Signed-off-by: Daniel Baluta > --- > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 2 +- >

[PATCH AUTOSEL 5.15 2/4] x86/sgx: Warn explicitly if X86_FEATURE_SGX_LC is not enabled

2025-03-17 Thread Sasha Levin
From: Vladis Dronov [ Upstream commit 65be5c95d08eedda570a6c888a12384c77fe7614 ] The kernel requires X86_FEATURE_SGX_LC to be able to create SGX enclaves, not just X86_FEATURE_SGX. There is quite a number of hardware which has X86_FEATURE_SGX but not X86_FEATURE_SGX_LC. A kernel running on such

Re: [PATCH] selftests/bpf: Replace deprecated strncpy() with strscpy()

2025-03-17 Thread Alexei Starovoitov
On Mon, Mar 17, 2025 at 12:47 AM wrote: > > From: FengWei > > strncpy() is deprecated for NUL-terminated destination buffers. Use > strscpy() instead and remove the manual NUL-termination. > > Signed-off-by: FengWei > --- > tools/testing/selftests/bpf/test_verifier.c | 3 +-- > 1 file changed,

Re: [PATCH v2] rpmsg: qcom_smd: Improve error handling for qcom_smd_parse_edge

2025-03-17 Thread Luca Weiss
On 10/19/24 12:06 PM, Luca Weiss wrote: On Donnerstag, 6. Juni 2024 21:01:36 MESZ Luca Weiss wrote: When the mailbox driver has not probed yet, the error message "failed to parse smd edge" is just going to confuse users, so improve the error prints a bit. Cover the last remaining exits from qco

[PATCH net-next v24 09/23] ovpn: implement packet processing

2025-03-17 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 v24 12/23] skb: implement skb_send_sock_locked_with_flags()

2025-03-17 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 v24 06/23] ovpn: introduce the ovpn_socket object

2025-03-17 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 v24 08/23] ovpn: implement basic RX path (UDP)

2025-03-17 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 v24 13/23] ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg

2025-03-17 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

Re: [PATCH] tools/nolibc: Add support for SPARC

2025-03-17 Thread Chris Torek
On Mon, Mar 17, 2025 at 11:38 AM Willy Tarreau wrote: > OK thanks, but that remains quite strange to me. How can we end up > here with such an unaligned stack ? At the very minimum I'd expect > all offsets to be multiple of 8. It's a peculiar feature of the version 9 SPARC architecture and runtim

[PATCH net-next v24 07/23] ovpn: implement basic TX path (UDP)

2025-03-17 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 v24 10/23] ovpn: store tunnel and transport statistics

2025-03-17 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 1/3] of: reserved_mem: Add functions to parse "memory-region"

2025-03-17 Thread Rob Herring (Arm)
Drivers with "memory-region" properties currently have to do their own parsing of "memory-region" properties. The result is all the drivers have similar patterns of a call to parse "memory-region" and then get the region's address and size. As this is a standard property, it should have common func

[PATCH 0/3] of: Common "memory-region" parsing

2025-03-17 Thread Rob Herring (Arm)
While there's a common function to parse "memory-region" properties for DMA pool regions, there's not anything for driver private regions. As a result, drivers have resorted to parsing "memory-region" properties themselves repeating the same pattern over and over. To fix this, this series adds 2 fu

[PATCH v2 09/10] vhost-scsi: log event queue write descriptors

2025-03-17 Thread Dongli Zhang
Log write descriptors for the event queue, leveraging vhost_get_vq_desc() to retrieve the array of write descriptors to obtain the log buffer. There is only one path for event queue. Suggested-by: Joao Martins Signed-off-by: Dongli Zhang --- drivers/vhost/scsi.c | 16 +++- 1 file c

[PATCH v2 06/10] vhost-scsi: cache log buffer in I/O queue vhost_scsi_cmd

2025-03-17 Thread Dongli Zhang
The vhost-scsi I/O queue uses vhost_scsi_cmd. Allocate the log buffer during vhost_scsi_cmd allocation or when VHOST_F_LOG_ALL is set. Free the log buffer when vhost_scsi_cmd is reclaimed or when VHOST_F_LOG_ALL is removed. Fail vhost_scsi_set_endpoint or vhost_scsi_set_features() on allocation fa

[PATCH v2 10/10] vhost: add WARNING if log_num is more than limit

2025-03-17 Thread Dongli Zhang
Since long time ago, the only user of vq->log is vhost-net. The concern is to add support for more devices (i.e. vhost-scsi or vsock) may reveals unknown issue in the vhost API. Add a WARNING. Suggested-by: Joao Martins Signed-off-by: Dongli Zhang --- drivers/vhost/vhost.c | 18

[PATCH 2/3] of: Simplify of_dma_set_restricted_buffer() to use of_for_each_phandle()

2025-03-17 Thread Rob Herring (Arm)
Simplify of_dma_set_restricted_buffer() by using of_property_present() and of_for_each_phandle() iterator. Signed-off-by: Rob Herring (Arm) --- drivers/of/device.c | 34 +- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/drivers/of/device.c b/drive

[PATCH net-next v24 01/23] net: introduce OpenVPN Data Channel Offload (ovpn)

2025-03-17 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 v24 19/23] ovpn: implement key add/get/del/swap via netlink

2025-03-17 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 v24 23/23] testing/selftests: add test tool and scripts for ovpn module

2025-03-17 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 v24 20/23] ovpn: kill key and notify userspace in case of IV exhaustion

2025-03-17 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 v24 22/23] ovpn: add basic ethtool support

2025-03-17 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

Re: [PATCH] tools/nolibc: Add support for SPARC

2025-03-17 Thread Willy Tarreau
On Mon, Mar 17, 2025 at 06:57:01PM -0700, Chris Torek wrote: > On Mon, Mar 17, 2025 at 11:38 AM Willy Tarreau wrote: > > OK thanks, but that remains quite strange to me. How can we end up > > here with such an unaligned stack ? At the very minimum I'd expect > > all offsets to be multiple of 8. >

[PATCH v2 02/10] vhost-scsi: Fix vhost_scsi_send_bad_target()

2025-03-17 Thread Dongli Zhang
Although the support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 was signaled by the commit 664ed90e621c ("vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits"), vhost_scsi_send_bad_target() still assumes the response in a single descriptor. In addition, although vhost_scsi_send_

Re: [PATCH v2 03/10] vhost-scsi: Fix vhost_scsi_send_status()

2025-03-17 Thread Jason Wang
On Tue, Mar 18, 2025 at 7:52 AM Dongli Zhang wrote: > > Although the support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 was > signaled by the commit 664ed90e621c ("vhost/scsi: Set > VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits"), > vhost_scsi_send_bad_target() still assumes the response

Re: [PATCH v2 02/10] vhost-scsi: Fix vhost_scsi_send_bad_target()

2025-03-17 Thread Jason Wang
On Tue, Mar 18, 2025 at 7:52 AM Dongli Zhang wrote: > > Although the support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 was > signaled by the commit 664ed90e621c ("vhost/scsi: Set > VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits"), > vhost_scsi_send_bad_target() still assumes the response

[PATCH] MAINTAINERS: update Alexey Makhalov's email address

2025-03-17 Thread Alexey Makhalov
Fix a typo in an email address. Cc: sta...@vger.kernel.org Reported-by: Konstantin Ryabitsev Closes: https://lore.kernel.org/all/20240925-rational-succinct-vulture-cca9fb@lemur/T/ Signed-off-by: Alexey Makhalov --- MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff -

Re: [PATCH v2 01/10] vhost-scsi: protect vq->log_used with vq->mutex

2025-03-17 Thread Jason Wang
On Tue, Mar 18, 2025 at 7:51 AM Dongli Zhang wrote: > > The vhost-scsi completion path may access vq->log_base when vq->log_used is > already set to false. > > vhost-thread QEMU-thread > > vhost_scsi_complete_cmd_work() > -> vhost_add_used() >-> vhost_add_used_n() >

Re: [PATCH v2 04/10] vhost: modify vhost_log_write() for broader users

2025-03-17 Thread Jason Wang
On Tue, Mar 18, 2025 at 7:51 AM Dongli Zhang wrote: > > Currently, the only user of vhost_log_write() is vhost-net. The 'len' > argument prevents logging of pages that are not tainted by the RX path. > > Adjustments are needed since more drivers (i.e. vhost-scsi) begin using > vhost_log_write(). S

[PATCH v2 04/10] vhost: modify vhost_log_write() for broader users

2025-03-17 Thread Dongli Zhang
Currently, the only user of vhost_log_write() is vhost-net. The 'len' argument prevents logging of pages that are not tainted by the RX path. Adjustments are needed since more drivers (i.e. vhost-scsi) begin using vhost_log_write(). So far vhost-net RX path may only partially use pages shared by t

Re: [PATCH v2 06/10] vhost-scsi: cache log buffer in I/O queue vhost_scsi_cmd

2025-03-17 Thread Dongli Zhang
Hi Mike, On 3/17/25 4:55 PM, Dongli Zhang wrote: > The vhost-scsi I/O queue uses vhost_scsi_cmd. Allocate the log buffer > during vhost_scsi_cmd allocation or when VHOST_F_LOG_ALL is set. Free the > log buffer when vhost_scsi_cmd is reclaimed or when VHOST_F_LOG_ALL is > removed. > > Fail vhost_s

[PATCH v2 00/10] vhost-scsi: log write descriptors for live migration (and three bugfix)

2025-03-17 Thread Dongli Zhang
The live migration with vhost-scsi has been enabled by QEMU commit b3e89c941a85 ("vhost-scsi: Allow user to enable migration"), which thoroughly explains the workflow that QEMU collaborates with vhost-scsi on the live migration. Although it logs dirty data for the used ring, it doesn't log any wri

[PATCH v2 01/10] vhost-scsi: protect vq->log_used with vq->mutex

2025-03-17 Thread Dongli Zhang
The vhost-scsi completion path may access vq->log_base when vq->log_used is already set to false. vhost-thread QEMU-thread vhost_scsi_complete_cmd_work() -> vhost_add_used() -> vhost_add_used_n() if (unlikely(vq->log_used))

[PATCH v2 08/10] vhost-scsi: log control queue write descriptors

2025-03-17 Thread Dongli Zhang
Log write descriptors for the control queue, leveraging vhost_scsi_get_desc() and vhost_get_vq_desc() to retrieve the array of write descriptors to obtain the log buffer. For Task Management Requests, similar to the I/O queue, store the log buffer during the submission path and log it in the compl

[PATCH v2 03/10] vhost-scsi: Fix vhost_scsi_send_status()

2025-03-17 Thread Dongli Zhang
Although the support of VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 was signaled by the commit 664ed90e621c ("vhost/scsi: Set VIRTIO_F_ANY_LAYOUT + VIRTIO_F_VERSION_1 feature bits"), vhost_scsi_send_bad_target() still assumes the response in a single descriptor. Similar issue in vhost_scsi_send_bad_t

[PATCH v2 07/10] vhost-scsi: log I/O queue write descriptors

2025-03-17 Thread Dongli Zhang
Log write descriptors for the I/O queue, leveraging vhost_scsi_get_desc() and vhost_get_vq_desc() to retrieve the array of write descriptors to obtain the log buffer. In addition, introduce a vhost-scsi specific function to log vring descriptors. In this function, the 'partial' argument is set to

[PATCH v2 05/10] vhost-scsi: adjust vhost_scsi_get_desc() to log vring descriptors

2025-03-17 Thread Dongli Zhang
Adjust vhost_scsi_get_desc() to facilitate logging of vring descriptors. Add new arguments to allow passing the log buffer and length to vhost_get_vq_desc(). In addition, reset 'log_num' since vhost_get_vq_desc() may reset it only after certain condition checks. Suggested-by: Joao Martins Signe

[PATCH net-next v24 02/23] ovpn: add basic netlink support

2025-03-17 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 v24 00/23] Introducing OpenVPN Data Channel Offload

2025-03-17 Thread Antonio Quartulli
Notable changes since v23: * dropped call to netif_tx_start/stop_all_queues() * dropped NETIF_F_HW_CSUM and NETIF_F_RXCSUM dev flags * dropped conditional call to skb_checksum_help() due to the point above * added call to dst_cache_reset() in nl_peer_modify() * dropped obsolete comment in ovpn_peer

[PATCH net-next v24 04/23] ovpn: keep carrier always on for MP interfaces

2025-03-17 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 v24 03/23] ovpn: add basic interface creation/destruction/management routines

2025-03-17 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 v24 14/23] ovpn: implement multi-peer support

2025-03-17 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 | 64 +-- drivers/net/ovpn/ovpnpriv.h | 1

[PATCH net-next v24 17/23] ovpn: add support for updating local or remote UDP endpoint

2025-03-17 Thread Antonio Quartulli
In case of UDP links, the local or remote 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/io.c | 8 ++ drivers/net/ovpn/peer.c | 213

[PATCH net-next v24 11/23] ovpn: implement TCP transport

2025-03-17 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 v24 18/23] ovpn: implement peer add/get/dump/delete via netlink

2025-03-17 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 | 678 - driver

[PATCH net-next v24 15/23] ovpn: implement peer lookup logic

2025-03-17 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 v1 1/2] net: pktgen: add strict buffer parsing index check

2025-03-17 Thread Peter Seiderer
Add strict buffer parsing index check to avoid the following Smatch warning: net/core/pktgen.c:877 get_imix_entries() warn: check that incremented offset 'i' is capped Checking the buffer index i after every get_user/i++ step and returning with error code immediately avoids the current indire

[PATCH net-next v1 2/2] selftest: net: update proc_net_pktgen (add more imix_weights test cases)

2025-03-17 Thread Peter Seiderer
Add more imix_weights test cases (for incomplete input). Signed-off-by: Peter Seiderer --- tools/testing/selftests/net/proc_net_pktgen.c | 44 +++ 1 file changed, 44 insertions(+) diff --git a/tools/testing/selftests/net/proc_net_pktgen.c b/tools/testing/selftests/net/proc_net_

Re: [PATCH PATCH 2/2] selftests: livepatch: test if ftrace can trace a livepatched function

2025-03-17 Thread Miroslav Benes
On Fri, 14 Mar 2025, Filipe Xavier wrote: > On 3/14/25 10:14 AM, Miroslav Benes wrote: > > > Hi, > > > >> +start_test "trace livepatched function and check that the live patch > >> remains in effect" > >> + > >> +FUNCTION_NAME="livepatch_cmdline_proc_show" > >> + > >> +load_lp $MOD_LIVEPATCH > >>

[PATCH v9 23/26] remoteproc: k3: Refactor of_get_memories() functions into common driver

2025-03-17 Thread Beleswar Padhi
The k3_r5_core_of_get_internal_memories() and k3_{/dsp/m4}_rproc_of_get_memories() functions initialize and assigns memory regions used by the remote processor. Refactor these implementations into ti_k3_common.c driver as k3_rproc_of_get_memories() and align R5, DSP and M4 drivers to use this commo

[PATCH v9 26/26] remoteproc: k3: Refactor release_tsp() functions into common driver

2025-03-17 Thread Beleswar Padhi
The k3_{r5/dsp/m4}_release_tsp() functions release the TI-SCI processor control of a remote processor, which is auto triggered upon device removal. Refactor these functions into ti_k3_common.c driver as k3_release_tsp() and align R5, DSP and M4 drivers to use this common function throughout. Signe

[PATCH v9 05/26] remoteproc: k3-m4: Use k3_rproc_mem_data structure for memory info

2025-03-17 Thread Beleswar Padhi
The ti_k3_m4_remoteproc.c driver previously hardcoded device memory region addresses and names. Change this to use the k3_rproc_mem_data structure to store memory information. This aligns with DSP and R5 drivers, and can be refactored out later. Signed-off-by: Beleswar Padhi --- drivers/remotepr

Re: [PATCH net-next v23 18/23] ovpn: implement peer add/get/dump/delete via netlink

2025-03-17 Thread Sabrina Dubroca
Hello, A few comments since it seems you'll have to send one more version (otherwise they could be fixed later). 2025-03-12, 21:54:27 +0100, Antonio Quartulli wrote: > diff --git a/drivers/net/ovpn/netlink.c b/drivers/net/ovpn/netlink.c > index > 8d267d4c82283d9b5f989478102086ce385195d5..407b5b9

Re: [RFC PATCH] mmc: sdhci-pxav3: set NEED_RSP_BUSY capability

2025-03-17 Thread Ulf Hansson
On Mon, 10 Mar 2025 at 15:11, Karel Balej wrote: > > Set the MMC_CAP_NEED_RSP_BUSY capability for the sdhci-pxav3 host to > prevent conversion of R1B responses to R1. Without this, the eMMC card > in the samsung,coreprimevelte smartphone using the Marvell PXA1908 SoC > with this mmc host doesn't p

Re: [PATCH v9 0/6] scanf: convert self-test to KUnit

2025-03-17 Thread Petr Mladek
On Fri 2025-03-14 16:50:43, Tamir Duberstein wrote: > On Fri, Mar 14, 2025 at 4:45 PM Kees Cook wrote: > > > > On Fri, Mar 14, 2025 at 02:29:40PM +0100, Petr Mladek wrote: > > > On Fri 2025-03-07 06:27:33, Tamir Duberstein wrote: > > > > This is one of just 3 remaining "Test Module" kselftests (th

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

2025-03-17 Thread Vlastimil Babka
On 3/14/25 18:10, Suren Baghdasaryan wrote: > On Tue, Mar 4, 2025 at 11:08 AM Liam R. Howlett > wrote: >> >> * Vlastimil Babka [250304 05:55]: >> > On 2/25/25 21:26, Suren Baghdasaryan wrote: >> > > On Mon, Feb 24, 2025 at 1:12 PM Suren Baghdasaryan >> > > wrote: >> > >> >> > >> > >> > >> > >

Re: [PATCH v1 18/19] Documentation/livepatch: Update documentation for state, callbacks, and shadow variables

2025-03-17 Thread Petr Mladek
Hi, I am sorry for the late reply. I have read the mail on Friday and then forgot to come back to it last Monday... On Fri 2025-03-07 10:50:42, Joe Lawrence wrote: > On 3/7/25 07:26, Petr Mladek wrote: > > On Thu 2025-03-06 17:54:41, Joe Lawrence wrote: > >> Finally, the patchset adds .is_shadow

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

2025-03-17 Thread Luca Weiss
On Wed Feb 26, 2025 at 3:47 PM CET, Bryan O'Donoghue wrote: > 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

[PATCH] selftests/bpf: Replace deprecated strncpy() with strscpy()

2025-03-17 Thread feng.wei8
From: FengWei strncpy() is deprecated for NUL-terminated destination buffers. Use strscpy() instead and remove the manual NUL-termination. Signed-off-by: FengWei --- tools/testing/selftests/bpf/test_verifier.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/testing/

[PATCH v9 09/26] remoteproc: k3: Refactor shared data structures

2025-03-17 Thread Beleswar Padhi
The TI K3 R5, DSP and M4 remoteproc drivers share the same data structure definitions. Refactor the shared data structures into a new common header file, 'ti_k3_common.h', and update the drivers to use the unified data structures. Signed-off-by: Beleswar Padhi --- drivers/remoteproc/ti_k3_common

[PATCH v9 10/26] remoteproc: k3: Refactor mailbox rx_callback functions into common driver

2025-03-17 Thread Beleswar Padhi
The mailbox .rx_callback implementations in TI K3 R5, DSP and M4 remoteproc drivers handle inbound mailbox messages in the same way. Introduce a common driver 'ti_k3_common.c' and refactor the implementations into a common function 'k3_rproc_mbox_callback'() in it. Signed-off-by: Beleswar Padhi -

[PATCH v9 11/26] remoteproc: k3: Refactor .kick rproc ops into common driver

2025-03-17 Thread Beleswar Padhi
The .kick rproc ops implementations in TI K3 R5, DSP and M4 remoteproc drivers sends a mailbox message to the remote processor in the same way. Refactor the implementations into a common function 'k3_rproc_kick()' in the ti_k3_common.c driver. Signed-off-by: Beleswar Padhi --- drivers/remoteproc

[PATCH v9 00/26] Refactor TI K3 R5, DSP and M4 Remoteproc Drivers

2025-03-17 Thread Beleswar Padhi
This series refactors a lot of functions & callbacks from ti_k3_dsp_remoteproc.c, ti_k3_r5_remoteproc.c and ti_k3_m4_remoteproc.c drivers. This is a consolidated and final series as part of the refactoring of K3 remoteproc drivers. Below is the breakdown: 1. PATCHES #1-#5 does the pre-cleanup and a

[PATCH v9 07/26] remoteproc: k3-dsp: Drop check performed in k3_dsp_rproc_{mbox_callback/kick}

2025-03-17 Thread Beleswar Padhi
From: Siddharth Vadapalli Commit ea1d6fb5b571 ("remoteproc: k3-dsp: Acquire mailbox handle during probe routine") introduced a check in the "k3_dsp_rproc_mbox_callback()" and "k3_dsp_rproc_kick()" callbacks, causing them to exit if the remote core's state is "RPROC_DETACHED". However, the "__rpro

[PATCH v9 06/26] remoteproc: k3-r5: Drop check performed in k3_r5_rproc_{mbox_callback/kick}

2025-03-17 Thread Beleswar Padhi
From: Siddharth Vadapalli Commit f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during probe routine") introduced a check in the "k3_r5_rproc_mbox_callback()" and "k3_r5_rproc_kick()" callbacks, causing them to exit if the remote core's state is "RPROC_DETACHED". However, the "__rproc_a

[PATCH v9 08/26] remoteproc: k3-r5: Refactor sequential core power up/down operations

2025-03-17 Thread Beleswar Padhi
The existing implementation of the waiting mechanism in "k3_r5_cluster_rproc_init()" waits for the "released_from_reset" flag to be set as part of the firmware boot process in "k3_r5_rproc_start()". The "k3_r5_cluster_rproc_init()" function is invoked in the probe routine which causes unexpected fa

[PATCH v9 12/26] remoteproc: k3: Refactor rproc_reset() implementation into common driver

2025-03-17 Thread Beleswar Padhi
The k3_dsp_rproc_reset() function erroneously asserts the local reset even for devices which do not support it. Even though it results in a no-operation, Update the logic to explicitly assert the local reset for devices that support it and only the global reset for those that do not. Further, refa

[PATCH v9 17/26] remoteproc: k3: Refactor .start rproc ops into common driver

2025-03-17 Thread Beleswar Padhi
The k3_dsp_rproc_start() function sets the boot address and releases the reset on the remote processor. Whereas, the k3_m4_rproc_start() function only needs to release the reset. Refactor the k3_m4_rproc_start() into ti_k3_common.c as k3_rproc_start() and align the DSP and M4 drivers to invoke this

[PATCH v9 15/26] remoteproc: k3: Refactor .prepare rproc ops into common driver

2025-03-17 Thread Beleswar Padhi
The ti_k3_dsp_remoteproc.c driver asserts the local reset in probe and releases the global reset in .prepare callback. Whereas, the ti_k3_m4_remoteproc.c driver does both operations in .prepare callback, which is more suitable as it ensures lreset is asserted for subsequent core start operations fr

[PATCH v9 22/26] remoteproc: k3: Refactor .da_to_va rproc ops into common driver

2025-03-17 Thread Beleswar Padhi
The .da_to_va rproc ops implementations in TI K3 R5, DSP and M4 remoteproc drivers return the Kernel virtual address for a corresponding rproc device address. Refactor the implementations into ti_k3_common.c driver as k3_rproc_da_to_va and align R5, DSP and M4 drivers to use this common function fo

[PATCH v9 24/26] remoteproc: k3: Refactor mem_release() functions into common driver

2025-03-17 Thread Beleswar Padhi
The k3_{r5/dsp}_mem_release() and k3_m4_rproc_dev_mem_release() functions release the reserved memory of the device, which get auto triggered upon device removal. Refactor these functions into ti_k3_common.c driver as k3_mem_release() and align R5, DSP and M4 drivers to use this common function thr

[PATCH v9 02/26] remoteproc: k3-r5: Refactor Data Structures to Align with DSP and M4

2025-03-17 Thread Beleswar Padhi
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 to k3_r5_rproc. Additionally, introduce a v

[PATCH v9 01/26] remoteproc: k3-r5: Re-order internal memory initialization function

2025-03-17 Thread Beleswar Padhi
The core's internal memory data structure will be refactored to be part of the k3_r5_rproc structure in a future commit. As a result, internal memory initialization will need to be performed inside k3_r5_cluster_rproc_init() after rproc_alloc(). Therefore, move the internal memory initialization f

[PATCH v9 04/26] remoteproc: k3-{m4/dsp}: Align internal rproc data structure with R5

2025-03-17 Thread Beleswar Padhi
Introduce a void pointer in the k3_{m4/dsp}_rproc internal data structure which can be used to point to any private data needed by the driver. Currently, the M4/DSP drivers do not have any private data, so the pointer can be left pointing to NULL. Additionally, add a pointer to the rproc struct wit

  1   2   >