Re: [PATCH] selftests: hugetlb_dio: Fixup Check for initial conditions to skip in the start

2024-11-10 Thread Andrew Morton
On Sun, 10 Nov 2024 12:22:12 +0530 Donet Tom wrote: > > Fixes: 0268d4579901 ("selftests: hugetlb_dio: check for initial conditions > > to skip in the start") > > ... > > Would you prefer I send this fixup patch as a new series, or is it okay as is? All looks good, thanks. I added cc:stable, be

[PATCH] ipvs: fix UB due to uninitialized stack access in ip_vs_protocol_init()

2024-11-10 Thread Jinghao Jia
Under certain kernel configurations when building with Clang/LLVM, the compiler does not generate a return or jump as the terminator instruction for ip_vs_protocol_init(), triggering the following objtool warning during build time: vmlinux.o: warning: objtool: ip_vs_protocol_init() falls through

Re: [PATCH] selftest: drivers: Add support to check duplicate hwirq

2024-11-10 Thread Joseph Jang
On 2024/10/19 3:34 AM, Bjorn Helgaas wrote: On Tue, Sep 03, 2024 at 06:44:26PM -0700, Joseph Jang wrote: Validate there are no duplicate hwirq from the irq debug file system /sys/kernel/debug/irq/irqs/* per chip name. One example log show 2 duplicated hwirq in the irq debug file system. $ s

Re: [PATCH net 0/4] virtio_net: Make RSS interact properly with queue number

2024-11-10 Thread Jason Wang
On Wed, Nov 6, 2024 at 5:00 PM Xuan Zhuo wrote: > > Hi Jason, could you review this firstly? > > Thanks. > It looks like the series has been merged. Anyhow it looks good to me. Thanks

[PATCHv2 net-next] selftests: wireguards: use nft by default

2024-11-10 Thread Hangbin Liu
Use nft by default if it's supported, as nft is the replacement for iptables, which is used by default in some releases. Additionally, iptables is dropped in some releases. Signed-off-by: Hangbin Liu --- v2: use one nft table for testing (Phil Sutter) --- tools/testing/selftests/wireguard/netns.

Re: [PATCH] vhost/net: Set num_buffers for virtio 1.0

2024-11-10 Thread Jason Wang
On Wed, Nov 6, 2024 at 4:54 PM Michael S. Tsirkin wrote: > > On Sun, Sep 15, 2024 at 10:35:53AM +0900, Akihiko Odaki wrote: > > The specification says the device MUST set num_buffers to 1 if > > VIRTIO_NET_F_MRG_RXBUF has not been negotiated. > > > > Fixes: 41e3e42108bc ("vhost/net: enable virtio

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

2024-11-10 Thread Sergey Ryazanov
On 29.10.2024 12:47, Antonio Quartulli wrote: 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-of

Re: [PATCH net-next v7] ipv6: Fix soft lockups in fib6_select_path under high next hop churn

2024-11-10 Thread David Ahern
On 11/5/24 6:02 PM, Omid Ehtemam-Haghighi wrote: > Soft lockups have been observed on a cluster of Linux-based edge routers > located in a highly dynamic environment. Using the `bird` service, these > routers continuously update BGP-advertised routes due to frequently > changing nexthop destination

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-10 Thread Xuan Zhuo
On Mon, 11 Nov 2024 10:55:38 +0800, Jason Wang wrote: > There's no need to sync DMA for CPU on mapping errors. So this patch > skips the CPU sync in the error handling path of DMA mapping. > > Signed-off-by: Jason Wang Reviewed-by: Xuan Zhuo > --- > drivers/virtio/virtio_ring.c | 98

[PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-10 Thread Jason Wang
There's no need to sync DMA for CPU on mapping errors. So this patch skips the CPU sync in the error handling path of DMA mapping. Signed-off-by: Jason Wang --- drivers/virtio/virtio_ring.c | 98 +--- 1 file changed, 57 insertions(+), 41 deletions(-) diff --git a

[PATCH v2 3/3] kunit: qemu_configs: loongarch: Enable shutdown

2024-11-10 Thread Thomas Weißschuh
QEMU for LoongArch does not yet support shutdown/restart through ACPI. Use the pvpanic driver to enable shutdowns. This requires 9.1.0 for shutdown support in pvpanic, but that is the requirement of kunit on LoongArch anyways. Signed-off-by: Thomas Weißschuh Reviewed-by: Bibo Mao Reviewed-by: Da

[PATCH v2 0/3] kunit: Add support for LoongArch

2024-11-10 Thread Thomas Weißschuh
Enable LoongArch support in kunit. Example: $ ./tools/testing/kunit/kunit.py run --arch=loongarch --cross_compile=$CROSS_COMPILE [13:32:45] Configuring KUnit Kernel ... [13:32:45] Building KUnit Kernel ... Populating config with: $ make ARCH=loongarch oldd

[PATCH v2 1/3] kunit: qemu_configs: Add LoongArch config

2024-11-10 Thread Thomas Weißschuh
Add a basic config to run kunit tests on LoongArch. This requires QEMU 9.1.0 or later for the necessary direct kernel boot support. Signed-off-by: Thomas Weißschuh Reviewed-by: Bibo Mao Reviewed-by: David Gow --- tools/testing/kunit/qemu_configs/loongarch.py | 18 ++ 1 file cha

[PATCH v2 2/3] kunit: tool: Allow overriding the shutdown mode from qemu config

2024-11-10 Thread Thomas Weißschuh
Not all platforms support machine reboot. If it a proper reboot is not supported the machine will hang. Allow the QEMU configuration to override the necessary shutdown mode for the specific system under test. Signed-off-by: Thomas Weißschuh Reviewed-by: David Gow --- tools/testing/kunit/kunit_k

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-10 Thread Michael S. Tsirkin
On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > There's no need to sync DMA for CPU on mapping errors. So this patch > skips the CPU sync in the error handling path of DMA mapping. > > Signed-off-by: Jason Wang DMA sync is idempotent. Extra work for slow path. Why do we bother? >

Re: [PATCH 2/2] rcu/nocb: Fix missed RCU barrier on deoffloading

2024-11-10 Thread Neeraj Upadhyay
> diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h > index 16865475120b..2605dd234a13 100644 > --- a/kernel/rcu/tree_nocb.h > +++ b/kernel/rcu/tree_nocb.h > @@ -891,7 +891,18 @@ static void nocb_cb_wait(struct rcu_data *rdp) > swait_event_interruptible_exclusive(rdp->nocb_cb_wq,

Re: [syzbot] [acpi?] [nvdimm?] KASAN: vmalloc-out-of-bounds Read in acpi_nfit_ctl (2)

2024-11-10 Thread Suraj Sonawane
#syz test On Tue, Nov 5, 2024 at 8:58 PM syzbot < syzbot+7534f060ebda6b8b5...@syzkaller.appspotmail.com> wrote: > Hello, > > syzbot found the following issue on: > > HEAD commit:2e1b3cc9d7f7 Merge tag 'arm-fixes-6.12-2' of > git://git.ker.. > git tree: upstream > console output: https:/

Re: [syzbot] [acpi?] [nvdimm?] KASAN: vmalloc-out-of-bounds Read in acpi_nfit_ctl (2)

2024-11-10 Thread syzbot
Hello, syzbot has tested the proposed patch and the reproducer did not trigger any issue: Reported-by: syzbot+7534f060ebda6b8b5...@syzkaller.appspotmail.com Tested-by: syzbot+7534f060ebda6b8b5...@syzkaller.appspotmail.com Tested on: commit: de2f378f Merge tag 'nfsd-6.12-4' of git://git

[PATCH] kmod: verify module name before invoking modprobe

2024-11-10 Thread Song Chen
Sometimes when kernel calls request_module to load a module into kernel space, it doesn't pass the module name appropriately, and request_module doesn't verify it as well. As a result, modprobe is invoked anyway and spend a lot of time searching a nonsense name. For example reported from a custom

[PATCH v2] rcu: Remove READ_ONCE() for rdp->gpwrap access in __note_gp_changes()

2024-11-10 Thread Zilin Guan
There is one access to rdp->gpwrap in the __note_gp_changes() function that does not use READ_ONCE() for protection, while other accesses to rdp->gpwrap do use READ_ONCE(). When using the 8*TREE03 and CONFIG_NR_CPUS=8 configuration, KCSAN found no data races at that point. This is because other fun

[PATCH bpf v3 1/2] bpf: fix recursive lock when verdict program return SK_PASS

2024-11-10 Thread Jiayuan Chen
When the stream_verdict program returns SK_PASS, it places the received skb into its own receive queue, but a recursive lock eventually occurs, leading to an operating system deadlock. This issue has been present since v6.9. ''' sk_psock_strp_data_ready write_lock_bh(&sk->sk_callback_lock)

[PATCH bpf v3 2/2] selftests/bpf: Add some tests with sockmap SK_PASS

2024-11-10 Thread Jiayuan Chen
1. Add a new tests in sockmap_basic.c to test SK_PASS for sockmap 2. The return value of 'sk_skb/stream_parser' is used as a length, but the current eBPF program returns SK_PASS, which is semantically incorrect. This change modifies it to return skb->len. All tests related to this eBPF pro

[PATCH bpf v3 0/2] bpf: fix recursive lock and add test

2024-11-10 Thread Jiayuan Chen
1. fix recursive lock when ebpf prog return SK_PASS. 2. add selftest to reproduce recursive lock. Note that if just the selftest merged without first patch, the test case will definitely fail, because the issue of deadlock is inevitable. --- v2->v3: fix line length reported by patchwork.

Re: [PATCH net-next v11 07/23] ovpn: introduce the ovpn_socket object

2024-11-10 Thread Sergey Ryazanov
On 29.10.2024 12:47, Antonio Quartulli wrote: 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 on

Re: [PATCH v4 3/6] iio: light: stk3310: Implement vdd and leda supplies

2024-11-10 Thread Aren
On Mon, Nov 04, 2024 at 10:35:42AM +0200, Andy Shevchenko wrote: > On Sat, Nov 02, 2024 at 03:50:39PM -0400, Aren Moynihan wrote: > > The vdd and leda supplies must be powered on for the chip to function > > and can be powered off during system suspend. > > > > This was originally based on a patch

Re: [PATCH v4 5/6] iio: light: stk3310: log error if reading the chip id fails

2024-11-10 Thread Aren
On Mon, Nov 04, 2024 at 10:41:11AM +0200, Andy Shevchenko wrote: > On Sat, Nov 02, 2024 at 03:50:43PM -0400, Aren Moynihan wrote: > > If the chip isn't powered, this call is likely to return an error. > > Without a log here the driver will silently fail to probe. Potential > > errors include ENXIO

Re: [PATCH v4 4/6] iio: light: stk3310: use dev_err_probe where possible

2024-11-10 Thread Aren
On Mon, Nov 04, 2024 at 10:40:16AM +0200, Andy Shevchenko wrote: > On Sat, Nov 02, 2024 at 03:50:41PM -0400, Aren Moynihan wrote: > > Using dev_err_probe instead of dev_err and return makes the errors > > easier to understand by including the error name, and saves a little > > code. > > ... > > >

Re: [PATCH v4 2/6] iio: light: stk3310: handle all remove logic with devm callbacks

2024-11-10 Thread Andy Shevchenko
Sun, Nov 10, 2024 at 01:38:39PM -0500, Aren kirjoitti: > On Mon, Nov 04, 2024 at 10:32:08AM +0200, Andy Shevchenko wrote: > > On Sat, Nov 02, 2024 at 03:50:37PM -0400, Aren Moynihan wrote: ... > > > + ret = devm_add_action_or_reset(&client->dev, stk3310_set_state_disable, > > > data); > > > > W

Re: [PATCH net-next v11 06/23] ovpn: introduce the ovpn_peer object

2024-11-10 Thread Sergey Ryazanov
On 29.10.2024 12:47, Antonio Quartulli wrote: [...] +static void ovpn_peer_release(struct ovpn_peer *peer) +{ + ovpn_bind_reset(peer, NULL); + nit: this empty line after ovpn_bind_reset() is removed in the 'implement basic TX path (UDP)' patch. What tricks git and it produces a sensle

Re: [PATCH v4 4/6] iio: light: stk3310: use dev_err_probe where possible

2024-11-10 Thread Andy Shevchenko
Sun, Nov 10, 2024 at 02:14:24PM -0500, Aren kirjoitti: > On Mon, Nov 04, 2024 at 10:40:16AM +0200, Andy Shevchenko wrote: > > On Sat, Nov 02, 2024 at 03:50:41PM -0400, Aren Moynihan wrote: ... > > > #define STK3310_REGFIELD(name) > > > \ > > > do

Re: [PATCH v4 4/6] iio: light: stk3310: use dev_err_probe where possible

2024-11-10 Thread Aren
On Sun, Nov 10, 2024 at 09:52:32PM +0200, Andy Shevchenko wrote: > Sun, Nov 10, 2024 at 02:14:24PM -0500, Aren kirjoitti: > > On Mon, Nov 04, 2024 at 10:40:16AM +0200, Andy Shevchenko wrote: > > > On Sat, Nov 02, 2024 at 03:50:41PM -0400, Aren Moynihan wrote: > > ... > > > > > #define STK3310_RE

Re: [PATCH v4 2/6] iio: light: stk3310: handle all remove logic with devm callbacks

2024-11-10 Thread Aren
On Mon, Nov 04, 2024 at 10:32:08AM +0200, Andy Shevchenko wrote: > On Sat, Nov 02, 2024 at 03:50:37PM -0400, Aren Moynihan wrote: > > Using devm callbacks helps to make the ordering of probe / remove > > operations easier to reason about and removes some duplicate code > > between the probe error p

Re: [PATCH net-next v11 04/23] ovpn: add basic interface creation/destruction/management routines

2024-11-10 Thread Sergey Ryazanov
Missed the most essential note regarding this patch :) On 29.10.2024 12:47, Antonio Quartulli wrote: +static int ovpn_net_open(struct net_device *dev) +{ + netif_tx_start_all_queues(dev); + return 0; +} + +static int ovpn_net_stop(struct net_device *dev) +{ + netif_tx_stop_all_

Re: [PATCH net-next v11 06/23] ovpn: introduce the ovpn_peer object

2024-11-10 Thread Sergey Ryazanov
On 29.10.2024 12:47, Antonio Quartulli wrote: 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 introdu

Re: [PATCH net] selftests: wireguard: load nf_conntrack if it's not present

2024-11-10 Thread Simon Horman
On Thu, Nov 07, 2024 at 02:44:18AM +, Hangbin Liu wrote: > Some distros may not load nf_conntrack by default, which will cause > subsequent nf_conntrack settings to fail. Let's load this module if it's > not loaded by default. > > Fixes: e7096c131e51 ("net: WireGuard secure network tunnel") >

Re: [PATCH net-next v11 08/23] ovpn: implement basic TX path (UDP)

2024-11-10 Thread Sergey Ryazanov
On 29.10.2024 12:47, Antonio Quartulli wrote: 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-o

Re: [PATCH v4 2/6] iio: light: stk3310: handle all remove logic with devm callbacks

2024-11-10 Thread Aren
On Sun, Nov 10, 2024 at 09:51:04PM +0200, Andy Shevchenko wrote: > Sun, Nov 10, 2024 at 01:38:39PM -0500, Aren kirjoitti: > > On Mon, Nov 04, 2024 at 10:32:08AM +0200, Andy Shevchenko wrote: > > > On Sat, Nov 02, 2024 at 03:50:37PM -0400, Aren Moynihan wrote: > > ... > > > > > + ret = devm_

Re: [PATCH net-next v11 08/23] ovpn: implement basic TX path (UDP)

2024-11-10 Thread Sergey Ryazanov
Another one forgotten question, sorry about this. Please find the question inlined. On 29.10.2024 12:47, Antonio Quartulli wrote: /* Send user data to the network */ netdev_tx_t ovpn_net_xmit(struct sk_buff *skb, struct net_device *dev) { + struct ovpn_struct *ovpn = netdev_priv(