[PATCH net-next v2 7/8] net: pktgen: fix access outside of user given buffer in pktgen_if_write()

2025-01-22 Thread Peter Seiderer
Honour the user given buffer size for the hex32_arg(), num_arg(), strn_len(), get_imix_entries() and get_labels() calls (otherwise they will access memory outside of the user given buffer). In hex32_arg(), num_arg(), strn_len() error out in case no characters are available (maxlen = 0), in num_arg

[PATCH net-next v2 6/8] net: pktgen: fix access outside of user given buffer in pktgen_thread_write()

2025-01-22 Thread Peter Seiderer
Honour the user given buffer size for the strn_len() calls (otherwise strn_len() will access memory outside of the user given buffer). Signed-off-by: Peter Seiderer --- Changes v1 -> v2: - no changes --- net/core/pktgen.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[PATCH net-next v2 5/8] net: pktgen: fix 'ratep 0' error handling (return -EINVAL)

2025-01-22 Thread Peter Seiderer
Given an invalid 'ratep' command e.g. 'ratep 0' the return value is '1', leading to the following misleading output: - the good case $ echo "ratep 100" > /proc/net/pktgen/lo\@0 $ grep "Result:" /proc/net/pktgen/lo\@0 Result: OK: ratep=100 - the bad case (before the patch)

[PATCH net-next v2 4/8] net: pktgen: fix 'rate 0' error handling (return -EINVAL)

2025-01-22 Thread Peter Seiderer
Given an invalid 'rate' command e.g. 'rate 0' the return value is '1', leading to the following misleading output: - the good case $ echo "rate 100" > /proc/net/pktgen/lo\@0 $ grep "Result:" /proc/net/pktgen/lo\@0 Result: OK: rate=100 - the bad case (before the patch)

[PATCH net-next v2 2/8] net: pktgen: enable 'param=value' parsing

2025-01-22 Thread Peter Seiderer
Enable additional to 'parm value' the 'param=value' parsing (otherwise skipping '=' in count_trail_chars() is useless). Tested with: $ echo "min_pkt_size 999" > /proc/net/pktgen/lo\@0 $ echo "min_pkt_size=999" > /proc/net/pktgen/lo\@0 $ echo "min_pkt_size =999" > /proc/net

[PATCH net-next v2 3/8] net: pktgen: fix hex32_arg parsing for short reads

2025-01-22 Thread Peter Seiderer
Fix hex32_arg parsing for short reads (here 7 hex digits instead of the expected 8), shift result only on successful input parsing. - before the patch $ echo "mpls 123" > /proc/net/pktgen/lo\@0 $ grep mpls /proc/net/pktgen/lo\@0 mpls: 1230 Result: OK:

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

2025-01-22 Thread Peter Seiderer
Add some test for /proc/net/pktgen/... interface. - enable 'CONFIG_NET_PKTGEN=m' in tools/testing/selftests/net/config Signed-off-by: Peter Seiderer --- Changes v1 -> v1: - fix tyop not vs. nod (suggested by Jakub Kicinski) - fix misaligned line (suggested by Jakub Kicinski) - enable fomer

[PATCH net-next v2 1/8] net: pktgen: replace ENOTSUPP with EOPNOTSUPP

2025-01-22 Thread Peter Seiderer
Replace ENOTSUPP with EOPNOTSUPP, fixes checkpatch hint WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP and e.g. $ echo "clone_skb 1" > /proc/net/pktgen/lo\@0 -bash: echo: write error: Unknown error 524 Signed-off-by: Peter Seiderer --- Changes v1 -> v2 - no changes ---

[PATCH net-next v2 0/8] Some pktgen fixes/improvments

2025-01-22 Thread Peter Seiderer
While taking a look at '[PATCH net] pktgen: Avoid out-of-range in get_imix_entries' ([1]) and '[PATCH net v2] pktgen: Avoid out-of-bounds access in get_imix_entries' ([2], [3]) and doing some tests and code review I detected that the /proc/net/pktgen/... parsing logic does not honour the user given

Re: [PATCH v2 0/5] Move kvfree_rcu() into SLAB (v2)

2025-01-22 Thread Joel Fernandes
On Tue, Jan 21, 2025 at 3:32 PM Paul E. McKenney wrote: > > On Tue, Jan 21, 2025 at 03:14:16PM +0100, Uladzislau Rezki wrote: > > On Tue, Jan 21, 2025 at 02:49:13PM +0100, Vlastimil Babka wrote: > > > On 1/21/25 2:33 PM, Uladzislau Rezki wrote: > > > > On Mon, Jan 20, 2025 at 11:06:13PM +0100, Vla

Re: [GIT PULL] RCU changes for v6.14

2025-01-22 Thread Uladzislau Rezki
On Tue, Jan 21, 2025 at 02:51:15PM -0800, Linus Torvalds wrote: > On Fri, 17 Jan 2025 at 09:24, Uladzislau Rezki (Sony) > wrote: > > > > Please pull the latest RCU git tree from: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/rcu/linux.git > > tags/rcu.release.v6.14 > > Hmm. I have pulle

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

2025-01-22 Thread Petr Pavlu
On 1/9/25 11:54, Andreas Hindborg wrote: > This patch includes changes required for Rust kernel modules to utilize > module parameters. This code implements read only support for integer > types without `sysfs` support. > > Signed-off-by: Andreas Hindborg > --- > rust/kernel/lib.rs |

[PATCH v2 1/3] selftests/mm: make file-backed THP split work by writing PMD size data

2025-01-22 Thread Zi Yan
Commit acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs") changes huge=always to allocate THP/mTHP based on write size and split_huge_page_test does not write PMD size data, so file-back THP is not created during the test. Fix it by writing PMD size data. Signed-off-by: Zi Yan --- V1 -

[PATCH v2 2/3] mm/huge_memory: allow split shmem large folio to any lower order

2025-01-22 Thread Zi Yan
Commit 4d684b5f92ba ("mm: shmem: add large folio support for tmpfs") has added large folio support to shmem. Remove the restriction in split_huge_page*(). Signed-off-by: Zi Yan Reviewed-by: Baolin Wang --- mm/huge_memory.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git

[PATCH v2 3/3] selftests/mm: test splitting file-backed THP to any lower order.

2025-01-22 Thread Zi Yan
Now split_huge_page*() supports shmem THP split to any lower order. Test it. The test now reads file content out after split to check if the split corrupts the file data. Signed-off-by: Zi Yan Reviewed-by: Baolin Wang Tested-by: Baolin Wang --- tools/testing/selftests/mm/split_huge_page_test.

[PATCHv2 net] Bonding: Fix support for gso_partial_features

2025-01-22 Thread Hangbin Liu
The fixed commit adds NETIF_F_GSO_ESP bit for bonding gso_partial_features. However, if we don't set the dev NETIF_F_GSO_PARTIAL bit, the later netdev_change_features() -> netdev_fix_features() will remove the NETIF_F_GSO_ESP bit from the dev features. This causes ethtool to show that the bond does

[RFC 1/5] vduse: add virtio_fs to allowed dev id

2025-01-22 Thread Eugenio Pérez
A VDUSE device that implements virtiofs device works fine just by adding the device id to the whitelist. Signed-off-by: Eugenio Pérez --- drivers/vdpa/vdpa_user/vduse_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/vdpa/vdpa_user/vduse_dev.c b/drivers/vdpa/vdpa_user/vduse_dev.

[RFC 0/5] virtiofs: map buffer out of virtqueue lock

2025-01-22 Thread Eugenio Pérez
This is useful for some setups like swiotlb or VDUSE where the DMA operations are expensive and/or need to be performed with a write lock. After applying this patch, fio read test goes from 1201MiB/s to 1211MiB/s. --- Sending this series to obtain feedback if this is the right way to go. Q: Do w

[RFC 3/5] virtiofs: Move stack sg to fuse_req

2025-01-22 Thread Eugenio Pérez
We need to move the map and unmap out of virtiofs queue lock. We need to store the unmap sgs to call virtqueue_unmap_sgs, so use the request itself. TODO: We need to store the forget sgs too. In my tests it is not called so we're safe. Find a way to force-call it. Signed-off-by: Eugenio Pérez

[RFC 4/5] virtio_ring: add virtqueue premapped out/in buffers support

2025-01-22 Thread Eugenio Pérez
Convenience function to add chains that mixes out and in buffers. Signed-off-by: Eugenio Pérez --- drivers/virtio/virtio_ring.c | 35 +++ include/linux/virtio.h | 7 +++ 2 files changed, 42 insertions(+) diff --git a/drivers/virtio/virtio_ring.c b/driv

[RFC 5/5] virtiofs: perform DMA operations out of the spinlock

2025-01-22 Thread Eugenio Pérez
This is useful for some setups like swiotlb or VDUSE where the DMA operations are expensive and/or need to be performed with a write lock. After applying this patch, fio read test goes from 1201MiB/s to 1211MiB/s. Signed-off-by: Eugenio Pérez --- drivers/virtio/virtio_ring.c | 2 ++ fs/fuse/vi

Re: [PATCH 1/3] selftests/mm: make file-backed THP split work by setting force option

2025-01-22 Thread Zi Yan
On Wed Jan 22, 2025 at 10:27 AM EST, David Hildenbrand wrote: > On 22.01.25 16:16, Zi Yan wrote: >> On Wed Jan 22, 2025 at 9:26 AM EST, David Hildenbrand wrote: >>> On 22.01.25 13:40, Zi Yan wrote: Commit acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs") changes huge=always to

Re: [PATCH] vduse: add virtio_fs to allowed dev id

2025-01-22 Thread Stefan Hajnoczi
On Tue, Jan 21, 2025 at 11:33:46AM +0100, Eugenio Pérez wrote: > A VDUSE device that implements virtiofs device works fine just by > adding the device id to the whitelist. The virtiofs DAX Window feature might require extra work. It is not widely enabled though, so must virtiofs devices will work

Re: [PATCH v5 01/10] selftests/mm: make file-backed THP split work by setting force option

2025-01-22 Thread Zi Yan
On Wed Jan 22, 2025 at 1:32 AM EST, Baolin Wang wrote: > > > On 2025/1/17 05:10, Zi Yan wrote: >> Commit acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs") >> changes huge=always to allocate THP/mTHP based on write size and >> split_huge_page_test does not write PMD size data, so file-ba

Re: [PATCH 1/3] selftests/mm: make file-backed THP split work by setting force option

2025-01-22 Thread David Hildenbrand
On 22.01.25 16:16, Zi Yan wrote: On Wed Jan 22, 2025 at 9:26 AM EST, David Hildenbrand wrote: On 22.01.25 13:40, Zi Yan wrote: Commit acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs") changes huge=always to allocate THP/mTHP based on write size and split_huge_page_test does not writ

[PATCH 3/3] selftests/mm: test splitting file-backed THP to any lower order.

2025-01-22 Thread Zi Yan
Now split_huge_page*() supports shmem THP split to any lower order. Test it. The test now reads file content out after split to check if the split corrupts the file data. Signed-off-by: Zi Yan Reviewed-by: Baolin Wang Tested-by: Baolin Wang --- .../selftests/mm/split_huge_page_test.c |

[PATCH 2/3] mm/huge_memory: allow split shmem large folio to any lower order

2025-01-22 Thread Zi Yan
Commit 4d684b5f92ba ("mm: shmem: add large folio support for tmpfs") has added large folio support to shmem. Remove the restriction in split_huge_page*(). Signed-off-by: Zi Yan Reviewed-by: Baolin Wang --- mm/huge_memory.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git

[PATCH 1/3] selftests/mm: make file-backed THP split work by setting force option

2025-01-22 Thread Zi Yan
Commit acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs") changes huge=always to allocate THP/mTHP based on write size and split_huge_page_test does not write PMD size data, so file-back THP is not created during the test. Set /sys/kernel/mm/transparent_hugepage/shmem_enabled to "force"

Re: [PATCH 1/3] selftests/mm: make file-backed THP split work by setting force option

2025-01-22 Thread Zi Yan
On Wed Jan 22, 2025 at 9:26 AM EST, David Hildenbrand wrote: > On 22.01.25 13:40, Zi Yan wrote: >> Commit acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs") >> changes huge=always to allocate THP/mTHP based on write size and >> split_huge_page_test does not write PMD size data, so file-b

Re: [PATCH 1/3] selftests/mm: make file-backed THP split work by setting force option

2025-01-22 Thread David Hildenbrand
On 22.01.25 13:40, Zi Yan wrote: Commit acd7ccb284b8 ("mm: shmem: add large folio support for tmpfs") changes huge=always to allocate THP/mTHP based on write size and split_huge_page_test does not write PMD size data, so file-back THP is not created during the test. Just curious, why can't we w

Re: [PATCH 2/3] mm/huge_memory: allow split shmem large folio to any lower order

2025-01-22 Thread David Hildenbrand
On 22.01.25 13:40, Zi Yan wrote: Commit 4d684b5f92ba ("mm: shmem: add large folio support for tmpfs") has added large folio support to shmem. Remove the restriction in split_huge_page*(). Signed-off-by: Zi Yan Reviewed-by: Baolin Wang --- mm/huge_memory.c | 8 +--- 1 file changed, 1 ins

Re: [PATCH net-next v1 5/5] selftest: net: add proc_net_pktgen

2025-01-22 Thread Peter Seiderer
Hello Jakub, On Fri, 17 Jan 2025 13:11:54 -0800, Jakub Kicinski wrote: > On Fri, 17 Jan 2025 15:16:13 +0100 Peter Seiderer wrote: > > +FIXTURE_SETUP(proc_net_pktgen) { > > + ssize_t len; > > + > > + self->ctrl_fd = open("/proc/net/pktgen/kpktgend_0", O_RDWR); > > + ASSERT_GE(self->ctrl_fd,

Re: [PATCH] selftests: gpio: gpio-sim: Fix missing chip disablements

2025-01-22 Thread Bartosz Golaszewski
On Wed, Jan 22, 2025 at 5:33 AM Koichiro Den wrote: > > Since upstream commit 8bd76b3d3f3a ("gpio: sim: lock up configfs that an > instantiated device depends on"), rmdir for an active virtual devices > been prohibited. > > Update gpio-sim selftest to align with the change. > > Reported-by: kernel

Re: [PATCH v2 0/5] Move kvfree_rcu() into SLAB (v2)

2025-01-22 Thread Vlastimil Babka
On 1/22/25 16:04, Joel Fernandes wrote: > On Tue, Jan 21, 2025 at 3:32 PM Paul E. McKenney wrote: >> >> On Tue, Jan 21, 2025 at 03:14:16PM +0100, Uladzislau Rezki wrote: >> > On Tue, Jan 21, 2025 at 02:49:13PM +0100, Vlastimil Babka wrote: >> > > Right so that's the first Possible solution, but wi

[RFC 2/5] virtio_ring: introduce virtqueue_map/unmap_sgs()

2025-01-22 Thread Eugenio Pérez
From: Jason Wang Introduce new virtqueue DMA operations which allows the drivers that want to make use of the premapping API but operate at the sg level. Note that we still follow the assumtions if virtqueue_add() so dma_map_sg() is not used. This could be optimized in the future. Signed-off-by:

Re: [PATCH v2 0/5] Move kvfree_rcu() into SLAB (v2)

2025-01-22 Thread Joel Fernandes
On Wed, Jan 22, 2025 at 11:43 AM Vlastimil Babka wrote: [...] > > __is_kvfree_rcu_offset() and its usage from Tiny. Granted, there is > > the overhead of function calling, but I highly doubt that it is going > > to be a bottleneck, considering that the __is_kvfree_rcu_offset() path > > is a kfree

Re: [PATCH net-next v2 0/8] Some pktgen fixes/improvments

2025-01-22 Thread Simon Horman
On Wed, Jan 22, 2025 at 03:41:02PM +0100, Peter Seiderer wrote: > While taking a look at '[PATCH net] pktgen: Avoid out-of-range in > get_imix_entries' ([1]) and '[PATCH net v2] pktgen: Avoid out-of-bounds access > in get_imix_entries' ([2], [3]) and doing some tests and code review I > detected th

Re: [PATCH net-next v2 0/8] Some pktgen fixes/improvments

2025-01-22 Thread Simon Horman
On Wed, Jan 22, 2025 at 06:16:35PM +, Simon Horman wrote: > On Wed, Jan 22, 2025 at 03:41:02PM +0100, Peter Seiderer wrote: > > While taking a look at '[PATCH net] pktgen: Avoid out-of-range in > > get_imix_entries' ([1]) and '[PATCH net v2] pktgen: Avoid out-of-bounds > > access > > in get_im

Re: [PATCH 5/5] selftests/nolibc: always keep test kernel configuration up to date

2025-01-22 Thread Thomas Weißschuh
Hi Willy! On 2025-01-22 19:52:06+0100, Willy Tarreau wrote: > On Wed, Jan 22, 2025 at 07:41:48PM +0100, Thomas Weißschuh wrote: > > @@ -173,7 +170,7 @@ test_arch() { > > exit 1 > > esac > > printf '%-15s' "$arch:" > > - swallow_output "${MAKE[@]}" CFLAGS_EXTRA="$CFLAG

[PATCH] bpf: Fix mix-up of 4096 and page size.

2025-01-22 Thread Saket Kumar Bhaskar
For platforms on powerpc architecture with a default page size greater than 4096, there was an inconsistency in fragment size calculation. This caused the BPF selftest xdp_adjust_tail/xdp_adjust_frags_tail_grow to fail on powerpc. The issue occurred because the fragment buffer size in bpf_prog_tes

Re: [PATCH v5 6/6] vhost_scsi: Add check for inherit_owner status

2025-01-22 Thread Mike Christie
On 12/30/24 6:43 AM, Cindy Lu wrote: > The vhost_scsi VHOST_NEW_WORKER requires the inherit_owner > setting to be true. So we need to implement a check for this. > > Signed-off-by: Cindy Lu > --- > drivers/vhost/scsi.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/drivers/vho

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

2025-01-22 Thread Andreas Hindborg
"Petr Pavlu" writes: > On 1/9/25 11:54, Andreas Hindborg wrote: >> This patch includes changes required for Rust kernel modules to utilize >> module parameters. This code implements read only support for integer >> types without `sysfs` support. >> [cut] >> + >> +// SAFETY: `old_value`

Re: [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-22 Thread Joe Damato
On Wed, Jan 22, 2025 at 02:12:46PM +0800, Jason Wang wrote: > On Wed, Jan 22, 2025 at 3:11 AM Joe Damato wrote: > > > > Slight refactor to prepare the code for NAPI to queue mapping. No > > functional changes. > > > > Signed-off-by: Joe Damato > > Reviewed-by: Gerhard Engleder > > Tested-by: Lei

Re: [PATCH 5/5] selftests/nolibc: always keep test kernel configuration up to date

2025-01-22 Thread Willy Tarreau
Hi Thomas! On Wed, Jan 22, 2025 at 07:41:48PM +0100, Thomas Weißschuh wrote: > @@ -173,7 +170,7 @@ test_arch() { > exit 1 > esac > printf '%-15s' "$arch:" > - swallow_output "${MAKE[@]}" CFLAGS_EXTRA="$CFLAGS_EXTRA" "$test_target" > V=1 > + swallow_output

[PATCH 2/2] libbpf: BPF programs dynamic loading and attaching

2025-01-22 Thread Slava Imameev
BPF programs designated as dynamically loaded can be loaded and attached independently after the initial bpf_object loading and attaching. These programs can also be reloaded and reattached multiple times, enabling more flexible management of a resident BPF program set. A key motivation for this

Re: [PATCH 5/5] selftests/nolibc: always keep test kernel configuration up to date

2025-01-22 Thread Willy Tarreau
On Wed, Jan 22, 2025 at 08:00:28PM +0100, Thomas Weißschuh wrote: > Hi Willy! > > On 2025-01-22 19:52:06+0100, Willy Tarreau wrote: > > On Wed, Jan 22, 2025 at 07:41:48PM +0100, Thomas Weißschuh wrote: > > > @@ -173,7 +170,7 @@ test_arch() { > > > exit 1 > > > esac > > > prin

Re: [PATCH v2 0/5] Move kvfree_rcu() into SLAB (v2)

2025-01-22 Thread Uladzislau Rezki
On Wed, Jan 22, 2025 at 05:43:06PM +0100, Vlastimil Babka wrote: > On 1/22/25 16:04, Joel Fernandes wrote: > > On Tue, Jan 21, 2025 at 3:32 PM Paul E. McKenney wrote: > >> > >> On Tue, Jan 21, 2025 at 03:14:16PM +0100, Uladzislau Rezki wrote: > >> > On Tue, Jan 21, 2025 at 02:49:13PM +0100, Vlasti

Re: [GIT PULL] kunit next update for Linux 6.14-rc1

2025-01-22 Thread pr-tracker-bot
The pull request you sent on Tue, 21 Jan 2025 14:16:44 -0700: > git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest > tags/linux_kselftest-kunit-6.14-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/e8f17cb6f5abd4e52e89b5768c7016b7dab1e6fe Thank you

Re: [GIT PULL] kselftest next update for Linux 6.14-rc1

2025-01-22 Thread pr-tracker-bot
The pull request you sent on Tue, 21 Jan 2025 13:56:32 -0700: > git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest > tags/linux_kselftest-next-6.14-rc1 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/8fb1e2eed14dc347e1d04b8bf0bf52c606de6da1 Thank you!

[PATCH] media: add virtio-media driver

2025-01-22 Thread Alexandre Courbot
Add the first version of the virtio-media driver. This driver acts roughly as a V4L2 relay between user-space and the virtio virtual device on the host, so it is relatively simple, yet unconventional. It doesn't use VB2 or other frameworks typically used in a V4L2 driver, and most of its complexit

Re: [PATCH v2 2/3] mm/huge_memory: allow split shmem large folio to any lower order

2025-01-22 Thread Yang Shi
On 1/22/25 8:19 AM, Zi Yan wrote: Commit 4d684b5f92ba ("mm: shmem: add large folio support for tmpfs") has added large folio support to shmem. Remove the restriction in split_huge_page*(). Reviewed-by: Yang Shi Signed-off-by: Zi Yan Reviewed-by: Baolin Wang --- mm/huge_memory.c | 8

[PATCH 4/5] selftests/nolibc: execute defconfig before other targets

2025-01-22 Thread Thomas Weißschuh
Some targets use the test kernel configuration. Executing defconfig in the same make invocation as those targets results in errors as the configuration may be in an inconsistent state during reconfiguration. Avoid this by introducing ordering dependencies between the defconfig and some other target

[PATCH 3/5] selftests/nolibc: drop call to mrproper target

2025-01-22 Thread Thomas Weißschuh
"mrproper" unnecessarily cleans a lot of files. kbuild is smart enough to handle changed configurations, so the cleanup is not necessary and only leads to excessive rebuilds. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH 0/5] selftests/nolibc: test kernel configuration cleanups

2025-01-22 Thread Thomas Weißschuh
insertions(+), 16 deletions(-) --- base-commit: 60fe18237f72e3a186127658452dbb0992113cf7 change-id: 20250122-nolibc-config-d639e1612c93 Best regards, -- Thomas Weißschuh

[PATCH 1/5] selftests/nolibc: drop custom EXTRACONFIG functionality

2025-01-22 Thread Thomas Weißschuh
kbuild already contains logic to merge predefines snippets into a defconfig file. This already works nicely with the current "defconfig" target. Make use of the snippet and drop the custom logic. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 9 + 1 file ch

[PATCH 5/5] selftests/nolibc: always keep test kernel configuration up to date

2025-01-22 Thread Thomas Weißschuh
Avoid using a stale test kernel configuration by always synchronizing it to the current source tree. kbuild is smart enough to avoid spurious rebuilds. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/run-tests.sh | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff

[PATCH 2/5] selftests/nolibc: drop call to prepare target

2025-01-22 Thread Thomas Weißschuh
The "prepare" target does not need to be run manually. kbuild knows when to use it on its own and the target is not even documented. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selft

[PATCH 1/2] selftests/nolibc: rename s390 to s390x

2025-01-22 Thread Thomas Weißschuh
Support for 32-bit s390 is about to be added. As "s39032" would look horrible, use the another naming scheme. 32-bit s390 is "s390" and 64-bit s390 is "s390x", similar to how it is handled in various toolchain components. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefil

[PATCH 2/2] tools/nolibc: add support for 32-bit s390

2025-01-22 Thread Thomas Weißschuh
32-bit s390 is very close to the existing 64-bit implementation. Some special handling is necessary as there is neither LLVM nor QEMU support. Also the kernel itself can not build natively for 32-bit s390, so instead the test program is executed with a 64-bit kernel. Signed-off-by: Thomas Weißsch

[PATCH 0/2] tools/nolibc: support for 32-bit s390

2025-01-22 Thread Thomas Weißschuh
| 2 +- tools/testing/selftests/nolibc/Makefile | 10 -- tools/testing/selftests/nolibc/run-tests.sh | 8 +++- 4 files changed, 21 insertions(+), 4 deletions(-) --- base-commit: 0597614d84c8593ba906418bf3c0c0de1e02e82a change-id: 20250122-nolibc-s390-e57141682c88 Best regards, -- Thomas Weißschuh

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

2025-01-22 Thread Mike Christie
On 12/30/24 6:43 AM, Cindy Lu wrote: > In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), > the vhost now uses vhost_task and operates as a child of the > owner thread. This aligns with containerization principles. > However, this change has caused confusion for some leg

[PATCH 1/2] libbpf: BPF program load type enum

2025-01-22 Thread Slava Imameev
Replacing the boolean field with an enum simplifies the addition of new load types. Currently, the bpf_program structure defines the autoload type using a boolean field. This field is now replaced with an enum, allowing new BPF program loading types to be introduced by extending the enum value rang

Re: [RFC 1/5] vduse: add virtio_fs to allowed dev id

2025-01-22 Thread Jason Wang
On Thu, Jan 23, 2025 at 12:32 AM Eugenio Pérez wrote: > > A VDUSE device that implements virtiofs device works fine just by > adding the device id to the whitelist. > > Signed-off-by: Eugenio Pérez Acked-by: Jason Wang Thanks

Re: [RFC 3/5] virtiofs: Move stack sg to fuse_req

2025-01-22 Thread Jason Wang
On Thu, Jan 23, 2025 at 12:32 AM Eugenio Pérez wrote: > > We need to move the map and unmap out of virtiofs queue lock. We need to > store the unmap sgs to call virtqueue_unmap_sgs, so use the request > itself. > > TODO: We need to store the forget sgs too. In my tests it is not called > so we'r

Re: [RFC 5/5] virtiofs: perform DMA operations out of the spinlock

2025-01-22 Thread Jason Wang
On Thu, Jan 23, 2025 at 12:32 AM Eugenio Pérez wrote: > > This is useful for some setups like swiotlb or VDUSE where the DMA > operations are expensive and/or need to be performed with a write lock. > > After applying this patch, fio read test goes from 1201MiB/s to 1211MiB/s. The difference is t

Re: [PATCH] vduse: add virtio_fs to allowed dev id

2025-01-22 Thread Jason Wang
On Wed, Jan 22, 2025 at 11:49 PM Stefan Hajnoczi wrote: > > On Tue, Jan 21, 2025 at 11:33:46AM +0100, Eugenio Pérez wrote: > > A VDUSE device that implements virtiofs device works fine just by > > adding the device id to the whitelist. > > The virtiofs DAX Window feature might require extra work.

Re: [RFC 2/5] virtio_ring: introduce virtqueue_map/unmap_sgs()

2025-01-22 Thread Jason Wang
On Thu, Jan 23, 2025 at 12:32 AM Eugenio Pérez wrote: > > From: Jason Wang > > Introduce new virtqueue DMA operations which allows the drivers that > want to make use of the premapping API but operate at the sg level. > > Note that we still follow the assumtions if virtqueue_add() so > dma_map_sg

Re: [PATCH] media: add virtio-media driver

2025-01-22 Thread kernel test robot
Hi Alexandre, kernel test robot noticed the following build warnings: [auto build test WARNING on ffd294d346d185b70e28b1a28abe367bbfe53c04] url: https://github.com/intel-lab-lkp/linux/commits/Alexandre-Courbot/media-add-virtio-media-driver/20250123-085559 base: ffd294d346d185b70e28b1a28abe

Re: [RFC 5/5] virtiofs: perform DMA operations out of the spinlock

2025-01-22 Thread Jason Wang
On Thu, Jan 23, 2025 at 9:56 AM Jason Wang wrote: > > On Thu, Jan 23, 2025 at 12:32 AM Eugenio Pérez wrote: > > > > This is useful for some setups like swiotlb or VDUSE where the DMA > > operations are expensive and/or need to be performed with a write lock. > > > > After applying this patch, fio

Re: [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-22 Thread Joe Damato
On Thu, Jan 23, 2025 at 10:40:43AM +0800, Jason Wang wrote: > On Thu, Jan 23, 2025 at 1:41 AM Joe Damato wrote: > > > > On Wed, Jan 22, 2025 at 02:12:46PM +0800, Jason Wang wrote: > > > On Wed, Jan 22, 2025 at 3:11 AM Joe Damato wrote: > > > > > > > > Slight refactor to prepare the code for NAPI

Re: [PATCH 1/3] remoteproc: k3-r5: Fix checks in k3_r5_rproc_{mbox_callback/kick}

2025-01-22 Thread Beleswar Prasad Padhi
On 22/01/25 00:17, Andrew Davis wrote: On 12/24/24 3:14 AM, Beleswar Padhi wrote: 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 to exit if the remote core's state

[PATCH] wireguard: selftests: Cleanup CONFIG_UBSAN_SANITIZE_ALL

2025-01-22 Thread WangYuli
Commit 918327e9b7ff ("ubsan: Remove CONFIG_UBSAN_SANITIZE_ALL") removed the CONFIG_UBSAN_SANITIZE_ALL configuration option. Eliminate invalid configurations to improve code readability. Signed-off-by: WangYuli --- tools/testing/selftests/wireguard/qemu/debug.config | 1 - 1 file changed, 1 delet

Re: [RFC net-next v3 2/4] virtio_net: Prepare for NAPI to queue mapping

2025-01-22 Thread Jason Wang
On Thu, Jan 23, 2025 at 1:41 AM Joe Damato wrote: > > On Wed, Jan 22, 2025 at 02:12:46PM +0800, Jason Wang wrote: > > On Wed, Jan 22, 2025 at 3:11 AM Joe Damato wrote: > > > > > > Slight refactor to prepare the code for NAPI to queue mapping. No > > > functional changes. > > > > > > Signed-off-by

Re: [PATCH] vduse: add virtio_fs to allowed dev id

2025-01-22 Thread Eugenio Perez Martin
On Thu, Jan 23, 2025 at 2:50 AM Jason Wang wrote: > > On Wed, Jan 22, 2025 at 11:49 PM Stefan Hajnoczi wrote: > > > > On Tue, Jan 21, 2025 at 11:33:46AM +0100, Eugenio Pérez wrote: > > > A VDUSE device that implements virtiofs device works fine just by > > > adding the device id to the whitelist.

Re: [RFC 2/5] virtio_ring: introduce virtqueue_map/unmap_sgs()

2025-01-22 Thread Eugenio Perez Martin
On Thu, Jan 23, 2025 at 2:51 AM Jason Wang wrote: > > On Thu, Jan 23, 2025 at 12:32 AM Eugenio Pérez wrote: > > > > From: Jason Wang > > > > Introduce new virtqueue DMA operations which allows the drivers that > > want to make use of the premapping API but operate at the sg level. > > > > Note t

Re: [RFC 3/5] virtiofs: Move stack sg to fuse_req

2025-01-22 Thread Eugenio Perez Martin
On Thu, Jan 23, 2025 at 2:54 AM Jason Wang wrote: > > On Thu, Jan 23, 2025 at 12:32 AM Eugenio Pérez wrote: > > > > We need to move the map and unmap out of virtiofs queue lock. We need to > > store the unmap sgs to call virtqueue_unmap_sgs, so use the request > > itself. > > > > TODO: We need t

[PATCH v2 1/5] selftests/nolibc: drop custom EXTRACONFIG functionality

2025-01-22 Thread Thomas Weißschuh
kbuild already contains logic to merge predefines snippets into a defconfig file. This already works nicely with the current "defconfig" target. Make use of the snippet and drop the custom logic. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 9 + 1 file ch

[PATCH v2 0/5] selftests/nolibc: test kernel configuration cleanups

2025-01-22 Thread Thomas Weißschuh
A few cleanups and optimizations for the management of the kernel configuration. Signed-off-by: Thomas Weißschuh --- Changes in v2: - Rebase on current torvalds/master - Call "make defconfig" separately - Link to v1: https://lore.kernel.org/r/20250122-nolibc-config-v1-0

[PATCH v2 3/5] selftests/nolibc: drop call to mrproper target

2025-01-22 Thread Thomas Weißschuh
"mrproper" unnecessarily cleans a lot of files. kbuild is smart enough to handle changed configurations, so the cleanup is not necessary and only leads to excessive rebuilds. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 del

[PATCH v2 5/5] selftests/nolibc: always keep test kernel configuration up to date

2025-01-22 Thread Thomas Weißschuh
Avoid using a stale test kernel configuration by always synchronizing it to the current source tree. kbuild is smart enough to avoid spurious rebuilds. Shuffle the code around a bit to keep all the commands with side-effects together. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/

[PATCH v2 2/5] selftests/nolibc: drop call to prepare target

2025-01-22 Thread Thomas Weißschuh
The "prepare" target does not need to be run manually. kbuild knows when to use it on its own and the target is not even documented. Signed-off-by: Thomas Weißschuh --- tools/testing/selftests/nolibc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selft

[PATCH v2 4/5] selftests/nolibc: execute defconfig before other targets

2025-01-22 Thread Thomas Weißschuh
Some targets use the test kernel configuration. Executing defconfig in the same make invocation as those targets results in errors as the configuration may be in an inconsistent state during reconfiguration. Avoid this by introducing ordering dependencies between the defconfig and some other target

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

2025-01-22 Thread Sabrina Dubroca
2025-01-22, 00:26:50 +0100, Antonio Quartulli wrote: > On 20/01/2025 15:52, Antonio Quartulli wrote: > > On 17/01/2025 12:48, Sabrina Dubroca wrote: > > [...] > > > 8< > > > > > > diff --git a/drivers/net/ovpn/netlink.c b/drivers/net/ovpn/netlink.c > > > index 72357bb5f30b..19aa4

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

2025-01-22 Thread Sabrina Dubroca
2025-01-22, 01:40:47 +0100, Antonio Quartulli wrote: > On 17/01/2025 12:48, Sabrina Dubroca wrote: > [...] > > With the delayed socket release (which is similar to what was in v11, > > but now with refcounting on the netdevice which should make > > rtnl_link_unregister in ovpn_cleanup wait [*]), we

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

2025-01-22 Thread Antonio Quartulli
On 22/01/2025 09:51, Sabrina Dubroca wrote: 2025-01-22, 01:40:47 +0100, Antonio Quartulli wrote: On 17/01/2025 12:48, Sabrina Dubroca wrote: [...] With the delayed socket release (which is similar to what was in v11, but now with refcounting on the netdevice which should make rtnl_link_unregist