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

2025-01-17 Thread Jakub Kicinski
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, 0) TH_LOG("CONFIG_NET_PKTGEN not enabled, > module pktgen nod loaded?"); nod

Re: [PATCH net v2 1/5] vsock/virtio: discard packets if the transport changes

2025-01-17 Thread Michal Luczaj
nimal and, well, keeps the binding. Mixes well with the connect() behaviour fix. Let me know what you think: https://lore.kernel.org/netdev/20250117-vsock-transport-vs-autobind-v1-0-c802c8037...@rbox.co/ Thanks, Michal

[for-next][PATCH 3/3] selftests/ftrace: Add test that tests event :mod: commands

2025-01-17 Thread Steven Rostedt
From: Steven Rostedt Now that here's a :mod: command that can be sent into set_event, add a test that tests its use. Both setting events for a loaded module, as well as caching what events to set for a module that is not loaded yet. Cc: Shuah Khan Cc: Masami Hiramatsu Cc: Mark Rutland Cc: Mat

Re: [PATCH] sev-snp: parse MP tables for VMware hypervisor

2025-01-17 Thread Kevin Loughlin
On Thu, Jan 2, 2025 at 8:31 PM Ajay Kaher wrote: > > On Thu, Dec 26, 2024 at 9:26 PM Kevin Loughlin > wrote: > > > > On Thu, Dec 19, 2024 at 6:44 AM Ajay Kaher wrote: > > > > > > For VMware hypervisor, SEV-SNP enabled VM's could boot without UEFI. > > > In this case, mpparse_find_mptable() has

[PATCH v4] hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING

2025-01-17 Thread Frederic Weisbecker
hrtimers are migrated away from the dying CPU to any online target at the CPUHP_AP_HRTIMERS_DYING stage in order not to delay bandwidth timers handling tasks involved in the CPU hotplug forward progress. However wake ups can still be performed by the outgoing CPU after CPUHP_AP_HRTIMERS_DYING. Tho

Re: [PATCH net-next v18 09/25] ovpn: implement packet processing

2025-01-17 Thread Sabrina Dubroca
2025-01-13, 10:31:28 +0100, Antonio Quartulli wrote: > static bool ovpn_encrypt_one(struct ovpn_peer *peer, struct sk_buff *skb) > { > - ovpn_skb_cb(skb)->peer = peer; > + struct ovpn_crypto_key_slot *ks; > + > + if (unlikely(skb->ip_summed == CHECKSUM_PARTIAL && > +

Re: [PATCH net-next v18 05/25] ovpn: introduce the ovpn_peer object

2025-01-17 Thread Sabrina Dubroca
2025-01-13, 10:31:24 +0100, Antonio Quartulli wrote: > +static void ovpn_peer_release(struct ovpn_peer *peer) > +{ > + ovpn_bind_reset(peer, NULL); > + netdev_put(peer->ovpn->dev, &peer->dev_tracker); I think this needs to move after the call_rcu. Otherwise, module unload could proceed (no

Re: [PATCH net-next v18 09/25] ovpn: implement packet processing

2025-01-17 Thread Antonio Quartulli
On 17/01/2025 13:16, Sabrina Dubroca wrote: 2025-01-13, 10:31:28 +0100, Antonio Quartulli wrote: static bool ovpn_encrypt_one(struct ovpn_peer *peer, struct sk_buff *skb) { - ovpn_skb_cb(skb)->peer = peer; + struct ovpn_crypto_key_slot *ks; + + if (unlikely(skb->ip_summed =

Re: [PATCH net-next v18 05/25] ovpn: introduce the ovpn_peer object

2025-01-17 Thread Antonio Quartulli
On 17/01/2025 12:58, Sabrina Dubroca wrote: 2025-01-13, 10:31:24 +0100, Antonio Quartulli wrote: +static void ovpn_peer_release(struct ovpn_peer *peer) +{ + ovpn_bind_reset(peer, NULL); + netdev_put(peer->ovpn->dev, &peer->dev_tracker); I think this needs to move after the call_rcu

Re: [PATCH v1] selftests/landlock: Fix build with non-default pthread linking

2025-01-17 Thread Günther Noack
On Wed, Jan 15, 2025 at 03:54:07PM +0100, Mickaël Salaün wrote: > Old toolchains require explicit -lpthread (e.g. on Debian 11). > > Cc: Günther Noack > Cc: Nathan Chancellor > Cc: Tahera Fahimi > Fixes: c8994965013e ("selftests/landlock: Test signal scoping for threads") > Signed-off-by: Micka

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

2025-01-17 Thread Antonio Quartulli
On 17/01/2025 12:48, Sabrina Dubroca wrote: 2025-01-13, 10:31:39 +0100, Antonio Quartulli wrote: int ovpn_nl_peer_new_doit(struct sk_buff *skb, struct genl_info *info) { - return -EOPNOTSUPP; + struct nlattr *attrs[OVPN_A_PEER_MAX + 1]; + struct ovpn_priv *ovpn = info->user

Re: [PATCH 1/3 v3] hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING

2025-01-17 Thread Frederic Weisbecker
Le Thu, Jan 16, 2025 at 11:59:48AM +0100, Thomas Gleixner a écrit : > On Tue, Dec 31 2024 at 18:07, Frederic Weisbecker wrote: > > hrtimers are migrated away from the dying CPU to any online target at > > the CPUHP_AP_HRTIMERS_DYING stage in order not to delay bandwidth timers > > handling tasks in

[GIT PULL] slab updates for 6.14

2025-01-17 Thread Vlastimil Babka
Hi Linus, please pull the latest slab updates from: git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-6.14 There's a small conflict with the mm tree: https://lore.kernel.org/all/20241216152721.15c58...@canb.auug.org.au/ Thanks, Vlastimil ===

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

2025-01-17 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 v1 1/5] net: pktgen: replace ENOTSUPP with EOPNOTSUPP

2025-01-17 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 --- net/core/pktgen.c | 6 +++--- 1 fil

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

2025-01-17 Thread Peter Seiderer
Fix compile on openSUSE Tumbleweed (gcc-14.2.1, glibc-2.40): - add missing sys/mount.h include Fixes: pidfd_fdinfo_test.c: In function ‘child_fdinfo_nspid_test’: pidfd_fdinfo_test.c:230:13: error: implicit declaration of function ‘mount’ [-Wimplicit-function-declaration] 230 |

[PATCH net-next v1 4/5] net: pktgen: fix access outside of user given buffer in pktgen_if_write()

2025-01-17 Thread Peter Seiderer
Honour the user given buffer size for the hex32_arg(), num_arg() and strn_len() calls (otherwise they will access memory outside of the user given buffer). In all three functions error out in case no characters a available (maxlen = 0), in num_arg() additional error out in case no valid character

[PATCH net-next v1 0/5] Some pktgen fixes/improvments

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

[PATCH net-next v1 3/5] net: pktgen: fix access outside of user given buffer in pktgen_thread_write()

2025-01-17 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 --- net/core/pktgen.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/core/pktgen.c b/net/core/pktge

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

2025-01-17 Thread Peter Seiderer
Add some test for /proc/net/pktgen/... interface. Signed-off-by: Peter Seiderer --- tools/testing/selftests/net/Makefile | 1 + tools/testing/selftests/net/proc_net_pktgen.c | 575 ++ 2 files changed, 576 insertions(+) create mode 100644 tools/testing/selftests/net/pr

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

2025-01-17 Thread Peter Seiderer
Please ignore this e-mail (re-send by mistake of [1])..., sorry for the noise... Regards, Peter [1] https://lore.kernel.org/linux-kselftest/20250115105211.390370-1-ps.rep...@gmx.net/ On Fri, 17 Jan 2025 15:14:48 +0100, Peter Seiderer wrote: > Fix compile on openSUSE Tumbleweed (gcc-14.2.1, g

Re: [PATCH 1/3 v3] hrtimers: Force migrate away hrtimers queued after CPUHP_AP_HRTIMERS_DYING

2025-01-17 Thread Thomas Gleixner
On Fri, Jan 17 2025 at 15:11, Frederic Weisbecker wrote: > Le Thu, Jan 16, 2025 at 11:59:48AM +0100, Thomas Gleixner a écrit : >> > + if (enqueue_hrtimer(timer, new_base, mode)) >> > + smp_call_function_single_async(cpu, &new_cpu_base->csd); >> >> Duh. This reimplementation of switch_hrt

Re: [PATCH] vhost/scsi: Fix improper cleanup in vhost_scsi_set_endpoint()

2025-01-17 Thread Mike Christie
On 1/17/25 10:50 AM, Mike Christie wrote: >> You are welcome. There is another bug I was about to report, but I'm not >> sure whether I should create a new thread. I feel that the original design >> of dynamically allocating new vs_tpgs in vhost_scsi_set_endpoint is not >> intuitive, and copying TP

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

2025-01-17 Thread Sabrina Dubroca
2025-01-17, 13:59:35 +0100, Antonio Quartulli wrote: > On 17/01/2025 12:48, Sabrina Dubroca wrote: > > 2025-01-13, 10:31:39 +0100, Antonio Quartulli wrote: > > > int ovpn_nl_peer_new_doit(struct sk_buff *skb, struct genl_info *info) > > > { > > > - return -EOPNOTSUPP; > > > + struct nlattr *att

[GIT PULL] RCU changes for v6.14

2025-01-17 Thread Uladzislau Rezki (Sony)
Hi Linus, 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 # HEAD: 4b5c2205526cc1579b840893b98eb7545220f7cf: Merge branches 'fixes.2024.12.14a', 'rcutorture.2024.12.14a', 'srcu.2024.12.14a' and 'torture-test.2024.12.1

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

2025-01-17 Thread Sabrina Dubroca
2025-01-13, 10:31:31 +0100, Antonio Quartulli wrote: > +static int ovpn_tcp_recvmsg(struct sock *sk, struct msghdr *msg, size_t len, > + int flags, int *addr_len) > +{ > + int err = 0, off, copied = 0, ret; > + struct ovpn_socket *sock; > + struct ovpn_peer *peer

Re: [PATCH] sev-snp: parse MP tables for VMware hypervisor

2025-01-17 Thread Ajay Kaher
On Fri, Jan 3, 2025 at 10:01 AM Ajay Kaher wrote: > > > For VMware hypervisor, SEV-SNP enabled VM's could boot without UEFI. > > > In this case, mpparse_find_mptable() has to be called to parse MP > > > tables which contains boot information. > > > > > > Fixes: 0f4a1e80989a ("x86/sev: Skip ROM ran

Re: [PATCH] vhost/scsi: Fix improper cleanup in vhost_scsi_set_endpoint()

2025-01-17 Thread Mike Christie
On 1/17/25 5:42 AM, Haoran Zhang wrote: >> I see now and can replicate it. I think there is a 2nd bug in >> vhost_scsi_set_endpoint related to all this where we need to >> prevent switching targets like this or else we'll leak some >> other refcounts. If 500140501e23be28's tpg number was 3 then >>

Re: Re: [PATCH] vhost/scsi: Fix improper cleanup in vhost_scsi_set_endpoint()

2025-01-17 Thread Haoran Zhang
> I see now and can replicate it. I think there is a 2nd bug in > vhost_scsi_set_endpoint related to all this where we need to > prevent switching targets like this or else we'll leak some > other refcounts. If 500140501e23be28's tpg number was 3 then > we would overwrite the existing vs->vs_vhost_

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

2025-01-17 Thread Sabrina Dubroca
2025-01-13, 10:31:39 +0100, Antonio Quartulli wrote: > int ovpn_nl_peer_new_doit(struct sk_buff *skb, struct genl_info *info) > { > - return -EOPNOTSUPP; > + struct nlattr *attrs[OVPN_A_PEER_MAX + 1]; > + struct ovpn_priv *ovpn = info->user_ptr[0]; > + struct ovpn_socket *ovpn_soc

Re: [PATCH 6/6] selftests/nolibc: add configurations for riscv32

2025-01-17 Thread Charlie Jenkins
On Sat, Dec 21, 2024 at 03:44:33PM +0100, Thomas Weißschuh wrote: > nolibc already supports riscv32. Wire it up in the testsuite. Good addition! Reviewed-by: Charlie Jenkins Tested-by: Charlie Jenkins > > Signed-off-by: Thomas Weißschuh > --- > tools/testing/selftests/nolibc/Makefile |

Re: [PATCH 5/6] selftests/nolibc: rename riscv to riscv64

2025-01-17 Thread Charlie Jenkins
On Sat, Dec 21, 2024 at 03:44:32PM +0100, Thomas Weißschuh wrote: > riscv32 support is about the be added. To keep the naming clear and > consistent with other architectures rename riscv to riscv64, as that is > what it actually represents. Seems like a reasonable change. Reviewed-by: Charlie Jen