[PATCH net-next v1 1/2] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-03 Thread Andy Shevchenko
Sparse complains that the driver doesn't respect the bitwise types: drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in assignment (different base types) drivers/net/ieee802154/ca8210.c:1796:27:expected restricted __le16 [addressable] [assigned] [usertype] pan_id drivers/net/

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

2025-03-03 Thread Sabrina Dubroca
2025-02-27, 02:21:37 +0100, Antonio Quartulli wrote: > @@ -94,11 +96,23 @@ void ovpn_socket_release(struct ovpn_peer *peer) >* detached before it can be picked by a concurrent reader. >*/ > lock_sock(sock->sock->sk); > - ovpn_socket_put(peer, sock); > + released = ovpn

[PATCH net-next v1 0/2] ieee802154: ca8210: Sparse fix and GPIOd conversion

2025-03-03 Thread Andy Shevchenko
The main part is the patch 2 that converts the driver to GPIO descriptor APIs, the first one is just an ad-hoc fix WRT sparse complains on the bitwise types misuse. Andy Shevchenko (2): ieee802154: ca8210: Use proper setter and getters for bitwise types ieee802154: ca8210: Switch to using gpio

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

2025-03-03 Thread Antonio Quartulli
On 03/03/2025 14:08, Sabrina Dubroca wrote: Hello, a few minor coding style nits on this patch. 2025-02-27, 02:21:40 +0100, Antonio Quartulli wrote: @@ -197,9 +254,16 @@ static int ovpn_netdev_notifier_call(struct notifier_block *nb, netif_carrier_off(dev); ovpn

[PATCH net-next v1 2/2] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Andy Shevchenko
This updates the driver to gpiod API, and removes yet another use of of_get_named_gpio(). Signed-off-by: Andy Shevchenko --- drivers/net/ieee802154/ca8210.c | 63 - 1 file changed, 22 insertions(+), 41 deletions(-) diff --git a/drivers/net/ieee802154/ca8210.c b/d

Re: [PATCH net-next v1 1/2] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-03 Thread Andy Shevchenko
On Mon, Mar 03, 2025 at 05:06:32PM +0100, Miquel Raynal wrote: > On 03/03/2025 at 17:07:39 +02, Andy Shevchenko > wrote: > > > Sparse complains that the driver doesn't respect the bitwise types: > > > > drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in > > assignment (differen

Re: [PATCH v15 07/15] PCI: endpoint: pci-ep-msi: Add MSI address/data pair mutable check

2025-03-03 Thread Frank Li
On Sat, Mar 01, 2025 at 11:44:50AM +, Marc Zyngier wrote: > On Tue, 11 Feb 2025 19:22:00 +, > Frank Li wrote: > > > > 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 i

Re: [PATCH net-next v1 2/2] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Andy Shevchenko
On Mon, Mar 03, 2025 at 05:20:59PM +0100, Miquel Raynal wrote: ... > > - * @gpio_reset: gpio number of ca8210 reset line > > - * @gpio_irq: gpio number of ca8210 interrupt line > > + * @reset_gpio: GPIO of ca8210 reset line > > What about "CA8210 Reset GPIO line"? Or Just "Reset GP

[PATCH AUTOSEL 6.13 17/17] vhost: return task creation error instead of NULL

2025-03-03 Thread Sasha Levin
From: Keith Busch [ Upstream commit cb380909ae3b1ebf14d6a455a4f92d7916d790cb ] Lets callers distinguish why the vhost task creation failed. No one currently cares why it failed, so no real runtime change from this patch, but that will not be the case for long. Signed-off-by: Keith Busch Messag

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

2025-03-03 Thread Antonio Quartulli
On 28/02/2025 16:25, Sabrina Dubroca wrote: (I'm still reviewing how everything fits together, but one small thing here:) 2025-02-27, 02:21:34 +0100, Antonio Quartulli wrote: +static void ovpn_udp_close(struct sock *sk, long timeout) +{ + struct ovpn_socket *sock; + struct ovpn_priv

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

2025-03-03 Thread Sabrina Dubroca
2025-03-03, 15:45:23 +0100, Antonio Quartulli wrote: > On 03/03/2025 14:08, Sabrina Dubroca wrote: > > > + if (ovpn_sock && ovpn_sock->sock->sk == sk) > > > + skip = false; > > > + rcu_read_unlock(); > > > + > > > + if (skip) >

Re: [PATCH bpf-next v2 04/10] selftests/bpf: test_tunnel: Move ip6gre tunnel test to test_progs

2025-03-03 Thread Stanislav Fomichev
On 03/03, Bastien Curutchet (eBPF Foundation) wrote: > ip6gre tunnels are tested in the test_tunnel.sh but not in the test_progs > framework. > > Add a new test in test_progs to test ip6gre tunnels. It uses the same > network topology and the same BPF programs than the script. Disable the > IPv6 D

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

2025-03-03 Thread Antonio Quartulli
On 03/03/2025 16:08, Sabrina Dubroca wrote: 2025-02-27, 02:21:37 +0100, Antonio Quartulli wrote: @@ -94,11 +96,23 @@ void ovpn_socket_release(struct ovpn_peer *peer) * detached before it can be picked by a concurrent reader. */ lock_sock(sock->sock->sk); - ovpn_so

Re: [PATCH bpf-next v2 01/10] selftests/bpf: test_tunnel: Add generic_attach* helpers

2025-03-03 Thread Stanislav Fomichev
On 03/03, Bastien Curutchet (eBPF Foundation) wrote: > A fair amount of code duplication is present among tests to attach BPF > programs. > > Create generic_attach* helpers that attach BPF programs to a given > interface. > Use ASSERT_OK_FD() instead of ASSERT_GE() to check fd's validity. > Use th

Re: KASAN: global-out-of-bounds Read in srcu_gp_start_if_needed

2025-03-03 Thread Joel Fernandes
On Mon, Mar 03, 2025 at 08:44:48AM +0800, Strforexc yn wrote: > Dear Maintainers, When using our customized Syzkaller to fuzz the > latest Linux kernel, the following crash was triggered. > > Kernel commit: v6.14-rc4 (Commits on Feb 24, 2025) > Kernel Config : https://github.com/Strforexc/LinuxKer

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

2025-03-03 Thread Uladzislau Rezki
On Sun, Mar 02, 2025 at 12:36:51PM -0800, Paul E. McKenney wrote: > On Sun, Mar 02, 2025 at 10:46:29AM -0800, Boqun Feng wrote: > > On Sun, Mar 02, 2025 at 09:39:44AM -0800, Paul E. McKenney wrote: > > > On Sun, Mar 02, 2025 at 11:19:44AM +0100, Uladzislau Rezki wrote: > > > > On Fri, Feb 28, 2025

Re: [PATCH net-next v1 1/2] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-03 Thread Miquel Raynal
Hello, On 03/03/2025 at 17:07:39 +02, Andy Shevchenko wrote: > Sparse complains that the driver doesn't respect the bitwise types: > > drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in > assignment (different base types) > drivers/net/ieee802154/ca8210.c:1796:27:expected

[PATCH AUTOSEL 6.12 17/17] vhost: return task creation error instead of NULL

2025-03-03 Thread Sasha Levin
From: Keith Busch [ Upstream commit cb380909ae3b1ebf14d6a455a4f92d7916d790cb ] Lets callers distinguish why the vhost task creation failed. No one currently cares why it failed, so no real runtime change from this patch, but that will not be the case for long. Signed-off-by: Keith Busch Messag

Re: [PATCH net-next v1 2/2] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Miquel Raynal
On 03/03/2025 at 18:28:41 +02, Andy Shevchenko wrote: > On Mon, Mar 03, 2025 at 05:20:59PM +0100, Miquel Raynal wrote: > > ... > >> > - * @gpio_reset: gpio number of ca8210 reset line >> > - * @gpio_irq: gpio number of ca8210 interrupt line >> > + * @reset_gpio: GPIO of ca8210 rese

Re: [PATCH bpf-next v4 2/6] net: tun: enable transfer of XDP metadata to skb

2025-03-03 Thread Marcus Wichelmann
Am 28.02.25 um 20:49 schrieb Martin KaFai Lau: > On 2/27/25 6:23 AM, Marcus Wichelmann wrote: >> When the XDP metadata area was used, it is expected that the same >> metadata can also be accessed from TC, as can be read in the description >> of the bpf_xdp_adjust_meta helper function. In the tun dr

[PATCH bpf-next v2 06/10] selftests/bpf: test_tunnel: Move ip6erspan tunnel test to test_progs

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
ip6erspan tunnels are tested in the test_tunnel.sh but not in the test_progs framework. Add a new test in test_progs to test ip6erspan tunnels. It uses the same network topology and the same BPF programs than the script. Remove test_ip6erspan() from the script. Acked-by: Stanislav Fomichev Signe

[PATCH bpf-next v2 03/10] selftests/bpf: test_tunnel: Move gre tunnel test to test_progs

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
gre tunnels are tested in the test_tunnel.sh but not in the test_progs framework. Add a new test in test_progs to test gre tunnels. It uses the same network topology and the same BPF programs than the script. Remove test_gre() and test_gre_no_tunnel_key() from the script. Acked-by: Stanislav Fomi

[PATCH] vhost: fix VHOST_*_OWNER documentation

2025-03-03 Thread Stefano Garzarella
VHOST_OWNER_SET and VHOST_OWNER_RESET are used in the documentation instead of VHOST_SET_OWNER and VHOST_RESET_OWNER respectively. To avoid confusion, let's use the right names in the documentation. No change to the API, only the documentation is involved. Signed-off-by: Stefano Garzarella ---

Re: [PATCH 0/2] selftests/pidfd: Fix missing headers

2025-03-03 Thread Peter Seiderer
Hello Siddharth, On Mon, 3 Mar 2025 02:22:44 +0530, Siddharth Menon wrote: > Fix compilation errors caused by missing headers in the pidfd selftest. > > The errors include: > pidfd_fdinfo_test.c:230:13: error: implicit declaration of function ‘mount’ > pidfd_setns_test.c:172:54: error: implici

[PATCH bpf-next v2 05/10] selftests/bpf: test_tunnel: Move erspan tunnel tests to test_progs

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
erspan tunnels are tested in the test_tunnel.sh but not in the test_progs framework. Add a new test in test_progs to test erspan tunnels. It uses the same network topology and the same BPF programs than the script. Remove test_erspan() from the script. Acked-by: Stanislav Fomichev Signed-off-by:

[PATCH bpf-next v2 04/10] selftests/bpf: test_tunnel: Move ip6gre tunnel test to test_progs

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
ip6gre tunnels are tested in the test_tunnel.sh but not in the test_progs framework. Add a new test in test_progs to test ip6gre tunnels. It uses the same network topology and the same BPF programs than the script. Disable the IPv6 DAD feature because it can take lot of time and cause some tests t

Re: [PATCH v3 03/10] selftests/mm: Skip uffd-wp-mremap if userfaultfd not available

2025-03-03 Thread Dev Jain
+ Muhammad, I guess he has been working on selftests, maybe he can chime in. On 03/03/25 4:18 pm, Brendan Jackman wrote: On Fri, Feb 28, 2025 at 10:55:00PM +0530, Dev Jain wrote: On 28/02/25 10:24 pm, Brendan Jackman wrote: It's obvious that this should fail in that case, but still, save the

[PATCH bpf-next v2 02/10] selftests/bpf: test_tunnel: Add ping helpers

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
All tests use more or less the same ping commands as final validation. Also test_ping()'s return value is checked with ASSERT_OK() while this check is already done by the SYS() macro inside test_ping(). Create helpers around test_ping() and use them in the tests to avoid code duplication. Remove t

Re: [PATCH v7 6/8] vhost: uapi to control task mode (owner vs kthread)

2025-03-03 Thread Stefano Garzarella
On Sun, Mar 02, 2025 at 10:32:08PM +0800, Cindy Lu wrote: Add a new UAPI to configure the vhost device to use the kthread mode The userspace application can use IOCTL VHOST_FORK_FROM_OWNER to choose between owner and kthread mode if necessary This setting must be applied before VHOST_SET_OWNER, a

[PATCH bpf-next v2 00/10] selftests/bpf: Migrate test_tunnel.sh to test_progs

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
Hi all, This patch series continues the work to migrate the *.sh tests into prog_tests framework. The test_tunnel.sh script has already been partly migrated to test_progs in prog_tests/test_tunnel.c so I add my work to it. PATCH 1 & 2 create some helpers to avoid code duplication and ease the mi

[PATCH bpf-next v2 01/10] selftests/bpf: test_tunnel: Add generic_attach* helpers

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
A fair amount of code duplication is present among tests to attach BPF programs. Create generic_attach* helpers that attach BPF programs to a given interface. Use ASSERT_OK_FD() instead of ASSERT_GE() to check fd's validity. Use these helpers in all the available tests. Signed-off-by: Bastien Cur

[PATCH bpf-next v2 10/10] selftests/bpf: test_tunnel: Remove test_tunnel.sh

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
All tests from test_tunnel.sh have been migrated into test test_progs. The last test remaining in the script is the test_ipip() that is already covered in the test_prog framework by the NONE case of test_ipip_tunnel(). Remove the test_tunnel.sh script and its Makefile entry Acked-by: Stanislav Fo

[PATCH bpf-next v2 07/10] selftests/bpf: test_tunnel: Move geneve tunnel test to test_progs

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
geneve tunnels are tested in the test_tunnel.sh but not in the test_progs framework. Add a new test in test_progs to test geneve tunnels. It uses the same network topology and the same BPF programs than the script. Remove test_geneve() from the script. Acked-by: Stanislav Fomichev Signed-off-by:

[PATCH bpf-next v2 09/10] selftests/bpf: test_tunnel: Move ip6tnl tunnel tests to test_progs

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
ip6tnl tunnels are tested in the test_tunnel.sh but not in the test_progs framework. Add a new test in test_progs to test ip6tnl tunnels. It uses the same network topology and the same BPF programs than the script. Remove test_ipip6() and test_ip6ip6() from the script. Acked-by: Stanislav Fomiche

[PATCH bpf-next v2 08/10] selftests/bpf: test_tunnel: Move ip6geneve tunnel test to test_progs

2025-03-03 Thread Bastien Curutchet (eBPF Foundation)
ip6geneve tunnels are tested in the test_tunnel.sh but not in the test_progs framework. Add a new test in test_progs to test ip6geneve tunnels. It uses the same network topology and the same BPF programs than the script. Remove test_ip6geneve() from the script. Acked-by: Stanislav Fomichev Signe

Re: [PATCH] tools/nolibc: add support for openat(2)

2025-03-03 Thread Louis Taylor
On Sun Mar 2, 2025 at 10:24 PM GMT, Thomas Weißschuh wrote: > Hi Louis, > > On 2025-03-02 20:25:23+, Louis Taylor wrote: > > openat is useful to avoid needing to construct relative paths, so expose > > a wrapper for using it directly. > > Can you say what you are using nolibc for? I'm curious :

Re: [PATCH] vhost: fix VHOST_*_OWNER documentation

2025-03-03 Thread Eugenio Perez Martin
On Mon, Mar 3, 2025 at 9:52 AM Stefano Garzarella wrote: > > VHOST_OWNER_SET and VHOST_OWNER_RESET are used in the documentation > instead of VHOST_SET_OWNER and VHOST_RESET_OWNER respectively. > > To avoid confusion, let's use the right names in the documentation. > No change to the API, only the

Re: [PATCH] tools/nolibc: add support for openat(2)

2025-03-03 Thread Louis Taylor
On Mon Mar 3, 2025 at 8:49 AM GMT, Louis Taylor wrote: > > > +} > > > + > > > +static __attribute__((unused)) > > > +int openat(int dirfd, const char *path, int flags, ...) > > > +{ > > > + mode_t mode = 0; > > > + > > > + if (flags & O_CREAT) { > > > + va_list args; > > > + > > > +

Re: [PATCH v3 03/10] selftests/mm: Skip uffd-wp-mremap if userfaultfd not available

2025-03-03 Thread Brendan Jackman
On Fri, Feb 28, 2025 at 10:55:00PM +0530, Dev Jain wrote: > > > On 28/02/25 10:24 pm, Brendan Jackman wrote: > > It's obvious that this should fail in that case, but still, save the > > reader the effort of figuring out that they've run into this by just > > SKIPping > > > > Signed-off-by: Brend

Re: [PATCH v3 04/10] selftests/mm/uffd: Rename nr_cpus -> nr_threads

2025-03-03 Thread Dev Jain
On 03/03/25 4:04 pm, Brendan Jackman wrote: On Mon, Mar 03, 2025 at 03:48:38PM +0530, Dev Jain wrote: On 03/03/25 3:17 pm, Brendan Jackman wrote: On Fri, Feb 28, 2025 at 11:06:35PM +0530, Dev Jain wrote: Taking a cursory look at the test, it creates three threads for each cpu. The boundin

[PATCH v1] remoteproc: Add device awake calls in rproc boot and shutdown path

2025-03-03 Thread Souradeep Chowdhury
Add device awake calls in case of rproc boot and rproc shutdown path. Currently, device awake call is only present in the recovery path of remoteproc. If a user stops and starts rproc by using the sysfs interface, then on pm suspension the firmware loading fails. Keep the device awake in such a cas

Re: [PATCH v7 8/8] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-03-03 Thread Stefano Garzarella
On Mon, Mar 03, 2025 at 01:52:06PM +0800, Jason Wang wrote: On Sun, Mar 2, 2025 at 10:34 PM Cindy Lu wrote: Introduce a new config knob `CONFIG_VHOST_ENABLE_FORK_OWNER_IOCTL`, to control the availability of the `VHOST_FORK_FROM_OWNER` ioctl. When CONFIG_VHOST_ENABLE_FORK_OWNER_IOCTL is set to

Re: [PATCH V5 1/4] x86/paravirt: Move halt paravirt calls under CONFIG_PARAVIRT

2025-03-03 Thread Jürgen Groß
On 28.02.25 22:47, Konrad Rzeszutek Wilk wrote: On Thu, Feb 20, 2025 at 09:16:25PM +, Vishal Annapurve wrote: From: "Kirill A. Shutemov" CONFIG_PARAVIRT_XXL is mainly defined/used by XEN PV guests. For other VM guest types, features supported under CONFIG_PARAVIRT are self sufficient. CONF

Re: [PATCH v3 04/10] selftests/mm/uffd: Rename nr_cpus -> nr_threads

2025-03-03 Thread Brendan Jackman
On Fri, Feb 28, 2025 at 11:06:35PM +0530, Dev Jain wrote: > Taking a cursory look at the test, it creates three threads for each cpu. > The bounding of the variable is fine but that being the reason to rename the > variable is not making sense to me. Hmm yeah the name needs to be more abstract. Do

Re: [PATCH v3 04/10] selftests/mm/uffd: Rename nr_cpus -> nr_threads

2025-03-03 Thread Dev Jain
On 03/03/25 3:17 pm, Brendan Jackman wrote: On Fri, Feb 28, 2025 at 11:06:35PM +0530, Dev Jain wrote: Taking a cursory look at the test, it creates three threads for each cpu. The bounding of the variable is fine but that being the reason to rename the variable is not making sense to me. Hm

Re: [PATCH v3 04/10] selftests/mm/uffd: Rename nr_cpus -> nr_threads

2025-03-03 Thread Brendan Jackman
On Mon, Mar 03, 2025 at 03:48:38PM +0530, Dev Jain wrote: > > > On 03/03/25 3:17 pm, Brendan Jackman wrote: > > On Fri, Feb 28, 2025 at 11:06:35PM +0530, Dev Jain wrote: > > > Taking a cursory look at the test, it creates three threads for each cpu. > > > The bounding of the variable is fine but

[PATCH v7 3/6] syscall.h: introduce syscall_set_nr()

2025-03-03 Thread Dmitry V. Levin
Similar to syscall_set_arguments() that complements syscall_get_arguments(), introduce syscall_set_nr() that complements syscall_get_nr(). syscall_set_nr() is going to be needed along with syscall_set_arguments() on all HAVE_ARCH_TRACEHOOK architectures to implement PTRACE_SET_SYSCALL_INFO API. S

Re: [PATCH v2] x86/paravirt: Remove unused paravirt_disable_iospace

2025-03-03 Thread Jürgen Groß
On 03.03.25 01:44, li...@treblig.org wrote: From: "Dr. David Alan Gilbert" The last use of paravirt_disable_iospace() was removed in 2015 by commit d1c29465b8a5 ("lguest: don't disable iospace.") Remove it. Note the comment above it about 'entry.S' is unrelated to this but stayed when interve

[v3 PATCH 1/2] KVM: guest_memfd: add generic population via write

2025-03-03 Thread Nikita Kalyazin
write syscall populates guest_memfd with user-supplied data in a generic way, ie no vendor-specific preparation is performed. This is supposed to be used in non-CoCo setups where guest memory is not hardware-encrypted. The following behaviour is implemented: - only page-aligned count and offset

[v3 PATCH 0/2] KVM: guest_memfd: use write for population

2025-03-03 Thread Nikita Kalyazin
This series is rebased on top of Fuad's v4 for shared mapping of guest_memfd [1]. Change since v2 [2]: - David/Mike D: Only compile support for the write syscall if CONFIG_KVM_GMEM_SHARED_MEM introduced in [1] is enabled. In non-CoCo use cases where the host can access guest memory, guest_mem

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

2025-03-03 Thread Sabrina Dubroca
Hello, a few minor coding style nits on this patch. 2025-02-27, 02:21:40 +0100, Antonio Quartulli wrote: > @@ -197,9 +254,16 @@ static int ovpn_netdev_notifier_call(struct > notifier_block *nb, > netif_carrier_off(dev); > ovpn->registered = false; > > - i

[v3 PATCH 2/2] KVM: selftests: update guest_memfd write tests

2025-03-03 Thread Nikita Kalyazin
This is to reflect that the write syscall is now implemented for guest_memfd. Signed-off-by: Nikita Kalyazin --- .../testing/selftests/kvm/guest_memfd_test.c | 85 +-- 1 file changed, 79 insertions(+), 6 deletions(-) diff --git a/tools/testing/selftests/kvm/guest_memfd_test.c

[RFC PATCH 5/5] KVM: selftests: add uffd missing test for guest_memfd

2025-03-03 Thread Nikita Kalyazin
The test demonstrates how a page missing event can be resolved via write syscall followed by UFFDIO_CONTINUE ioctl. Signed-off-by: Nikita Kalyazin --- .../testing/selftests/kvm/guest_memfd_test.c | 88 +++ 1 file changed, 88 insertions(+) diff --git a/tools/testing/selftests/kv

Re: [PATCH] virtio: console: Make resizing compliant with virtio spec

2025-03-03 Thread Amit Shah
On Tue, 2025-02-25 at 10:21 +0100, Maximilian Immanuel Brandtner wrote: > According to the virtio spec[0] the virtio console resize struct > defines > cols before rows. In the kernel implementation it is the other way > around > resulting in the two properties being switched. Not true, see below.

[RFC PATCH 0/5] KVM: guest_memfd: support for uffd missing

2025-03-03 Thread Nikita Kalyazin
This series is built on top of the v3 write syscall support [1]. With James's KVM userfault [2], it is possible to handle stage-2 faults in guest_memfd in userspace. However, KVM itself also triggers faults in guest_memfd in some cases, for example: PV interfaces like kvmclock, PV EOI and page ta

[RFC PATCH 1/5] KVM: guest_memfd: add kvm_gmem_vma_is_gmem

2025-03-03 Thread Nikita Kalyazin
It will be used to distinguish the vma type in userfaultfd code. This likely needs to be done in the guestmem library. Signed-off-by: Nikita Kalyazin --- virt/kvm/guest_memfd.c | 5 + virt/kvm/kvm_mm.h | 1 + 2 files changed, 6 insertions(+) diff --git a/virt/kvm/guest_memfd.c b/virt/k

[RFC PATCH 2/5] KVM: guest_memfd: add support for uffd missing

2025-03-03 Thread Nikita Kalyazin
Add support for sending a pagefault event if userfaultfd is registered. Only page missing event is currently supported. Signed-off-by: Nikita Kalyazin --- virt/kvm/guest_memfd.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/gue

[RFC PATCH 3/5] mm: userfaultfd: allow to register userfaultfd for guest_memfd

2025-03-03 Thread Nikita Kalyazin
Signed-off-by: Nikita Kalyazin --- include/linux/userfaultfd_k.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/userfaultfd_k.h b/include/linux/userfaultfd_k.h index 75342022d144..440d38903359 100644 --- a/include/linux/userfaultfd_k.h +++ b/include/linux/userfaultfd_k

[RFC PATCH 4/5] mm: userfaultfd: support continue for guest_memfd

2025-03-03 Thread Nikita Kalyazin
When userspace receives a page missing event, it is supposed to populate the missing page in guest_memfd pagecache via the write syscall and unblock the faulting process via UFFDIO_CONTINUE. Signed-off-by: Nikita Kalyazin --- mm/userfaultfd.c | 23 ++- 1 file changed, 22 inse

[PATCH v3 04/10] selftests/mm/uffd: Rename nr_cpus -> nr_threads

2025-03-03 Thread Brendan Jackman
A later commit will bound this variable so it no longer necessarily matches the number of CPUs. Rename it appropriately. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-common.c | 8 tools/testing/selftests/mm/uffd-common.h | 2 +- tools/testing/selftests/mm

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

2025-03-03 Thread Boqun Feng
and have Boqun take it? > Which "-next" are you talking about? The original patch and the fix is already in next-20250303 of linux-next: https://web.git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/log/?h=next-20250303&qt=range&q=153fc45000e0058435ec0609258f

Re: [PATCH v7 8/8] vhost: Add a KConfig knob to enable IOCTL VHOST_FORK_FROM_OWNER

2025-03-03 Thread Michael S. Tsirkin
On Mon, Mar 03, 2025 at 01:52:06PM +0800, Jason Wang wrote: > On Sun, Mar 2, 2025 at 10:34 PM Cindy Lu wrote: > > > > Introduce a new config knob `CONFIG_VHOST_ENABLE_FORK_OWNER_IOCTL`, > > to control the availability of the `VHOST_FORK_FROM_OWNER` ioctl. > > When CONFIG_VHOST_ENABLE_FORK_OWNER_IO

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

2025-03-03 Thread Joel Fernandes
art >>> detection" is not yet on -next. Once we are convinced about the fix, do we >>> want to squash the fix into this patch and have Boqun take it? >>> >> >> Which "-next" are you talking about? The original patch and the fix is >> already

Re: [PATCH net-next v1 2/2] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Miquel Raynal
Hi Andy, > @@ -350,8 +348,8 @@ struct work_priv_container { > * @extclockenable: true if the external clock is to be enabled > * @extclockfreq: frequency of the external clock > * @extclockgpio: ca8210 output gpio of the external clock > - * @gpio_reset: gpio number of ca8210 reset l

Re: [PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Andy Shevchenko
Mon, Mar 03, 2025 at 09:00:39PM +0100, Linus Walleij kirjoitti: > On Mon, Mar 3, 2025 at 5:49 PM Andy Shevchenko > wrote: ... > > reinit_completion(&priv->ca8210_is_awake); > > msleep(ms); > > - gpio_set_value(pdata->gpio_reset, 1); > > + gpiod_set_value(pdata->reset_

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

2025-03-03 Thread Joel Fernandes
On 3/3/2025 1:55 PM, Paul E. McKenney wrote: >> I tried the following command and it shows the patch in question in the first >> line of output. Basically the question that the command asks is "What is in >> Paul's dev branch that is not in RCU tree's -next branch". This question is >> asked fo

Re: [PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Linus Walleij
On Mon, Mar 3, 2025 at 5:49 PM Andy Shevchenko wrote: > This updates the driver to gpiod API, and removes yet another use of > of_get_named_gpio(). > > Signed-off-by: Andy Shevchenko Reviewed-by: Linus Walleij But note: > @@ -632,10 +630,10 @@ static void ca8210_reset_send(struct spi_device

Re: [PATCH bpf-next v4 2/6] net: tun: enable transfer of XDP metadata to skb

2025-03-03 Thread Martin KaFai Lau
On 3/3/25 8:13 AM, Marcus Wichelmann wrote: Am 28.02.25 um 20:49 schrieb Martin KaFai Lau: On 2/27/25 6:23 AM, Marcus Wichelmann wrote: When the XDP metadata area was used, it is expected that the same metadata can also be accessed from TC, as can be read in the description of the bpf_xdp_adjus

Re: [PATCH 3/3] rcu/exp: Remove needless CPU up quiescent state report

2025-03-03 Thread Paul E. McKenney
On Fri, Feb 14, 2025 at 12:25:59AM +0100, Frederic Weisbecker wrote: > A CPU coming online checks for an ongoing grace period and reports > a quiescent state accordingly if needed. This special treatment that > shortcuts the expedited IPI finds its origin as an optimization purpose > on the followi

Re: [PATCH net-next v2 1/3] ieee802154: ca8210: Use proper setter and getters for bitwise types

2025-03-03 Thread Linus Walleij
On Mon, Mar 3, 2025 at 5:49 PM Andy Shevchenko wrote: > Sparse complains that the driver doesn't respect the bitwise types: > > drivers/net/ieee802154/ca8210.c:1796:27: warning: incorrect type in > assignment (different base types) > drivers/net/ieee802154/ca8210.c:1796:27:expected restricte

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

2025-03-03 Thread Frank Li
On Sat, Mar 01, 2025 at 11:10:35AM +, Marc Zyngier wrote: > On Tue, 11 Feb 2025 19:21:55 +, > Frank Li wrote: > > > > 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

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

2025-03-03 Thread Joe Damato
On Fri, Feb 28, 2025 at 06:27:59PM -0800, Jakub Kicinski wrote: > On Thu, 27 Feb 2025 18:50:13 + Joe Damato wrote: > > @@ -2870,9 +2883,15 @@ static void refill_work(struct work_struct *work) > > for (i = 0; i < vi->curr_queue_pairs; i++) { > > struct receive_queue *rq = &vi->rq

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

2025-03-03 Thread Jakub Kicinski
On Mon, 3 Mar 2025 13:33:10 -0500 Joe Damato wrote: > > > @@ -2880,6 +2880,13 @@ static void refill_work(struct work_struct *work) > > > bool still_empty; > > > int i; > > > > > > + spin_lock(&vi->refill_lock); > > > + if (!vi->refill_enabled) { > > > + sp

[PATCH v21 13/24] ovpn: add support for MSG_NOSIGNAL in tcp_sendmsg

2025-03-03 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 v21 15/24] ovpn: implement peer lookup logic

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

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

[PATCH v21 18/24] ovpn: add support for peer floating

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

[PATCH v21 23/24] ovpn: add basic ethtool support

2025-03-03 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 v21 20/24] ovpn: implement key add/get/del/swap via netlink

2025-03-03 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 v21 06/24] ovpn: introduce the ovpn_socket object

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

[PATCH v21 21/24] ovpn: kill key and notify userspace in case of IV exhaustion

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

[PATCH v21 22/24] ovpn: notify userspace when a peer is deleted

2025-03-03 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 v21 11/24] ovpn: implement TCP transport

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

[PATCH v21 10/24] ovpn: store tunnel and transport statistics

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

[PATCH v2 0/4] RISC-V KVM PMU fix and selftest improvement

2025-03-03 Thread Atish Patra
This series adds a fix for KVM PMU code and improves the pmu selftest by allowing generating precise number of interrupts. It also provided another additional option to the overflow test that allows user to generate custom number of LCOFI interrupts. Signed-off-by: Atish Patra --- Changes in v2:

[PATCH v2 2/4] KVM: riscv: selftests: Do not start the counter in the overflow handler

2025-03-03 Thread Atish Patra
There is no need to start the counter in the overflow handler as we intend to trigger precise number of LCOFI interrupts through these tests. The overflow irq handler has already stopped the counter. As a result, the stop call from the test function may return already stopped error which is fine as

Re: [PATCH net-next v2 3/3] ieee802154: ca8210: Switch to using gpiod API

2025-03-03 Thread Linus Walleij
On Mon, Mar 3, 2025 at 9:39 PM Andy Shevchenko wrote: > > Maybe add a comment in the code that this is wrong and the > > driver and DTS files should be fixed. > > Or maybe fix in the driver and schema and add a quirk to gpiolib-of.c? Even better! Yours, Linus Walleij

[PATCH v21 02/24] ovpn: add basic netlink support

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

2025-03-03 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 v21 04/24] ovpn: keep carrier always on for MP interfaces

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

[PATCH v21 00/24] Introducing OpenVPN Data Channel Offload

2025-03-03 Thread Antonio Quartulli
Notable changes since v20: * removed newline at the end of message in NL_SET_ERR_MSG_FMT_MOD * dropped udp_init() and related build_protos() and directly use .encap_destroy [instead of overriding sk->close()] * defered peer_del() call to worker in case of transport errors, as we may be in non-s

[PATCH v21 01/24] net: introduce OpenVPN Data Channel Offload (ovpn)

2025-03-03 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 v21 05/24] ovpn: introduce the ovpn_peer object

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

2025-03-03 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 v21 07/24] ovpn: implement basic TX path (UDP)

2025-03-03 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 v21 09/24] ovpn: implement packet processing

2025-03-03 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 v21 14/24] ovpn: implement multi-peer support

2025-03-03 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 v21 12/24] skb: implement skb_send_sock_locked_with_flags()

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

[PATCH v21 16/24] ovpn: implement keepalive mechanism

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

[PATCH v21 19/24] ovpn: implement peer add/get/dump/delete via netlink

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

  1   2   >