[PATCH v2 32/32] HACK: selftests/nolibc: demonstrate usage of the kselftest harness

2025-04-07 Thread Thomas Weißschuh
Show how to use the kselftest harness together with nolibc. This just runs the existing harness selftest by crudely replacing the regular nolibc-test.c with the harness-selftest.c to get that wired up easily. To use it: $ cd tools/testing/selftests/nolibc/ $ ./run-tests -m user In

[PATCH v2 30/32] selftests/nolibc: add test for snprintf() truncation

2025-04-07 Thread Thomas Weißschuh
Now that we have a proper snprintf() implementation, make sure truncation is handled properly. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau --- tools/testing/selftests/nolibc/nolibc-test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/

[PATCH v17 08/15] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-04-07 Thread Frank Li
Some MSI controller change address/data pair when irq_set_affinity(). Current PCI endpoint can't support this type MSI controller. So add flag MSI_FLAG_MUTABLE in include/linux/msi.h and check it when allocate doorbell. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 t

Re: [PATCH] kbuild: Require pahole >v1.29 with GENDWARFKSYMS and BTF on X86

2025-04-07 Thread Sami Tolvanen
Hi Masahiro, On Sun, Apr 6, 2025 at 1:21 PM Masahiro Yamada wrote: > > On Fri, Mar 21, 2025 at 8:28 AM Sami Tolvanen wrote: > > > > With CONFIG_GENDWARFKSYMS, __gendwarfksyms_ptr variables are added > > to the kernel in EXPORT_SYMBOL() to ensure DWARF type information > > is available for export

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

2025-04-07 Thread Jon Kohler
> On Apr 6, 2025, at 7:14 PM, Jason Wang wrote: > > !---| > CAUTION: External Email > > |---! > > On Fri, Apr 4, 2025 at 10:24 PM Jon Kohler wrote: >> >> Commit 0

Re: [PATCH] selftest/mm: Make hugetlb_reparenting_test tolerant to async reparenting

2025-04-07 Thread Donet Tom
On 4/7/25 2:12 PM, Li Wang wrote: In cgroup v2, memory and hugetlb usage reparenting is asynchronous. This can cause test flakiness when immediately asserting usage after deleting a child cgroup. To address this, add a helper function `assert_with_retry()` that checks usage values with a timeou

Re: [PATCH] selftests: mptcp: add comment for getaddrinfo

2025-04-07 Thread Geliang Tang
Hi zhenwei, On Mon, 2025-04-07 at 16:51 +0800, zhenwei pi wrote: > mptcp_connect.c is a startup tutorial of MPTCP programming, however > there is a lack of ai_protocol(IPPROTO_MPTCP) usage. Add comment for > getaddrinfo MPTCP support. > > Signed-off-by: zhenwei pi > Signed-off-by: zhenwei pi >

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 08:47:05PM +0200, David Hildenbrand wrote: > > In my opinion, it makes the most sense to keep the spec as it is and > > change QEMU and the kernel to match, but obviously that's not trivial > > to do in a way that doesn't break existing devices and drivers. > > If only it w

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

2025-04-07 Thread Huang, Kai
On Mon, 2025-04-07 at 08:23 +, Reshetova, Elena wrote: > > On Fri, Apr 04, 2025 at 06:53:17AM +, Reshetova, Elena wrote: > > > > On Wed, Apr 02, 2025 at 01:11:25PM +, Reshetova, Elena wrote: > > > > > > > current SGX kernel code does not handle such errors in any other > > way > > > > >

[PATCH AUTOSEL 6.14 11/31] sound/virtio: Fix cancel_sync warnings on uninitialized work_structs

2025-04-07 Thread Sasha Levin
From: John Stultz [ Upstream commit 3c7df2e27346eb40a0e86230db1ccab195c97cfe ] Betty reported hitting the following warning: [8.709131][ T221] WARNING: CPU: 2 PID: 221 at kernel/workqueue.c:4182 ... [8.713282][ T221] Call trace: [8.713365][ T221] __flush_work+0x8d0/0x914 [8.

Re: [PATCH] kbuild: Require pahole >v1.29 with GENDWARFKSYMS and BTF on X86

2025-04-07 Thread Sam James
Alan Maguire writes: > On 07/04/2025 09:25, Sam James wrote: >> [with regard to >> https://lore.kernel.org/linux-kbuild/20250320232757.2283956-2-samitolva...@google.com/] >> >> Would it be possible to have a new release with that fix, to avoid >> distros all having to cherrypick the fix commit?

Re: Re: [PATCH] selftests: mptcp: add comment for getaddrinfo

2025-04-07 Thread zhenwei pi
On 4/8/25 09:43, Geliang Tang wrote: Hi zhenwei, On Mon, 2025-04-07 at 16:51 +0800, zhenwei pi wrote: mptcp_connect.c is a startup tutorial of MPTCP programming, however there is a lack of ai_protocol(IPPROTO_MPTCP) usage. Add comment for getaddrinfo MPTCP support. Signed-off-by: zhenwei pi

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

2025-04-07 Thread Jarkko Sakkinen
On Tue, Apr 08, 2025 at 12:06:32AM +, Huang, Kai wrote: > On Mon, 2025-04-07 at 08:23 +, Reshetova, Elena wrote: > > > On Fri, Apr 04, 2025 at 06:53:17AM +, Reshetova, Elena wrote: > > > > > On Wed, Apr 02, 2025 at 01:11:25PM +, Reshetova, Elena wrote: > > > > > > > > current SGX ke

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

2025-04-07 Thread Jarkko Sakkinen
On Tue, Apr 08, 2025 at 09:40:14AM +0300, Jarkko Sakkinen wrote: > On Tue, Apr 08, 2025 at 12:06:32AM +, Huang, Kai wrote: > > On Mon, 2025-04-07 at 08:23 +, Reshetova, Elena wrote: > > > > On Fri, Apr 04, 2025 at 06:53:17AM +, Reshetova, Elena wrote: > > > > > > On Wed, Apr 02, 2025 at

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

2025-04-07 Thread Reshetova, Elena
> > On Tue, Apr 08, 2025 at 09:40:14AM +0300, Jarkko Sakkinen wrote: > > On Tue, Apr 08, 2025 at 12:06:32AM +, Huang, Kai wrote: > > > On Mon, 2025-04-07 at 08:23 +, Reshetova, Elena wrote: > > > > > On Fri, Apr 04, 2025 at 06:53:17AM +, Reshetova, Elena wrote: > > > > > > > On Wed, Ap

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

2025-04-07 Thread Thorsten Blum
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() automatically determines the size of the destination buffer using

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread David Hildenbrand
On 07.04.25 10:44, Michael S. Tsirkin wrote: Wow great job digging through all these hypervisors! There is more ... :( aloith: https://github.com/google/alioth/blob/main/alioth/src/virtio/dev/balloon.rs It uses the incremental vq index assignment like QEMU. impl VirtioMio for Balloon {

Re: [PATCH 3/3] arm64: dts: qcom: sdm632-fairphone-fp3: Add AW8898 amplifier

2025-04-07 Thread Konrad Dybcio
On 4/6/25 3:03 PM, Luca Weiss wrote: > Add a node for the amplifier found on Fairphone 3, receiving sound via > I2S from the SoC and being connected to the speaker. > > Signed-off-by: Luca Weiss > --- Reviewed-by: Konrad Dybcio Konrad

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread David Hildenbrand
On 07.04.25 10:17, David Hildenbrand wrote: On 07.04.25 09:52, Michael S. Tsirkin wrote: On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: Not perfect, but AFAIKS, not horrible. It is like it is. QEMU does queue exist if the corresponding feature is offered by the device, and that

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 09:18:21AM +0200, David Hildenbrand wrote: > > Now I am beginning to think we should leave the spec alone > > and fix the drivers ... Ugh > > We could always say that starting with feature X, queue indexes are fixed > again. E.g., VIRTIO_BALLOON_F_X would have it's vir

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread David Hildenbrand
On 07.04.25 10:58, Michael S. Tsirkin wrote: On Mon, Apr 07, 2025 at 10:54:00AM +0200, David Hildenbrand wrote: On 07.04.25 10:49, Michael S. Tsirkin wrote: On Mon, Apr 07, 2025 at 10:44:21AM +0200, David Hildenbrand wrote: Whoever adds new feat_X *must be aware* about all previous feature

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread David Hildenbrand
On 07.04.25 10:34, Michael S. Tsirkin wrote: On Mon, Apr 07, 2025 at 10:17:10AM +0200, David Hildenbrand wrote: On 07.04.25 09:52, Michael S. Tsirkin wrote: On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: Not perfect, but AFAIKS, not horrible. It is like it is. QEMU does queue

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 11:11:34AM +0200, David Hildenbrand wrote: > On 07.04.25 10:58, Michael S. Tsirkin wrote: > > On Mon, Apr 07, 2025 at 10:54:00AM +0200, David Hildenbrand wrote: > > > On 07.04.25 10:49, Michael S. Tsirkin wrote: > > > > On Mon, Apr 07, 2025 at 10:44:21AM +0200, David Hildenb

[PATCH v2 31/32] tools/nolibc: implement width padding in printf()

2025-04-07 Thread Thomas Weißschuh
printf can pad each argument to a certain width. Implement this for compatibility with the kselftest harness. Currently only padding with spaces is supported. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau --- tools/include/nolibc/stdio.h | 17 - tools/t

Re: [PATCH v3 0/6] KVM: guest_memfd: support for uffd minor

2025-04-07 Thread Liam R. Howlett
* Nikita Kalyazin [250407 07:04]: > > > On 04/04/2025 18:12, Liam R. Howlett wrote: > > +To authors of v7 series referenced in [1] > > > > * Nikita Kalyazin [250404 11:44]: > > > This series is built on top of the Fuad's v7 "mapping guest_memfd backed > > > memory at the host" [1]. > > > > I

Re: [PATCH v3 0/6] KVM: guest_memfd: support for uffd minor

2025-04-07 Thread Nikita Kalyazin
On 07/04/2025 14:40, Liam R. Howlett wrote: * Nikita Kalyazin [250407 07:04]: On 04/04/2025 18:12, Liam R. Howlett wrote: +To authors of v7 series referenced in [1] * Nikita Kalyazin [250404 11:44]: This series is built on top of the Fuad's v7 "mapping guest_memfd backed memory at the

Re: [PATCH v3 0/6] KVM: guest_memfd: support for uffd minor

2025-04-07 Thread Nikita Kalyazin
On 04/04/2025 18:12, Liam R. Howlett wrote: +To authors of v7 series referenced in [1] * Nikita Kalyazin [250404 11:44]: This series is built on top of the Fuad's v7 "mapping guest_memfd backed memory at the host" [1]. I didn't see their addresses in the to/cc, so I added them to my respo

Re: [PATCH v3] remoteproc: imx_dsp_rproc: Add support for DSP-specific features

2025-04-07 Thread Iuliana Prodan
Hi Frank, On 4/3/2025 10:12 PM, Frank Li wrote: On Thu, Apr 03, 2025 at 01:01:24PM +0300, Iuliana Prodan (OSS) wrote: From: Iuliana Prodan subject: remoteproc: imx_dsp_rproc: add handle_rsc callback to handle DSP-specific features Some DSP firmware requires a FW_READY signal before proceed

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread David Hildenbrand
On 07.04.25 09:52, Michael S. Tsirkin wrote: On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: Not perfect, but AFAIKS, not horrible. It is like it is. QEMU does queue exist if the corresponding feature is offered by the device, and that is what we have to live with. I don't thin

[PATCH] selftests: mptcp: add comment for getaddrinfo

2025-04-07 Thread zhenwei pi
mptcp_connect.c is a startup tutorial of MPTCP programming, however there is a lack of ai_protocol(IPPROTO_MPTCP) usage. Add comment for getaddrinfo MPTCP support. Signed-off-by: zhenwei pi Signed-off-by: zhenwei pi --- tools/testing/selftests/net/mptcp/mptcp_connect.c | 12 1 file

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

2025-04-07 Thread Andrew Davis
On 3/17/25 7:06 AM, Beleswar Padhi wrote: 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

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread David Hildenbrand
On 07.04.25 10:49, Michael S. Tsirkin wrote: On Mon, Apr 07, 2025 at 10:44:21AM +0200, David Hildenbrand wrote: Whoever adds new feat_X *must be aware* about all previous features, otherwise we'd be reusing feature bits and everything falls to pieces. The knowledge is supposed be limited

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Halil Pasic
On Mon, 7 Apr 2025 04:34:29 -0400 "Michael S. Tsirkin" wrote: > On Mon, Apr 07, 2025 at 10:17:10AM +0200, David Hildenbrand wrote: > > On 07.04.25 09:52, Michael S. Tsirkin wrote: > > > On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: > > > > > > > > > > Not perfect, but AFAIKS,

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Cornelia Huck
On Mon, Apr 07 2025, David Hildenbrand wrote: > On 07.04.25 15:12, Halil Pasic wrote: >> On Mon, 7 Apr 2025 04:34:29 -0400 >> "Michael S. Tsirkin" wrote: >> >>> On Mon, Apr 07, 2025 at 10:17:10AM +0200, David Hildenbrand wrote: On 07.04.25 09:52, Michael S. Tsirkin wrote: > On Fri, Apr

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

2025-04-07 Thread Andrew Davis
On 3/17/25 7:05 AM, Beleswar Padhi wrote: 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(). Therefor

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

2025-04-07 Thread Andrew Davis
On 3/17/25 7:06 AM, Beleswar Padhi wrote: 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

Re: [RESEND] virtiofs: add filesystem context source name check

2025-04-07 Thread Christian Brauner
On Mon, 07 Apr 2025 19:50:49 +0800, Xiangsheng Hou wrote: > In certain scenarios, for example, during fuzz testing, the source > name may be NULL, which could lead to a kernel panic. Therefore, an > extra check for the source name should be added. > > Applied to the vfs.fixes branch of the vfs/v

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

2025-04-07 Thread Andrew Davis
On 3/17/25 7:05 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

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 03:28:13PM +0200, Cornelia Huck wrote: > On Mon, Apr 07 2025, David Hildenbrand wrote: > > > On 07.04.25 15:12, Halil Pasic wrote: > >> On Mon, 7 Apr 2025 04:34:29 -0400 > >> "Michael S. Tsirkin" wrote: > >> > >>> On Mon, Apr 07, 2025 at 10:17:10AM +0200, David Hildenbra

Re: [PATCH v9 03/26] remoteproc: k3-r5: Use k3_r5_rproc_mem_data structure for memory info

2025-04-07 Thread Andrew Davis
On 3/17/25 7:05 AM, Beleswar Padhi wrote: The ti_k3_r5_remoteproc.c driver previously hardcoded device memory region addresses and names. Change this to use the k3_r5_rproc_mem_data structure to store memory information. This aligns with K3 DSP and M4 drivers, and can be refactored out later. Si

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

2025-04-07 Thread Andrew Davis
On 3/17/25 7:06 AM, Beleswar Padhi wrote: 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. Additio

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

2025-04-07 Thread Andrew Davis
On 3/17/25 7:06 AM, Beleswar Padhi wrote: 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-o

Re: [PATCH v3 0/6] KVM: guest_memfd: support for uffd minor

2025-04-07 Thread David Hildenbrand
On 07.04.25 17:14, Lorenzo Stoakes wrote: On Mon, Apr 07, 2025 at 04:46:48PM +0200, David Hildenbrand wrote: On 07.04.25 16:24, Liam R. Howlett wrote: * Nikita Kalyazin [250407 10:05]: ... All of this is extremely confusing because the onus of figuring out what the final code will look

Re: [PATCH v8 5/8] vhost: Reintroduce kthread mode support in vhost

2025-04-07 Thread Mike Christie
On 3/28/25 5:02 AM, Cindy Lu wrote: > +static int vhost_kthread_worker_create(struct vhost_worker *worker, > +struct vhost_dev *dev, const char *name) > +{ > + struct task_struct *task; > + u32 id; > + int ret; > + > + task = kthread_create(vhost_

[PATCH v2 27/32] tools/nolibc: add snprintf() and friends

2025-04-07 Thread Thomas Weißschuh
Add more of the printf() functions. Signed-off-by: Thomas Weißschuh Acked-by: Willy Tarreau --- tools/include/nolibc/stdio.h | 55 1 file changed, 55 insertions(+) diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h index b17b4

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread David Hildenbrand
On 06.04.25 20:42, Michael S. Tsirkin wrote: On Fri, Apr 04, 2025 at 03:48:49PM +0200, David Hildenbrand wrote: On 04.04.25 15:36, Halil Pasic wrote: On Fri, 4 Apr 2025 12:55:09 +0200 David Hildenbrand wrote: For virito-balloon, we should probably do the following: From 38e340c2bb53c2a7c

[PATCH v2 12/32] selftests: harness: Stop using setjmp()/longjmp()

2025-04-07 Thread Thomas Weißschuh
Usage of longjmp() was added to ensure that teardown is always run in commit 63e6b2a42342 ("selftests/harness: Run TEARDOWN for ASSERT failures") However instead of calling longjmp() to the teardown handler it is easier to just call the teardown handler directly from __bail(). Any potential duplica

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: > > > > Not perfect, but AFAIKS, not horrible. > > It is like it is. QEMU does queue exist if the corresponding feature > is offered by the device, and that is what we have to live with. I don't think we can live with this properly tho

Re: [PATCH v8 4/8] vhost: Introduce vhost_worker_ops in vhost_worker

2025-04-07 Thread Stefano Garzarella
On Mon, 7 Apr 2025 at 05:14, Cindy Lu wrote: > > On Tue, Apr 1, 2025 at 9:48 PM Stefano Garzarella wrote: > > > > On Fri, Mar 28, 2025 at 06:02:48PM +0800, Cindy Lu wrote: > > >Abstract vhost worker operations (create/stop/wakeup) into an ops > > >structure to prepare for kthread mode support. >

[PATCH] kunit: qemu_configs: Add riscv32 config

2025-04-07 Thread Thomas Weißschuh
Add a basic config to run kunit tests on riscv32. Signed-off-by: Thomas Weißschuh --- tools/testing/kunit/qemu_configs/riscv32.py | 17 + 1 file changed, 17 insertions(+) diff --git a/tools/testing/kunit/qemu_configs/riscv32.py b/tools/testing/kunit/qemu_configs/riscv32.py new

Re: [PATCH v8 4/8] vhost: Introduce vhost_worker_ops in vhost_worker

2025-04-07 Thread Michael S. Tsirkin
On Fri, Mar 28, 2025 at 06:02:48PM +0800, Cindy Lu wrote: > Abstract vhost worker operations (create/stop/wakeup) into an ops > structure to prepare for kthread mode support. > > Signed-off-by: Cindy Lu I worry about the overhead of indirect calls here. We have the wrappers, and only two option

Re: [PATCH 13/19] virtio_ring: introduce virtqueue ops

2025-04-07 Thread Michael S. Tsirkin
On Mon, Mar 24, 2025 at 02:01:21PM +0800, Jason Wang wrote: > This patch introduces virtqueue ops which is a set of the callbacks > that will be called for different queue layout or features. This would > help to avoid branches for split/packed and will ease the future > implementation like in orde

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

2025-04-07 Thread Reshetova, Elena
> On Fri, Apr 04, 2025 at 06:53:17AM +, Reshetova, Elena wrote: > > > On Wed, Apr 02, 2025 at 01:11:25PM +, Reshetova, Elena wrote: > > > > > > current SGX kernel code does not handle such errors in any other > way > > > > > > than notifying that operation failed for other ENCLS leaves. So

Re: [PATCH] kbuild: Require pahole >v1.29 with GENDWARFKSYMS and BTF on X86

2025-04-07 Thread Sam James
[with regard to https://lore.kernel.org/linux-kbuild/20250320232757.2283956-2-samitolva...@google.com/] Would it be possible to have a new release with that fix, to avoid distros all having to cherrypick the fix commit? Thanks in advance, sam

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread David Hildenbrand
On 07.04.25 10:54, Michael S. Tsirkin wrote: On Mon, Apr 07, 2025 at 09:18:21AM +0200, David Hildenbrand wrote: Now I am beginning to think we should leave the spec alone and fix the drivers ... Ugh We could always say that starting with feature X, queue indexes are fixed again. E.g., VIR

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

2025-04-07 Thread Bryan O'Donoghue
On 17/03/2025 07:45, Luca Weiss wrote: 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 cam

Re: [PATCH v3 0/6] KVM: guest_memfd: support for uffd minor

2025-04-07 Thread David Hildenbrand
On 07.04.25 16:24, Liam R. Howlett wrote: * Nikita Kalyazin [250407 10:05]: ... All of this is extremely confusing because the onus of figuring out what the final code will look like is put on the reviewer. As it is, we have issues with people not doing enough review of the code (due to

Re: [PATCH] scripts/spdxcheck: Limit the scope of git.Repo

2025-04-07 Thread Duje Mihanović
On Tuesday, 25 February 2025 14:10:41 Central European Summer Time Ricardo Ribalda wrote: > If the git.Repo object's scope extends to the Python interpreter's > shutdown phase, its destructor may fail due to the interpreter's state. > > Exception ignored in: > Traceback (most recent call last):

Re: [PATCH v3 0/6] KVM: guest_memfd: support for uffd minor

2025-04-07 Thread Liam R. Howlett
* Nikita Kalyazin [250407 10:05]: > ... > > > > All of this is extremely confusing because the onus of figuring out what > > the final code will look like is put on the reviewer. As it is, we have > > issues with people not doing enough review of the code (due to limited > > time). One way t

Re: [RESEND] virtiofs: add filesystem context source name check

2025-04-07 Thread Miklos Szeredi
On Mon, 7 Apr 2025 at 13:51, Xiangsheng Hou wrote: > > In certain scenarios, for example, during fuzz testing, the source > name may be NULL, which could lead to a kernel panic. Therefore, an > extra check for the source name should be added. > > Signed-off-by: Xiangsheng Hou Acked-by: Miklos Sz

[PATCH v5 0/2] memcg: Fix test_memcg_min/low test failures

2025-04-07 Thread Waiman Long
v5: - Use mem_cgroup_usage() as originally suggested by Johannes. v4: - Add "#ifdef CONFIG_MEMCG" directives around shrink_node_memcgs() to avoid compilation problem with !CONFIG_MEMCG configs. The test_memcontrol selftest consistently fails its test_memcg_low sub-test and sporadically fails

[PATCH v5 2/2] selftests: memcg: Increase error tolerance of child memory.current check in test_memcg_protection()

2025-04-07 Thread Waiman Long
The test_memcg_protection() function is used for the test_memcg_min and test_memcg_low sub-tests. This function generates a set of parent/child cgroups like: parent: memory.min/low = 50M child 0: memory.min/low = 75M, memory.current = 50M child 1: memory.min/low = 25M, memory.current = 50

[PATCH] dt-bindings: virtio: pci-iommu: Add ref to pci-device.yaml

2025-04-07 Thread Rob Herring (Arm)
The virtio pci-iommu is a PCI device, so it should have a reference to the pci-device.yaml schema. The pci-device.yaml schema defines the 'reg' format as a schema, so the text description for 'reg' can be dropped. Signed-off-by: Rob Herring (Arm) --- .../devicetree/bindings/virtio/pci-iommu.yaml

[RESEND] virtiofs: add filesystem context source name check

2025-04-07 Thread Xiangsheng Hou
In certain scenarios, for example, during fuzz testing, the source name may be NULL, which could lead to a kernel panic. Therefore, an extra check for the source name should be added. Signed-off-by: Xiangsheng Hou --- fs/fuse/virtio_fs.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/

[PATCH RESEND] kunit: qemu_configs: SH: Respect kunit cmdline

2025-04-07 Thread Thomas Weißschuh
The default SH kunit configuration sets CONFIG_CMDLINE_OVERWRITE which completely disregards the cmdline passed from the bootloader/QEMU in favor of the builtin CONFIG_CMDLINE. However the kunit tool needs to pass arguments to the in-kernel kunit core, for filters and other runtime parameters. Ena

Re: [PATCH v3 0/6] KVM: guest_memfd: support for uffd minor

2025-04-07 Thread Lorenzo Stoakes
On Mon, Apr 07, 2025 at 04:46:48PM +0200, David Hildenbrand wrote: > On 07.04.25 16:24, Liam R. Howlett wrote: > > * Nikita Kalyazin [250407 10:05]: > > > > > > > ... > > > > > > > > > > All of this is extremely confusing because the onus of figuring out what > > > > the final code will look like

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread David Hildenbrand
On 07.04.25 15:12, Halil Pasic wrote: On Mon, 7 Apr 2025 04:34:29 -0400 "Michael S. Tsirkin" wrote: On Mon, Apr 07, 2025 at 10:17:10AM +0200, David Hildenbrand wrote: On 07.04.25 09:52, Michael S. Tsirkin wrote: On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: Not perfect, but

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread David Hildenbrand
On 07.04.25 11:13, David Hildenbrand wrote: On 07.04.25 11:11, David Hildenbrand wrote: On 07.04.25 10:58, Michael S. Tsirkin wrote: On Mon, Apr 07, 2025 at 10:54:00AM +0200, David Hildenbrand wrote: On 07.04.25 10:49, Michael S. Tsirkin wrote: On Mon, Apr 07, 2025 at 10:44:21AM +0200, David

Re: [PATCH v4 1/2] mm/vmscan: Skip memcg with !usage in shrink_node_memcgs()

2025-04-07 Thread Michal Koutný
Hi Waiman. On Sun, Apr 06, 2025 at 09:41:58PM -0400, Waiman Long wrote: ... > diff --git a/tools/testing/selftests/cgroup/test_memcontrol.c > b/tools/testing/selftests/cgroup/test_memcontrol.c > index 16f5d74ae762..bab826b6b7b0 100644 > --- a/tools/testing/selftests/cgroup/test_memcontrol.c >

Re: [PATCH v3] remoteproc: imx_dsp_rproc: Add support for DSP-specific features

2025-04-07 Thread Mathieu Poirier
Good morning, On Thu, Apr 03, 2025 at 01:01:24PM +0300, Iuliana Prodan (OSS) wrote: > From: Iuliana Prodan > > Some DSP firmware requires a FW_READY signal before proceeding, while > others do not. > Therefore, add support to handle i.MX DSP-specific features. > > Implement handle_rsc callback

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Halil Pasic
On Mon, 07 Apr 2025 15:28:13 +0200 Cornelia Huck wrote: > > Staring at the cross-vmm, including the adding+removing of features and > > queues that are not in the spec, I am wondering if (in a world with > > fixed virtqueues) > > > > 1) Feature bits must be reserved before used. > > > > 2) Queu

Re: [PATCH RESEND 0/4] media: i2c: imx214: Problem with CCS PLL calculator

2025-04-07 Thread André Apitzsch
Am Montag, dem 10.03.2025 um 23:35 +0100 schrieb André Apitzsch: > Hi Sakari, > > Am Montag, dem 10.03.2025 um 11:11 + schrieb Sakari Ailus: > > Hi André, > > > > On Sat, Mar 08, 2025 at 10:47:54PM +0100, André Apitzsch via B4 > > Relay > > wrote: > > > The imx214 driver currently supports on

[PATCH v3 4/12] rcutorture: Make torture.sh --do-rt use CONFIG_PREEMPT_RT

2025-04-07 Thread Paul E. McKenney
The torture.sh --do-rt command-line parameter is intended to mimic -rt kernels. Now that CONFIG_PREEMPT_RT is upstream, this commit makes this mimicking more precise. Note that testing of RCU priority boosting is disabled in favor of forward-progress testing of RCU callbacks. If it turns out to

[PATCH net-next v25 00/23] Introducing OpenVPN Data Channel Offload

2025-04-07 Thread Antonio Quartulli
Notable changes since v24: * disable TCP disconnections of attached sockets (tcp_disconnect() returns -EBUSY) - similarly to kTLS. * used rcu_replace_pointer instead of rcu_dereference_protected+rcu_assign_pointer * dropped useless skb->ignore_df = 1 * dropped unneded EXPORT_SYMBOL_GPL(udpv6_pro

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

2025-04-07 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 v25 15/23] ovpn: implement peer lookup logic

2025-04-07 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 v25 13/23] ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg

2025-04-07 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 v25 14/23] ovpn: implement multi-peer support

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

2025-04-07 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 v25 02/23] ovpn: add basic netlink support

2025-04-07 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 v25 01/23] net: introduce OpenVPN Data Channel Offload (ovpn)

2025-04-07 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 v25 17/23] ovpn: add support for updating local or remote UDP endpoint

2025-04-07 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 v25 22/23] ovpn: add basic ethtool support

2025-04-07 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 v25 08/23] ovpn: implement basic RX path (UDP)

2025-04-07 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 v25 16/23] ovpn: implement keepalive mechanism

2025-04-07 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 | 78 - drivers/net/ovpn/

[PATCH net-next v25 05/23] ovpn: introduce the ovpn_peer object

2025-04-07 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 v25 09/23] ovpn: implement packet processing

2025-04-07 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 v17 04/15] dt-bindings: PCI: pci-ep: Add support for iommu-map and msi-map

2025-04-07 Thread Frank Li
Document the use of (msi|iommu)-map for PCI Endpoint (EP) controllers, which can use MSI as a doorbell mechanism. Each EP controller can support up to 8 physical functions and 65,536 virtual functions. Define how to construct device IDs using function bits [2:0] and virtual function index bits [31

[PATCH v17 02/15] irqdomain: Add IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and irq_domain_is_msi_immutable()

2025-04-07 Thread Frank Li
Add the flag IRQ_DOMAIN_FLAG_MSI_IMMUTABLE and the API function irq_domain_is_msi_immutable() to check if the MSI controller retains an immutable address/data pair during irq_set_affinity(). Ensure compatibility with MSI users like PCIe Endpoint Doorbell, which require the address/data pair to rem

[PATCH v17 03/15] irqchip/gic-v3-its: Set IRQ_DOMAIN_FLAG_MSI_IMMUTABLE for ITS

2025-04-07 Thread Frank Li
Set the IRQ_DOMAIN_FLAG_MSI_IMMUTABLE flag for ITS, as it does not change the address/data pair after setup. Ensure compatibility with MSI users, such as PCIe Endpoint Doorbell, which require the address/data pair to remain unchanged. Enable PCIe endpoints to use ITS for triggering doorbells from

[PATCH v17 14/15] pci: imx6: Add LUT setting for MSI/IOMMU in Endpoint mode

2025-04-07 Thread Frank Li
Support only one physical function, so call imx_pcie_add_lut_by_rid(0) to add a single LUT entry when operating in EP mode. Signed-off-by: Frank Li --- change from v14 to v16 - none change from v13 to v14 - new patch --- drivers/pci/controller/dwc/pci-imx6.c | 8 +++- 1 file changed, 7 inse

[PATCH net-next v25 19/23] ovpn: implement key add/get/del/swap via netlink

2025-04-07 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 v17 10/15] PCI: endpoint: pci-epf-test: Add doorbell test support

2025-04-07 Thread Frank Li
Add three registers: doorbell_bar, doorbell_addr, and doorbell_data. Use pci_epf_alloc_doorbell() to allocate a doorbell address space. Enable the Root Complex (RC) side driver to trigger pci-epc-test's doorbell callback handler by writing doorbell_data to the mapped doorbell_bar's address space.

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

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

2025-04-07 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

Re: [PATCH v3 0/4] Add managed SOFT RESERVE resource handling

2025-04-07 Thread Zhijian Li (Fujitsu)
Hi Terry, If I understand correctly, this patch set has only considered the situation where the soft reserved area and the region are exactly the same, as in pattern 1. However, I believe we also need to consider situations where these two are not equal, which are outlined in pattern 2 and 3 be

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 10:17:10AM +0200, David Hildenbrand wrote: > On 07.04.25 09:52, Michael S. Tsirkin wrote: > > On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: > > > > > > > > Not perfect, but AFAIKS, not horrible. > > > > > > It is like it is. QEMU does queue exist if the corr

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Fri, Apr 04, 2025 at 05:39:10PM +0200, Halil Pasic wrote: > That basically means that if I was, for the sake of fun do > > --- a/drivers/virtio/virtio_balloon.c > +++ b/drivers/virtio/virtio_balloon.c > @@ -1197,7 +1197,6 @@ static unsigned int features[] = { > VIRTIO_BALLOON_F_MUST_TEL

[PATCH] selftest/mm: Make hugetlb_reparenting_test tolerant to async reparenting

2025-04-07 Thread Li Wang
In cgroup v2, memory and hugetlb usage reparenting is asynchronous. This can cause test flakiness when immediately asserting usage after deleting a child cgroup. To address this, add a helper function `assert_with_retry()` that checks usage values with a timeout-based retry. This improves test stab

Re: [PATCH v1] s390/virtio_ccw: don't allocate/assign airqs for non-existing queues

2025-04-07 Thread Michael S. Tsirkin
On Mon, Apr 07, 2025 at 10:44:21AM +0200, David Hildenbrand wrote: > > > > > > > > > Whoever adds new feat_X *must be aware* about all previous features, > > > otherwise we'd be reusing feature bits and everything falls to pieces. > > > > > > The knowledge is supposed be limited to which featu

  1   2   >