[PATCH 5.10 3/5] net: tighten bad gso csum offset check in virtio_net_hdr

2025-01-31 Thread Denis Arefev
From: Willem de Bruijn commit 6513eb3d3191574b58859ef2d6dc26c0277c6f81 upstream. The referenced commit drops bad input, but has false positives. Tighten the check to avoid these. The check detects illegal checksum offload requests, which produce csum_start/csum_off beyond end of packet after s

Re: [PATCH v7 0/6] introduce PIDFD_SELF* sentinels

2025-01-31 Thread Lorenzo Stoakes
On Thu, Jan 30, 2025 at 03:32:36PM -0800, Andrew Morton wrote: > On Thu, 30 Jan 2025 23:10:53 + Pedro Falcato > wrote: > > > On Thu, Jan 30, 2025 at 10:53 PM Lorenzo Stoakes > > wrote: > > > > > > > The above code sequence doesn't seem at all onerous. I'm not > > > > understanding why it's

[PATCH v3 net] udp: gso: do not drop small packets when PMTU reduces

2025-01-31 Thread Yan Zhai
Commit 4094871db1d6 ("udp: only do GSO if # of segs > 1") avoided GSO for small packets. But the kernel currently dismisses GSO requests only after checking MTU/PMTU on gso_size. This means any packets, regardless of their payload sizes, could be dropped when PMTU becomes smaller than requested gso

Re: [PATCH] kunit: tool: Use qboot on QEMU x86_64

2025-01-31 Thread David Gow
On Fri, 24 Jan 2025 at 19:01, Brendan Jackman wrote: > > As noted in [0], SeaBIOS (QEMU default) makes a mess of the terminal, > qboot does not. > > It turns out this is actually useful with kunit.py, since the user is > exposed to this issue if they set --raw_output=all. > > qboot is also faster

[PATCH 5.10 1/5] net: more strict VIRTIO_NET_HDR_GSO_UDP_L4 validation

2025-01-31 Thread Denis Arefev
From: Willem de Bruijn commit fc8b2a619469378717e7270d2a4e1ef93c585f7a upstream. Syzbot reported two new paths to hit an internal WARNING using the new virtio gso type VIRTIO_NET_HDR_GSO_UDP_L4. RIP: 0010:skb_checksum_help+0x4a2/0x600 net/core/dev.c:3260 skb len=64521 gso_size=344 and

[PATCH 5.10 0/5] net: Backport fix for CVE-2024-43817

2025-01-31 Thread Denis Arefev
Link: https://nvd.nist.gov/vuln/detail/cve-2024-43817 [PATCH 5.10 1/5] net: more strict VIRTIO_NET_HDR_GSO_UDP_L4 validation [PATCH 5.10 2/5] net: drop bad gso csum_start and offset in virtio_net_hdr [PATCH 5.10 3/5] net: tighten bad gso csum offset check in virtio_net_hdr [PATCH 5.10 4/5] net: ad

[PATCH 5.10 4/5] net: add more sanity check in virtio_net_hdr_to_skb()

2025-01-31 Thread Denis Arefev
From: Eric Dumazet commit 9181d6f8a2bb32d158de66a84164fac05e3ddd18 upstream. syzbot/KMSAN reports access to uninitialized data from gso_features_check() [1] The repro use af_packet, injecting a gso packet and hdrlen == 0. We could fix the issue making gso_features_check() more careful while de

[PATCH 5.10 5/5] net: test for not too small csum_start in virtio_net_hdr_to_skb()

2025-01-31 Thread Denis Arefev
From: Eric Dumazet commit 49d14b54a527289d09a9480f214b8c586322310a upstream. syzbot was able to trigger this warning [1], after injecting a malicious packet through af_packet, setting skb->csum_start and thus the transport header to an incorrect value. We can at least make sure the transport he

[PATCH 5.10 2/5] net: drop bad gso csum_start and offset in virtio_net_hdr

2025-01-31 Thread Denis Arefev
From: Willem de Bruijn commit 89add40066f9ed9abe5f7f886fe5789ff7e0c50e upstream. Tighten csum_start and csum_offset checks in virtio_net_hdr_to_skb for GSO packets. The function already checks that a checksum requested with VIRTIO_NET_HDR_F_NEEDS_CSUM is in skb linear. But for GSO packets this

Re: [PATCH] kunit: tool: Use qboot on QEMU x86_64

2025-01-31 Thread Brendan Jackman
On Fri, 31 Jan 2025 at 09:45, David Gow wrote: > One future idea would be to look into microvms, which might be even > faster. I'll give myself a TODO to experiment with those. Yeah, that would be cool although I think they require CONFIG_PARAVIRT which isn't an entirely negligible constraint. St

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-01-31 Thread Eric Auger
Hi Kirill, Michael On 8/8/24 9:51 AM, Kirill A. Shutemov wrote: > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory > accesses during the hang. > > Invalid read at addr 0x102877002, size 2, region '(null)', reason: > rejected > Invalid write at addr 0x102877A44, s

Re: [PATCH] scanf: convert self-test to KUnit

2025-01-31 Thread Andy Shevchenko
On Fri, Jan 31, 2025 at 10:47:49AM -0500, Tamir Duberstein wrote: > Convert the scanf() self-test to a KUnit test. > > In the interest of keeping the patch reasonably-sized this doesn't > rename the file in accordance with usual kunit conventions nor does it > refactor the tests into proper parame

Re: [RFC PATCH 0/2] livepatch: Add support for hybrid mode

2025-01-31 Thread Miroslav Benes
> > > > + What exactly is meant by frequent replacements (busy loop?, once a > > minute?) > > The script: > > #!/bin/bash > while true; do > yum install -y ./kernel-livepatch-6.1.12-0.x86_64.rpm > ./apply_livepatch_61.sh # it will sleep 5s > yum erase -y kernel-livepatc

Re: [PATCH 8/8] arm64: Enable livepatch for ARM64

2025-01-31 Thread Prasanna Kumar T S M
On 28-01-2025 03:03, Weinan Liu wrote: Since SFrame is considered as reliable stacktrace, enable livepatch in arch/arm64/Kconfig Signed-off-by: Weinan Liu --- arch/arm64/Kconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 100570a048c

Re: [PATCH] scanf: convert self-test to KUnit

2025-01-31 Thread Andy Shevchenko
On Fri, Jan 31, 2025 at 12:22:39PM -0500, Tamir Duberstein wrote: > On Fri, Jan 31, 2025 at 12:11 PM Andy Shevchenko > wrote: > > On Fri, Jan 31, 2025 at 10:47:49AM -0500, Tamir Duberstein wrote: > > > Convert the scanf() self-test to a KUnit test. > > > > > > In the interest of keeping the patch

Re: [PATCH] scanf: convert self-test to KUnit

2025-01-31 Thread Andy Shevchenko
On Fri, Jan 31, 2025 at 12:25:20PM -0500, Tamir Duberstein wrote: > On Fri, Jan 31, 2025 at 12:22 PM Tamir Duberstein wrote: > > On Fri, Jan 31, 2025 at 12:11 PM Andy Shevchenko > > wrote: ... > > Can you explain what you mean by using -M -C? The formatting was done > > by hand, is there an aut

Re: [PATCH v3 net] udp: gso: do not drop small packets when PMTU reduces

2025-01-31 Thread Willem de Bruijn
Yan Zhai wrote: > Commit 4094871db1d6 ("udp: only do GSO if # of segs > 1") avoided GSO > for small packets. But the kernel currently dismisses GSO requests only > after checking MTU/PMTU on gso_size. This means any packets, regardless > of their payload sizes, could be dropped when PMTU becomes sm

Re: [PATCH] virtio: Remove virtio devices on device_shutdown()

2025-01-31 Thread Michael S. Tsirkin
On Fri, Jan 31, 2025 at 10:53:15AM +0100, Eric Auger wrote: > Hi Kirill, Michael > > On 8/8/24 9:51 AM, Kirill A. Shutemov wrote: > > Hongyu reported a hang on kexec in a VM. QEMU reported invalid memory > > accesses during the hang. > > > > Invalid read at addr 0x102877002, size 2, region '(

[PATCH] scanf: convert self-test to KUnit

2025-01-31 Thread Tamir Duberstein
Convert the scanf() self-test to a KUnit test. In the interest of keeping the patch reasonably-sized this doesn't rename the file in accordance with usual kunit conventions nor does it refactor the tests into proper parameterized tests - it's all one big test case. Signed-off-by: Tamir Duberstein

[PATCH RFC net-next] netconsole: selftest: Add test for fragmented messages

2025-01-31 Thread Breno Leitao
Add a new selftest to verify netconsole's handling of messages that exceed the packet size limit and require fragmentation. The test sends messages with varying sizes and userdata, validating that: 1. Large messages are correctly fragmented and reassembled 2. Userdata fields are properly preserved

Re: [PATCH] scanf: convert self-test to KUnit

2025-01-31 Thread Tamir Duberstein
On Fri, Jan 31, 2025 at 12:50 PM Andy Shevchenko wrote: > > On Fri, Jan 31, 2025 at 12:22:39PM -0500, Tamir Duberstein wrote: > > On Fri, Jan 31, 2025 at 12:11 PM Andy Shevchenko > > wrote: > > > On Fri, Jan 31, 2025 at 10:47:49AM -0500, Tamir Duberstein wrote: [...] > There are other options l

Re: [PATCH 01/16] selftests/mm: remove argc and argv unused parameters

2025-01-31 Thread Muhammad Usama Anjum
On 1/11/25 12:00 AM, David Laight wrote: > On Thu, 9 Jan 2025 22:38:27 +0500 > Muhammad Usama Anjum wrote: > >> Remove the following warnings by removing unused argc and argv >> parameters: >> In function ‘main’: >> warning: unused parameter ‘argc’ [-Wunused-parameter] >> 158 | int main(in

Re: [PATCH 01/16] selftests/mm: remove argc and argv unused parameters

2025-01-31 Thread Muhammad Usama Anjum
On 1/10/25 5:12 AM, Andrew Morton wrote: > On Thu, 9 Jan 2025 09:50:45 -0800 Kees Cook wrote: > >> On Thu, Jan 09, 2025 at 10:48:52PM +0500, Muhammad Usama Anjum wrote: >>> For the all other case, why should we keep argv/argc and mark them unused >>> as well when they aren't being used? >> >> I'm

Re: [PATCH v2 2/3] clk: qcom: gcc-sdm660: Add missing SDCC block resets

2025-01-31 Thread Konrad Dybcio
On 29.01.2025 10:23 PM, Alexey Minnekhanov wrote: > This will allow linux to properly reset eMMC/SD blocks. > > Signed-off-by: Alexey Minnekhanov > Fixes: f2a76a2955c0 ("clk: qcom: Add Global Clock controller (GCC) driver for > SDM660") > --- Reviewed-by: Konrad Dybcio Konrad

Re: [PATCH v2 3/3] arm64: dts: qcom: sdm630: Add missing resets to mmc blocks

2025-01-31 Thread Konrad Dybcio
On 29.01.2025 10:23 PM, Alexey Minnekhanov wrote: > Add resets to eMMC/SD card blocks so linux can properly reset > them during initialization. > > Signed-off-by: Alexey Minnekhanov > --- Thanks! Reviewed-by: Konrad Dybcio Konrad

Re: [PATCH] scanf: convert self-test to KUnit

2025-01-31 Thread Tamir Duberstein
On Fri, Jan 31, 2025 at 12:11 PM Andy Shevchenko wrote: > > On Fri, Jan 31, 2025 at 10:47:49AM -0500, Tamir Duberstein wrote: > > Convert the scanf() self-test to a KUnit test. > > > > In the interest of keeping the patch reasonably-sized this doesn't > > rename the file in accordance with usual k

Re: [PATCH] scanf: convert self-test to KUnit

2025-01-31 Thread Tamir Duberstein
On Fri, Jan 31, 2025 at 12:22 PM Tamir Duberstein wrote: > > On Fri, Jan 31, 2025 at 12:11 PM Andy Shevchenko > wrote: > > > > On Fri, Jan 31, 2025 at 10:47:49AM -0500, Tamir Duberstein wrote: > > > Convert the scanf() self-test to a KUnit test. > > > > > > In the interest of keeping the patch re

Re: [PATCH] scanf: convert self-test to KUnit

2025-01-31 Thread Tamir Duberstein
On Fri, Jan 31, 2025 at 12:58 PM Tamir Duberstein wrote: > > On Fri, Jan 31, 2025 at 12:50 PM Andy Shevchenko > wrote: > > > > On Fri, Jan 31, 2025 at 12:22:39PM -0500, Tamir Duberstein wrote: > > > On Fri, Jan 31, 2025 at 12:11 PM Andy Shevchenko > > > wrote: > > > > On Fri, Jan 31, 2025 at 10:

Re: [PATCH v2 2/2] selftests/bpf: Select NUMA_NO_NODE to create map

2025-01-31 Thread Yonghong Song
On 1/30/25 11:05 PM, Saket Kumar Bhaskar wrote: On powerpc, a CPU does not necessarily originate from NUMA node 0. This contrasts with architectures like x86, where CPU 0 is not hot-pluggable, making NUMA node 0 a consistently valid node. This discrepancy can lead to failures when creating a

Re: [PATCH v2 1/2] selftests/bpf: Define SYS_PREFIX for powerpc

2025-01-31 Thread Yonghong Song
On 1/30/25 11:05 PM, Saket Kumar Bhaskar wrote: Since commit 7e92e01b7245 ("powerpc: Provide syscall wrapper") landed in v6.1, syscall wrapper is enabled on powerpc. Commit 94746890202c ("powerpc: Don't add __powerpc_ prefix to syscall entry points") , that drops the prefix to syscall entry po

Re: [PATCH bpf-next v4 12/14] selftests/bpf: test_xdp_veth: Add XDP broadcast redirection tests

2025-01-31 Thread Martin KaFai Lau
On 1/30/25 11:21 PM, Bastien Curutchet (eBPF Foundation) wrote: +#define BROADCAST_REDIRECT_SKEL_NB 2 +static void xdp_veth_broadcast_redirect(u32 attach_flags, u64 redirect_flags) +{ + struct prog_configuration prog_cfg[VETH_PAIRS_COUNT] = { + { + .l