[PATCH v2 5/5] arm64: dts: qcom: sm7225-fairphone-fp4: Enable USB audio offload support

2025-04-30 Thread Luca Weiss
Enable USB audio offloading which allows to play audio via a USB-C headset with lower power consumption and enabling some other features. This can be used like the following: $ amixer -c0 cset name='USB_RX Audio Mixer MultiMedia1' On $ aplay --device=plughw:0,0 test.wav Compared to regular p

[PATCH v2 1/5] ASoC: dt-bindings: qcom,q6afe: Document q6usb subnode

2025-04-30 Thread Luca Weiss
Document the subnode for Q6USB, used for USB audio offloading. Cc: Wesley Cheng Signed-off-by: Luca Weiss --- Documentation/devicetree/bindings/sound/qcom,q6afe.yaml | 13 + 1 file changed, 13 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.yaml b/Doc

[PATCH v2 4/5] arm64: dts: qcom: sm6350: Add q6usbdai node

2025-04-30 Thread Luca Weiss
Add a node for q6usb which handles USB audio offloading, allowing to play audio via a USB-C headset with lower power consumption and enabling some other features. We also need to set num-hc-interrupters for the dwc3 for the q6usb to be able to use its sideband interrupter. Reviewed-by: Dmitry Bar

[PATCH v2 3/5] ASoC: qcom: sm8250: Add Fairphone 4 soundcard compatible

2025-04-30 Thread Luca Weiss
Add a compatible for the SM7225-based Fairphone 4 which can use this machine driver. Reviewed-by: Dmitry Baryshkov Signed-off-by: Luca Weiss --- sound/soc/qcom/sm8250.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/qcom/sm8250.c b/sound/soc/qcom/sm8250.c index 43c93e24d77259f23

[PATCH v2 2/5] ASoC: dt-bindings: qcom,sm8250: Add Fairphone 4 sound card

2025-04-30 Thread Luca Weiss
Document the bindings for the sound card on Fairphone 4 which uses the older non-audioreach audio architecture. Acked-by: Krzysztof Kozlowski Signed-off-by: Luca Weiss --- Documentation/devicetree/bindings/sound/qcom,sm8250.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/

Re: [RFC net-next v1 1/2] udp: Introduce UDP_STOP_RCV option for UDP

2025-04-30 Thread Jiayuan Chen
2025/5/1 12:42, "Kuniyuki Iwashima" wrote: > > From: Jiayuan Chen > > Date: Thu, 1 May 2025 11:51:08 +0800 > > > > > For some services we are using "established-over-unconnected" model. > > > > > > > > ''' > > > > // create unconnected socket and 'listen()' > > > > srv_fd = socket(A

[PATCH] [next] selftests/ptrace: Fix spelling mistake "multible" -> "multiple"

2025-04-30 Thread Ankit Chauhan
Fix the spelling error from "multible" to "multiple". Signed-off-by: Ankit Chauhan --- tools/testing/selftests/ptrace/peeksiginfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ptrace/peeksiginfo.c b/tools/testing/selftests/ptrace/peeksiginfo.c ind

Re: [RFC net-next v1 1/2] udp: Introduce UDP_STOP_RCV option for UDP

2025-04-30 Thread Kuniyuki Iwashima
From: Jiayuan Chen Date: Thu, 1 May 2025 11:51:08 +0800 > For some services we are using "established-over-unconnected" model. > > ''' > // create unconnected socket and 'listen()' > srv_fd = socket(AF_INET, SOCK_DGRAM) > setsockopt(srv_fd, SO_REUSEPORT) > bind(srv_fd, SERVER_ADDR, SERVER_PORT)

[RFC net-next v1 2/2] selftests/net: Add udp UDP_STOP_RCV selftest

2025-04-30 Thread Jiayuan Chen
Add a new selftest, which uses UDP_STOP_RCV to make UDP simulate TCP's listen and accept. Signed-off-by: Jiayuan Chen --- tools/testing/selftests/net/.gitignore| 1 + tools/testing/selftests/net/Makefile | 1 + .../testing/selftests/net/test_udp_stop_rcv.c | 275

[RFC net-next v1 1/2] udp: Introduce UDP_STOP_RCV option for UDP

2025-04-30 Thread Jiayuan Chen
For some services we are using "established-over-unconnected" model. ''' // create unconnected socket and 'listen()' srv_fd = socket(AF_INET, SOCK_DGRAM) setsockopt(srv_fd, SO_REUSEPORT) bind(srv_fd, SERVER_ADDR, SERVER_PORT) // 'accept()' data, client_addr = recvmsg(srv_fd) // create a connecte

Re: [PATCH net-next v3] selftests/vsock: add initial vmtest.sh for vsock

2025-04-30 Thread Bobby Eshleman
PS. sorry for weird formatting, writing from the gmail web UI instead of mutt. Tried to limit line lengths manually. Looks weird after hitting "send"... lol. Best, Bobby On Wed, Apr 30, 2025 at 7:37 PM Bobby Eshleman wrote: > > On Wed, Apr 30, 2025 at 6:06 AM Stefano Garzarella > wrote: > > >

Re: [PATCH net-next v3] selftests/vsock: add initial vmtest.sh for vsock

2025-04-30 Thread Bobby Eshleman
On Wed, Apr 30, 2025 at 6:06 AM Stefano Garzarella wrote: > > On Mon, Apr 28, 2025 at 04:48:11PM -0700, Bobby Eshleman wrote: > >This commit introduces a new vmtest.sh runner for vsock. > > > >It uses virtme-ng/qemu to run tests in a VM. The tests validate G2H, > >H2G, and loopback. The testing to

[PATCH net-next v3] vhost/net: Defer TX queue re-enable until after sendmsg

2025-04-30 Thread Jon Kohler
In handle_tx_copy, TX batching processes packets below ~PAGE_SIZE and batches up to 64 messages before calling sock->sendmsg. Currently, when there are no more messages on the ring to dequeue, handle_tx_copy re-enables kicks on the ring *before* firing off the batch sendmsg. However, sock->sendmsg

Re: [PATCH] vhost/net: remove zerocopy support

2025-04-30 Thread Jon Kohler
> On Apr 16, 2025, at 6:15 AM, Eugenio Perez Martin wrote: > > !---| > CAUTION: External Email > > |---! > > On Tue, Apr 8, 2025 at 8:28 AM Jason Wang wrote: >> >

Re: [PATCH 6.1 000/167] 6.1.136-rc1 review

2025-04-30 Thread Nathan Chancellor
On Wed, Apr 30, 2025 at 12:58:13PM +0200, Greg Kroah-Hartman wrote: > On Wed, Apr 30, 2025 at 04:09:18PM +0530, Naresh Kamboju wrote: > > Regressions on x86_64 with defconfig builds with clang-nightly toolchain > > on the stable-rc 6.1.136-rc1. clang-nightly is always a moving target so for the sa

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

2025-04-30 Thread Alexey Makhalov
Hi Borislav, I see this patch didn't get a traction. Can you to merge this fix in x86 tree, please? Thanks, --Alexey On 3/17/25 5:40 PM, Alexey Makhalov wrote: Fix a typo in an email address. Cc: sta...@vger.kernel.org Reported-by: Konstantin Ryabitsev Closes: https://lore.kernel.org/all/20

[PATCH 3/4] gendwarfksyms: Add a kABI rule to override type strings

2025-04-30 Thread Sami Tolvanen
In rare situations where distributions must make significant changes to otherwise opaque data structures that have inadvertently been included in the published ABI, keeping symbol versions stable using the existing kABI macros can become tedious. For example, Android decided to switch to a newer i

[PATCH 2/4] gendwarfksyms: Add a kABI rule to override byte_size attributes

2025-04-30 Thread Sami Tolvanen
A data structure can be partially opaque to modules if its allocation is handled by the core kernel, and modules only need to access some of its members. In this situation, it's possible to append new members to the structure without breaking the ABI, as long as the layout for the original members

[PATCH 4/4] Documentation/kbuild: Add new gendwarfksyms kABI rules

2025-04-30 Thread Sami Tolvanen
Document byte_size and type_string kABI stability rules. Also fix the section numbers while we're at it. Signed-off-by: Sami Tolvanen --- Documentation/kbuild/gendwarfksyms.rst | 103 +++-- 1 file changed, 95 insertions(+), 8 deletions(-) diff --git a/Documentation/kbuild/ge

[PATCH 0/4] gendwarfksyms: Add more kABI rules

2025-04-30 Thread Sami Tolvanen
Hi, While looking deeper into the genksyms hacks that have been needed during Android's 5.10 and 5.15 GKI lifecycles so far, we found a few instances that are not covered by the existing gendwarfksyms kABI stability rules. The first case involved appending new members to a partially opaque data st

[PATCH 1/4] gendwarfksyms: Clean up kABI rule look-ups

2025-04-30 Thread Sami Tolvanen
Reduce code duplication by moving kABI rule look-ups to separate functions. Signed-off-by: Sami Tolvanen --- scripts/gendwarfksyms/kabi.c | 101 +++ 1 file changed, 44 insertions(+), 57 deletions(-) diff --git a/scripts/gendwarfksyms/kabi.c b/scripts/gendwarfksym

Re: [PATCH RESEND] selftests/seccomp: fix syscall_restart test for arm compat

2025-04-30 Thread Kees Cook
On Sun, 27 Apr 2025 09:40:58 +, Neill Kapron wrote: > The inconsistencies in the systcall ABI between arm and arm-compat can > can cause a failure in the syscall_restart test due to the logic > attempting to work around the differences. The 'machine' field for an > ARM64 device running in compa

Re: [RFC PATCH 39/39] KVM: guest_memfd: Dynamically split/reconstruct HugeTLB page

2025-04-30 Thread Ackerley Tng
Yan Zhao writes: > On Fri, Apr 25, 2025 at 03:45:20PM -0700, Ackerley Tng wrote: >> Yan Zhao writes: >> >> > On Thu, Apr 24, 2025 at 11:15:11AM -0700, Ackerley Tng wrote: >> >> Vishal Annapurve writes: >> >> >> >> > On Thu, Apr 24, 2025 at 1:15 AM Yan Zhao wrote: >> >> >> >> >> >> On Thu, Ap

Re: [PATCH v9 0/3] rust: extend `module!` macro with integer parameter support

2025-04-30 Thread Andreas Hindborg
"Petr Pavlu" writes: > On 3/21/25 10:17, Andreas Hindborg wrote: >> Extend the `module!` macro with support module parameters. Also add some >> string >> to integer parsing functions and updates `BStr` with a method to strip a >> string >> prefix. >> >> Based on code by Adam Bratschi-Kaye lifte

Re: [PATCH v3 00/32] kselftest harness and nolibc compatibility

2025-04-30 Thread Kees Cook
On Thu, Apr 24, 2025 at 02:06:34PM -0600, Shuah Khan wrote: > On 4/22/25 02:51, Willy Tarreau wrote: > > Hi Thomas, > > > > On Tue, Apr 22, 2025 at 10:48:28AM +0200, Thomas Weißschuh wrote: > > > Hi, > > > > > > On Fri, Apr 11, 2025 at 11:00:24AM +0200, Thomas Weißschuh wrote: > > > > Nolibc is u

Re: [GIT PULL] Modules fixes for v6.15-rc5

2025-04-30 Thread pr-tracker-bot
The pull request you sent on Wed, 30 Apr 2025 15:12:11 +0200: > git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git/ > tags/modules-6.15-rc5 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/3929527918ffa6a0e5c31004ed06d8d1032fc1cf Thank you! -- Deet-doot-

Re: [PATCH] remoteproc: imx_rproc: replace devm_clk_get() with devm_clk_get_optional()

2025-04-30 Thread Hiago De Franco
On Wed, Apr 30, 2025 at 02:08:35PM +0800, Peng Fan wrote: > On Mon, Apr 28, 2025 at 02:12:57PM -0300, Hiago De Franco wrote: > >On Sat, Apr 26, 2025 at 09:49:58PM +0800, Peng Fan wrote: > >> On Wed, Apr 23, 2025 at 04:21:56PM -0300, Hiago De Franco wrote: > >> >Hi Mathieu, > >> > > >> >On Wed, Apr

[PATCH] selftests/cpufreq: Fix cpufreq basic read and update testcases

2025-04-30 Thread Swapnil Sapkal
In cpufreq basic selftests, one of the testcases is to read all cpufreq sysfs files and print the values. This testcase assumes all the cpufreq sysfs files have read permissions. However certain cpufreq sysfs files (eg. stats/reset) are write only files and this testcase errors out when it is not a

Re: [PATCH] rcu/nocb: Add Safe checks for access offloaded rdp

2025-04-30 Thread Joel Fernandes
On 4/30/2025 10:57 AM, Z qiang wrote: >> >> >> >> On 4/28/2025 6:59 AM, Z qiang wrote: Le Mon, Apr 28, 2025 at 05:54:03PM +0800, Zqiang a écrit : > For Preempt-RT kernel, when enable CONFIG_PROVE_RCU Kconfig, > disable local bh in rcuc kthreads will not affect preempt_count(),

Re: [PATCH v1 2/3] selftests: pidfd: add missing sys/ioctl.h include in pidfd_setns_test.c

2025-04-30 Thread T.J. Mercier
On Wed, Jan 15, 2025 at 2:53 AM Peter Seiderer wrote: > > Fix compile on openSUSE Tumbleweed (gcc-14.2.1, glibc-2.40): > - add missing sys/ioctl.h include > > Fixes: > > pidfd_setns_test.c: In function ‘current_nsset_setup’: > pidfd_setns_test.c:172:54: error: implicit declaration of functio

Re: [PATCH v1 1/3] selftests: pidfd: add missing sys/mount.h include in pidfd_fdinfo_test.c

2025-04-30 Thread T.J. Mercier
On Wed, Jan 15, 2025 at 2:52 AM Peter Seiderer wrote: > > Fix compile on openSUSE Tumbleweed (gcc-14.2.1, glibc-2.40): > - add missing sys/mount.h include > > Fixes: > > pidfd_fdinfo_test.c: In function ‘child_fdinfo_nspid_test’: > pidfd_fdinfo_test.c:230:13: error: implicit declaration of f

Re: [PATCH 6.1 000/167] 6.1.136-rc1 review

2025-04-30 Thread Matthew Rosato
> 2) > Regressions on s390 with defconfig builds with gcc-13, gcc-8 and > clang-20 and clang-nightly toolchains on the stable-rc 6.1.136-rc1. > > * s390, build > - clang-20-defconfig > - clang-nightly-defconfig > - gcc-13-allmodconfig > - gcc-13-defconfig > - gcc-8-defconfig-fe40093d >

Re: [PATCH v3 2/2] x86/sgx: Implement EUPDATESVN and opportunistically call it during first EPC page alloc

2025-04-30 Thread Jarkko Sakkinen
On Wed, Apr 30, 2025 at 06:53:32AM +, Reshetova, Elena wrote: > 2. Switch to Sean's approach to execute EUPDATESVN during the sgx_open(). > Btw, Sean do you agree that we don't gain much doing it second time during > release() given the microcode flow? > I would rather leave only one invocation

Re: [RESEND PATCH] rpmsg: Use strscpy() instead of strscpy_pad()

2025-04-30 Thread Mathieu Poirier
On Tue, 29 Apr 2025 at 04:46, Thorsten Blum wrote: > > kzalloc() already zero-initializes the destination buffer, making > strscpy() sufficient for safely copying the name. The additional NUL- > padding performed by strscpy_pad() is unnecessary. > > The size parameter is optional, and strscpy() au

Re: [PATCH] rcu/nocb: Add Safe checks for access offloaded rdp

2025-04-30 Thread Z qiang
> > > > On 4/28/2025 6:59 AM, Z qiang wrote: > >> > >> Le Mon, Apr 28, 2025 at 05:54:03PM +0800, Zqiang a écrit : > >>> For Preempt-RT kernel, when enable CONFIG_PROVE_RCU Kconfig, > >>> disable local bh in rcuc kthreads will not affect preempt_count(), > >>> this resulted in the following splat: >

[PATCH] kselftest: cpufreq: Get rid of double suspend in rtcwake case

2025-04-30 Thread Nícolas F . R . A . Prado
Commit 0b631ed3ce92 ("kselftest: cpufreq: Add RTC wakeup alarm") added support for automatic wakeup in the suspend routine of the cpufreq kselftest by using rtcwake, however it left the manual power state change in the common path. The end result is that when running the cpufreq kselftest with '-t

Re: [PATCH] rcu/nocb: Add Safe checks for access offloaded rdp

2025-04-30 Thread Z qiang
> > > > > Le Mon, Apr 28, 2025 at 05:54:03PM +0800, Zqiang a écrit : > > > For Preempt-RT kernel, when enable CONFIG_PROVE_RCU Kconfig, > > > disable local bh in rcuc kthreads will not affect preempt_count(), > > > this resulted in the following splat: > > > > > > WARNING: suspicious RCU usage > >

Re: [PATCH net-next v3 3/4] vsock: Move lingering logic to af_vsock core

2025-04-30 Thread Stefano Garzarella
On Wed, Apr 30, 2025 at 01:11:48PM +0200, Michal Luczaj wrote: On 4/30/25 12:37, Stefano Garzarella wrote: On Wed, 30 Apr 2025 at 12:33, Michal Luczaj wrote: On 4/30/25 11:36, Stefano Garzarella wrote: On Wed, Apr 30, 2025 at 11:10:29AM +0200, Michal Luczaj wrote: Lingering should be transp

[GIT PULL] Modules fixes for v6.15-rc5

2025-04-30 Thread Petr Pavlu
The following changes since commit 8ffd015db85fea3e15a77027fda6c02ced4d2444: Linux 6.15-rc2 (2025-04-13 11:54:49 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/modules/linux.git/ tags/modules-6.15-rc5 for you to fetch changes up to f95bbfe18512

Re: [PATCH net-next v3] selftests/vsock: add initial vmtest.sh for vsock

2025-04-30 Thread Stefano Garzarella
On Mon, Apr 28, 2025 at 04:48:11PM -0700, Bobby Eshleman wrote: This commit introduces a new vmtest.sh runner for vsock. It uses virtme-ng/qemu to run tests in a VM. The tests validate G2H, H2G, and loopback. The testing tools from tools/testing/vsock/ are reused. Currently, only vsock_test is u

Re: [PATCH 6.1 000/167] 6.1.136-rc1 review

2025-04-30 Thread Greg Kroah-Hartman
On Wed, Apr 30, 2025 at 04:09:18PM +0530, Naresh Kamboju wrote: > On Tue, 29 Apr 2025 at 23:31, Greg Kroah-Hartman > wrote: > > > > This is the start of the stable review cycle for the 6.1.136 release. > > There are 167 patches in this series, all will be posted as a response > > to this one. If

Re: [PATCH net-next v3 3/4] vsock: Move lingering logic to af_vsock core

2025-04-30 Thread Michal Luczaj
On 4/30/25 12:37, Stefano Garzarella wrote: > On Wed, 30 Apr 2025 at 12:33, Michal Luczaj wrote: >> >> On 4/30/25 11:36, Stefano Garzarella wrote: >>> On Wed, Apr 30, 2025 at 11:10:29AM +0200, Michal Luczaj wrote: Lingering should be transport-independent in the long run. In preparation

Re: [PATCH 6.1 000/167] 6.1.136-rc1 review

2025-04-30 Thread Dan Carpenter
All the clang-nightly issues seem like bugs in clang. I would say only the build error on S390 is a kernel issue. regards, dan carpenter On Wed, Apr 30, 2025 at 04:09:18PM +0530, Naresh Kamboju wrote: > On Tue, 29 Apr 2025 at 23:31, Greg Kroah-Hartman > wrote: > > > > This is the start of the s

Re: [PATCH 6.1 000/167] 6.1.136-rc1 review

2025-04-30 Thread Naresh Kamboju
On Tue, 29 Apr 2025 at 23:31, Greg Kroah-Hartman wrote: > > This is the start of the stable review cycle for the 6.1.136 release. > There are 167 patches in this series, all will be posted as a response > to this one. If anyone has any issues with these being applied, please > let me know. > > Re

Re: [PATCH net-next v3 3/4] vsock: Move lingering logic to af_vsock core

2025-04-30 Thread Stefano Garzarella
On Wed, 30 Apr 2025 at 12:30, Michal Luczaj wrote: > > On 4/30/25 11:33, Stefano Garzarella wrote: > > On Wed, Apr 30, 2025 at 11:10:29AM +0200, Michal Luczaj wrote: > >> Lingering should be transport-independent in the long run. In preparation > >> for supporting other transports, as well the lin

Re: [PATCH net-next v3 3/4] vsock: Move lingering logic to af_vsock core

2025-04-30 Thread Michal Luczaj
On 4/30/25 11:36, Stefano Garzarella wrote: > On Wed, Apr 30, 2025 at 11:10:29AM +0200, Michal Luczaj wrote: >> Lingering should be transport-independent in the long run. In preparation >> for supporting other transports, as well the linger on shutdown(), move >> code to core. >> >> Guard against a

Re: [PATCH net-next v3 3/4] vsock: Move lingering logic to af_vsock core

2025-04-30 Thread Stefano Garzarella
On Wed, 30 Apr 2025 at 12:33, Michal Luczaj wrote: > > On 4/30/25 11:36, Stefano Garzarella wrote: > > On Wed, Apr 30, 2025 at 11:10:29AM +0200, Michal Luczaj wrote: > >> Lingering should be transport-independent in the long run. In preparation > >> for supporting other transports, as well the lin

Re: [PATCH net-next v3 2/4] vsock/virtio: Reduce indentation in virtio_transport_wait_close()

2025-04-30 Thread Stefano Garzarella
On Wed, 30 Apr 2025 at 12:30, Michal Luczaj wrote: > > On 4/30/25 11:28, Stefano Garzarella wrote: > > On Wed, Apr 30, 2025 at 11:10:28AM +0200, Michal Luczaj wrote: > >> Flatten the function. Remove the nested block by inverting the condition: > >> return early on !timeout. > > > > IIUC we are re

Re: [PATCH net-next v3 3/4] vsock: Move lingering logic to af_vsock core

2025-04-30 Thread Michal Luczaj
On 4/30/25 11:33, Stefano Garzarella wrote: > On Wed, Apr 30, 2025 at 11:10:29AM +0200, Michal Luczaj wrote: >> Lingering should be transport-independent in the long run. In preparation >> for supporting other transports, as well the linger on shutdown(), move >> code to core. >> >> Guard against a

Re: [PATCH net-next v3 2/4] vsock/virtio: Reduce indentation in virtio_transport_wait_close()

2025-04-30 Thread Michal Luczaj
On 4/30/25 11:28, Stefano Garzarella wrote: > On Wed, Apr 30, 2025 at 11:10:28AM +0200, Michal Luczaj wrote: >> Flatten the function. Remove the nested block by inverting the condition: >> return early on !timeout. > > IIUC we are removing this function in the next commit, so we can skip > this p

Re: [PATCH net-next v3 1/4] vsock/virtio: Linger on unsent data

2025-04-30 Thread Michal Luczaj
On 4/30/25 11:26, Stefano Garzarella wrote: > On Wed, Apr 30, 2025 at 11:10:27AM +0200, Michal Luczaj wrote: >> Currently vsock's lingering effectively boils down to waiting (or timing >> out) until packets are consumed or dropped by the peer; be it by receiving >> the data, closing or shutting dow

Re: [PATCH net-next v3 3/4] vsock: Move lingering logic to af_vsock core

2025-04-30 Thread Stefano Garzarella
On Wed, Apr 30, 2025 at 11:10:29AM +0200, Michal Luczaj wrote: Lingering should be transport-independent in the long run. In preparation for supporting other transports, as well the linger on shutdown(), move code to core. Guard against an unimplemented vsock_transport::unsent_bytes() callback.

Re: [PATCH net-next v3 3/4] vsock: Move lingering logic to af_vsock core

2025-04-30 Thread Stefano Garzarella
On Wed, Apr 30, 2025 at 11:10:29AM +0200, Michal Luczaj wrote: Lingering should be transport-independent in the long run. In preparation for supporting other transports, as well the linger on shutdown(), move code to core. Guard against an unimplemented vsock_transport::unsent_bytes() callback.

Re: [PATCH net-next v3 2/4] vsock/virtio: Reduce indentation in virtio_transport_wait_close()

2025-04-30 Thread Stefano Garzarella
On Wed, Apr 30, 2025 at 11:10:28AM +0200, Michal Luczaj wrote: Flatten the function. Remove the nested block by inverting the condition: return early on !timeout. IIUC we are removing this function in the next commit, so we can skip this patch IMO. I suggested this change, if we didn't move th

Re: [PATCH v9 4/4] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-04-30 Thread Michael S. Tsirkin
On Wed, Apr 30, 2025 at 11:34:49AM +0800, Jason Wang wrote: > On Tue, Apr 29, 2025 at 6:56 PM Michael S. Tsirkin wrote: > > > > On Tue, Apr 29, 2025 at 11:39:37AM +0800, Jason Wang wrote: > > > On Mon, Apr 21, 2025 at 11:46 AM Jason Wang wrote: > > > > > > > > On Mon, Apr 21, 2025 at 11:45 AM Jas

Re: [PATCH net-next v3 1/4] vsock/virtio: Linger on unsent data

2025-04-30 Thread Stefano Garzarella
On Wed, Apr 30, 2025 at 11:10:27AM +0200, Michal Luczaj wrote: Currently vsock's lingering effectively boils down to waiting (or timing out) until packets are consumed or dropped by the peer; be it by receiving the data, closing or shutting down the connection. To align with the semantics descri

[PATCH v3 1/2] remoteproc: cleanup acquired resources when rproc_handle_resources() fails in rproc_attach()

2025-04-30 Thread Xiaolei Wang
When rproc->state = RPROC_DETACHED and rproc_attach() is used to attach to the remote processor, if rproc_handle_resources() returns a failure, the resources allocated by imx_rproc_prepare() should be released, otherwise the following memory leak will occur. Since almost the same thing is done in

[PATCH v3 0/2] Fix two memory leaks in rproc_attach()

2025-04-30 Thread Xiaolei Wang
In the rproc_attach() function, if rproc_handle_resources() returns failure, the resources requested in imx_rproc_prepare() should be released, since almost the same thing is done in imx_rproc_prepare() and rproc_resource_cleanup(), Function rproc_resource_cleanup() is able to deal with empty lists

[PATCH v3 2/2] remoteproc: core: release rproc->clean_table after rproc_attach() fails

2025-04-30 Thread Xiaolei Wang
When rproc->state = RPROC_DETACHED is attached to remote processor through rproc_attach(), if rproc_handle_resources() returns failure, then the clean table should be released, otherwise the following memory leak will occur. unreferenced object 0x86a99800 (size 1024): comm "kworker/u12:3",

Re: [PATCH net-next v2 1/3] vsock: Linger on unsent data

2025-04-30 Thread Michal Luczaj
ies if you prefer), so my idea is the following split: > - use unsent_bytes() just in virtio > - move linger support in af_vsock.c (depending on transports >implementing unsent_bytes()) > - implement unsent_bytes() in other transports (in the future) > > WDYT? Sure, makes sense

[PATCH net-next v3 2/4] vsock/virtio: Reduce indentation in virtio_transport_wait_close()

2025-04-30 Thread Michal Luczaj
Flatten the function. Remove the nested block by inverting the condition: return early on !timeout. No functional change intended. Suggested-by: Stefano Garzarella Signed-off-by: Michal Luczaj --- net/vmw_vsock/virtio_transport_common.c | 26 +- 1 file changed, 13 inser

[PATCH net-next v3 0/4] vsock: SOCK_LINGER rework

2025-04-30 Thread Michal Luczaj
Change vsock's lingerning to wait on close() until all data is sent, i.e. until workers picked all the packets for processing. Changes in v3: - Set "vsock/virtio" topic where appropriate - Do not claim that Hyper-V and VMCI ever lingered [Stefano] - Move lingering to af_vsock core [Stefano] - Lin

[PATCH net-next v3 1/4] vsock/virtio: Linger on unsent data

2025-04-30 Thread Michal Luczaj
Currently vsock's lingering effectively boils down to waiting (or timing out) until packets are consumed or dropped by the peer; be it by receiving the data, closing or shutting down the connection. To align with the semantics described in the SO_LINGER section of man socket(7) and to mimic AF_INE

[PATCH net-next v3 3/4] vsock: Move lingering logic to af_vsock core

2025-04-30 Thread Michal Luczaj
Lingering should be transport-independent in the long run. In preparation for supporting other transports, as well the linger on shutdown(), move code to core. Guard against an unimplemented vsock_transport::unsent_bytes() callback. Suggested-by: Stefano Garzarella Signed-off-by: Michal Luczaj

[PATCH net-next v3 4/4] vsock/test: Expand linger test to ensure close() does not misbehave

2025-04-30 Thread Michal Luczaj
There was an issue with SO_LINGER: instead of blocking until all queued messages for the socket have been successfully sent (or the linger timeout has been reached), close() would block until packets were handled by the peer. Add a check to alert on close() lingering when it should not. Signed-of

Re: [PATCH AUTOSEL 6.6 13/21] vhost_task: fix vhost_task_create() documentation

2025-04-30 Thread Stefano Garzarella
On Tue, Apr 29, 2025 at 07:52:25PM -0400, Sasha Levin wrote: From: Stefano Garzarella [ Upstream commit fec0abf52609c20279243699d08b660c142ce0aa ] Commit cb380909ae3b ("vhost: return task creation error instead of NULL") changed the return value of vhost_task_create(), but did not update the d

[PATCH v3 3/3] KVM: riscv: selftests: Add vector extension tests

2025-04-30 Thread Atish Patra
Add vector related tests with the ISA extension standard template. However, the vector registers are bit tricky as the register length is variable based on vlenb value of the system. That's why the macros are defined with a default and overidden with actual value at runtime. Reviewed-by: Anup Pate

[PATCH v3 0/3] RISC-V KVM selftests improvements

2025-04-30 Thread Atish Patra
This series improves the following tests. 1. Get-reg-list : Adds vector support 2. SBI PMU test : Distinguish between different types of illegal exception The first patch is just helper patch that adds stval support during exception handling. Signed-off-by: Atish Patra --- Changes in v3: - Dropp

[PATCH v3 1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs

2025-04-30 Thread Atish Patra
The current exeception register structure in selftests are missing few registers (e.g stval). Instead of adding it manually, change the ex_regs to align with pt_regs to make it future proof. Suggested-by: Andrew Jones Reviewed-by: Andrew Jones Signed-off-by: Atish Patra --- .../selftests/kvm/i

[PATCH v3 2/3] KVM: riscv: selftests: Decode stval to identify exact exception type

2025-04-30 Thread Atish Patra
Currently, the sbi_pmu_test continues if the exception type is illegal instruction because access to hpmcounter will generate that. However illegal instruction exception may occur due to the other reasons which should result in test assertion. Use the stval to decode the exact type of instructions

Re: [PATCH v2 06/19] iommufd/viommu: Add IOMMU_VIOMMU_SET/UNSET_VDEV_ID ioctl

2025-04-30 Thread Nicolin Chen
On Wed, Apr 30, 2025 at 05:54:53PM +1000, Alexey Kardashevskiy wrote: > On 4/10/24 21:41, Jason Gunthorpe wrote: > > On Fri, Oct 04, 2024 at 02:32:28PM +1000, Alexey Kardashevskiy wrote: > > > > > > + __u32 __reserved; > > > > + __aligned_u64 vdev_id; > > I believe this ended up being

Re: [PATCH v2 06/19] iommufd/viommu: Add IOMMU_VIOMMU_SET/UNSET_VDEV_ID ioctl

2025-04-30 Thread Alexey Kardashevskiy
On 4/10/24 21:41, Jason Gunthorpe wrote: On Fri, Oct 04, 2024 at 02:32:28PM +1000, Alexey Kardashevskiy wrote: + __u32 __reserved; + __aligned_u64 vdev_id; I believe this ended up being "virt_id"... What is the nature of this id? It should be the vIOMMU's HW representation

Re: [PATCH v2 3/3] KVM: riscv: selftests: Add vector extension tests

2025-04-30 Thread Atish Patra
On 4/30/25 12:17 AM, Andrew Jones wrote: On Tue, Apr 29, 2025 at 05:18:47PM -0700, Atish Patra wrote: Add vector related tests with the ISA extension standard template. However, the vector registers are bit tricky as the register length is variable based on vlenb value of the system. That's wh

Re: [PATCH v2 2/3] KVM: riscv: selftests: Decode stval to identify exact exception type

2025-04-30 Thread Atish Patra
On 4/30/25 12:09 AM, Andrew Jones wrote: On Tue, Apr 29, 2025 at 05:18:46PM -0700, Atish Patra wrote: Currently, the sbi_pmu_test continues if the exception type is illegal instruction because access to hpmcounter will generate that. However illegal instruction exception may occur due to the o

Re: [PATCH v2 1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs

2025-04-30 Thread Atish Patra
On 4/30/25 12:05 AM, Andrew Jones wrote: On Tue, Apr 29, 2025 at 05:18:45PM -0700, Atish Patra wrote: The current exeception register structure in selftests are missing few registers (e.g stval). Instead of adding it manually, change the ex_regs to align with pt_regs to make it future proof.

Re: [PATCH v2 3/3] KVM: riscv: selftests: Add vector extension tests

2025-04-30 Thread Andrew Jones
On Tue, Apr 29, 2025 at 05:18:47PM -0700, Atish Patra wrote: > Add vector related tests with the ISA extension standard template. > However, the vector registers are bit tricky as the register length is > variable based on vlenb value of the system. That's why the macros are > defined with a defaul

Re: [PATCH v2 2/3] KVM: riscv: selftests: Decode stval to identify exact exception type

2025-04-30 Thread Andrew Jones
On Tue, Apr 29, 2025 at 05:18:46PM -0700, Atish Patra wrote: > Currently, the sbi_pmu_test continues if the exception type is illegal > instruction because access to hpmcounter will generate that. However > illegal instruction exception may occur due to the other reasons > which should result in te

Re: [PATCH v2 1/3] KVM: riscv: selftests: Align the trap information wiht pt_regs

2025-04-30 Thread Andrew Jones
On Tue, Apr 29, 2025 at 05:18:45PM -0700, Atish Patra wrote: > The current exeception register structure in selftests are missing > few registers (e.g stval). Instead of adding it manually, change > the ex_regs to align with pt_regs to make it future proof. > > Suggested-by: Andrew Jones > Signed