Re: [PATCH] kunit: Adjust kunit_test timeout based on test_{suite,case} speed

2025-06-18 Thread David Gow
On Thu, 19 Jun 2025 at 05:37, Rae Moar wrote: > > On Sat, Jun 14, 2025 at 4:47 AM David Gow wrote: > > > > From: Ujwal Jain > > > > Currently, the in-kernel kunit test case timeout is 300 seconds. (There > > is a separate timeout mechanism for the whole test execution in > > kunit.py, but that's

Re: [PATCH net-next v4] page_pool: import Jesper's page_pool benchmark

2025-06-18 Thread Mina Almasry
On Wed, Jun 18, 2025 at 5:46 AM Jesper Dangaard Brouer wrote: > >> Something is off with benchmark numbers compared to the OOT version. > >> > > > > I assume you're comparing my results (my kernel config + my hardware + > > upstream benchmark) with your results (your kernel config + your > > hardw

[PATCH net-next, v2] selftest: add selftest for anycast notifications

2025-06-18 Thread Yuyang Huang
This commit adds a new kernel selftest to verify RTNLGRP_IPV6_ACADDR notifications. The test works by adding/removing a dummy interface, enabling packet forwarding, and then confirming that user space can correctly receive anycast notifications. The test relies on the iproute2 version to be 6.13+.

Re: [RESEND PATCH] selftests/pidfd: align stack to fix SP alignment exception

2025-06-18 Thread Shuai Xue
在 2025/6/19 05:36, Shuah Khan 写道: On 6/15/25 23:06, Shuai Xue wrote: The pidfd_test fails on the ARM64 platform with the following error: Bail out! pidfd_poll check for premature notification on child thread exec test: Failed When exception-trace is enabled, the kernel logs the detail

Re: [PATCH net-next v5 0/6] udp_tunnel: remove rtnl_lock dependency

2025-06-18 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 16 Jun 2025 09:21:11 -0700 you wrote: > Recently bnxt had to grow back a bunch of rtnl dependencies because > of udp_tunnel's infra. Add separate (global) mutext to protect > udp_tunnel state. > > v5: > - re

Re: [PATCH net 1/2] virtio-net: xsk: rx: fix the frame's length check

2025-06-18 Thread Jakub Kicinski
On Sun, 15 Jun 2025 22:13:32 +0700 Bui Quang Minh wrote: > +/** > + * buf_to_xdp() - convert the @buf context to xdp_buff > + * @vi: virtnet_info struct > + * @rq: the receive queue struct > + * @buf: the xdp_buff pointer that is passed to > virtqueue_add_inbuf_premapped in > + * virtnet_add

Re: [PATCH v12 1/1] vhost: Reintroduces support of kthread API and adds mode selection

2025-06-18 Thread Jason Wang
On Wed, Jun 18, 2025 at 8:06 PM Nicolas Dichtel wrote: > > Le 16/06/2025 à 08:28, Cindy Lu a écrit : > > This patch reintroduces kthread mode for vhost workers and provides > > configuration to select between kthread and task worker. > > > > - Add 'fork_owner' parameter to vhost_dev to let users s

Re: [RFC 00/19] Kernel API Specification Framework

2025-06-18 Thread Sasha Levin
On Wed, Jun 18, 2025 at 02:29:37PM -0700, Kees Cook wrote: On Sat, Jun 14, 2025 at 09:48:39AM -0400, Sasha Levin wrote: This patch series introduces a framework for formally specifying kernel APIs, addressing the long-standing challenge of maintaining stable interfaces between the kernel and use

Re: [PATCH net-next] selftest: add selftest for anycast notifications

2025-06-18 Thread Yuyang Huang
Thanks for the review feedback, I will move the clean up to a seaparte patch. On Thu, Jun 19, 2025 at 3:20 AM Simon Horman wrote: > > On Wed, Jun 18, 2025 at 07:40:25PM +0900, Yuyang Huang wrote: > > This commit adds a new kernel selftest to verify RTNLGRP_IPV6_ACADDR > > notifications. The test

Re: [PATCH v2 59/62] livepatch/klp-build: Introduce klp-build script for generating livepatch modules

2025-06-18 Thread Dylan Hatch
On Fri, May 9, 2025 at 1:30 PM Josh Poimboeuf wrote: > > + > +# Make sure git re-stats the changed files > +git_refresh() { > + local patch="$1" > + local files=() > + > + [[ ! -d "$SRC/.git" ]] && return As a user of git worktrees, my $SRC/.git is a file containing a key: value

[PATCH v2] ARM: dts: qcom: msm8974-samsung-hlte: Add touchkey support

2025-06-18 Thread Luca Weiss
From: Adam Honse Add support for the touchkeys on the Samsung Galaxy Note 3 (hlte). Signed-off-by: Adam Honse Signed-off-by: Luca Weiss --- Changes in v2: - Fix schema validation failure, adjust i2c-gpio node name - Fix misplaced S-o-b (hopefully) - Link to v1: https://lore.kernel.org/r/20250

Re: [PATCH] kunit: Adjust kunit_test timeout based on test_{suite,case} speed

2025-06-18 Thread Rae Moar
On Sat, Jun 14, 2025 at 4:47 AM David Gow wrote: > > From: Ujwal Jain > > Currently, the in-kernel kunit test case timeout is 300 seconds. (There > is a separate timeout mechanism for the whole test execution in > kunit.py, but that's unrelated.) However, tests marked 'slow' or 'very > slow' may

Re: [RESEND PATCH] selftests/pidfd: align stack to fix SP alignment exception

2025-06-18 Thread Shuah Khan
On 6/15/25 23:06, Shuai Xue wrote: The pidfd_test fails on the ARM64 platform with the following error: Bail out! pidfd_poll check for premature notification on child thread exec test: Failed When exception-trace is enabled, the kernel logs the details: #echo 1 > /proc/sys/debug/exc

Re: [PATCH RESEND] selftests/memfd: clean Makefile

2025-06-18 Thread Shuah Khan
On 6/9/25 20:05, Chen Linxuan wrote: When writing a test for fusectl, I referred to this Makefile as a reference for creating a FUSE daemon in the selftests. While doing so, I noticed that there is a minor issue in the Makefile. What happens if this change isn't made? The fuse_mnt.c file is

Re: [PATCH RESEND] selftests: Suppress unused variable warning

2025-06-18 Thread Shuah Khan
On 6/9/25 20:07, Chen Linxuan wrote: When running `make kselftest`, the following compilation warning was encountered: mount-notify_test.c: In function ‘fanotify_rmdir’: mount-notify_test.c:490:17: warning: ignoring return value of ‘chdir’ declared with attribute ‘warn_unused_result’ [-Wunused

Re: [RFC 00/19] Kernel API Specification Framework

2025-06-18 Thread Kees Cook
On Sat, Jun 14, 2025 at 09:48:39AM -0400, Sasha Levin wrote: > This patch series introduces a framework for formally specifying kernel > APIs, addressing the long-standing challenge of maintaining stable > interfaces between the kernel and user-space programs. As outlined in > previous discussions

Re: [PATCH RESEND] selftests: add missing include

2025-06-18 Thread Shuah Khan
On 6/9/25 20:08, Chen Linxuan wrote: I failed to build this test on Ubuntu 24.04. Compiler complained about undefined functions mount, umount and some mount related flags. Signed-off-by: Chen Linxuan --- tools/testing/selftests/pid_namespace/pid_max.c | 1 + 1 file changed, 1 insertion(+) d

Re: [PATCH v2 2/2] selftests/bpf: Add testcases for BPF_ADD and BPF_SUB

2025-06-18 Thread Eduard Zingerman
On Tue, 2025-06-17 at 19:17 -0400, Harishankar Vishwanathan wrote: > The previous commit improves the precision in scalar(32)_min_max_add, > and scalar(32)_min_max_sub. The improvement in precision occurs in > cases when all outcomes overflow or underflow, respectively. This > commit adds selftests

Re: [PATCH v13 4/6] rust: module: update the module macro with module parameter support

2025-06-18 Thread Benno Lossin
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: > + > +fn emit_params(&mut self, info: &ModuleInfo) { > +let Some(params) = &info.params else { > +return; > +}; > + > +for param in params { > +let ops = param_ops_path(¶m.ptype); > + >

[ANNOUNCE] 5.10.238-rt132

2025-06-18 Thread Luis Claudio R. Goncalves
Hello RT-list! I'm pleased to announce the 5.10.238-rt132 stable release. This release is just an update to the new stable 5.10.238 version and no RT specific changes have been made. You can get this release via the git tree at: git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt

Re: [PATCH v2 0/4] arm64: dts: qcom: msm8976-longcheer-l9360: Add initial device tree

2025-06-18 Thread Bjorn Andersson
On Sun, 15 Jun 2025 22:35:02 +0200, André Apitzsch wrote: > This dts adds support for BQ Aquaris X5 Plus (Longcheer L9360) released > in 2016. > > Add a device tree with initial support for: > > - GPIO keys > - NFC > - SDHCI > - Status LED > - Touchscreen > > [...] Applied, thanks! [1/4] arm

Re: [RESEND PATCH v13 3/3] selftests/rseq: Add test for mm_cid compaction

2025-06-18 Thread Shuah Khan
On 6/13/25 03:12, Gabriele Monaco wrote: A task in the kernel (task_mm_cid_work) runs somewhat periodically to compact the mm_cid for each process. Add a test to validate that it runs correctly and timely. The test spawns 1 thread pinned to each CPU, then each thread, including the main one, run

Re: [PATCH v4] selftests: filesystems: Add functional test for the abort file in fusectl

2025-06-18 Thread Shuah Khan
On 6/12/25 03:40, Chen Linxuan wrote: This patch add a simple functional test for the "abort" file in fusectlfs (/sys/fs/fuse/connections/ID/about). A simple fuse daemon is added for testing. Related discussion can be found in the link below. Link: https://lore.kernel.org/all/CAOQ4uxjKFXOKQxP

Re: [PATCH v13 2/6] rust: introduce module_param module

2025-06-18 Thread Benno Lossin
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: > Add types and traits for interfacing the C moduleparam API. > > Signed-off-by: Andreas Hindborg > --- > rust/kernel/lib.rs | 1 + > rust/kernel/module_param.rs | 201 > > 2 file

Re: (subset) [PATCH 0/2] Correct the ready and handover interrupt number for sa8775p remoteproc

2025-06-18 Thread Bjorn Andersson
On Thu, 12 Jun 2025 10:39:31 +0800, Lijuan Gao wrote: > The Ready and Handover interrupt numbers for sa8775p are incorrect. The > correct interrupt numbers are as follows. So they need to be corrected. > > Fatal interrupt - 0 > Ready interrupt - 1 > Handover interrupt - 2 > Stop acknowledge inte

Re: [PATCH v13 1/6] rust: str: add radix prefixed integer parsing functions

2025-06-18 Thread Benno Lossin
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: > +pub trait ParseInt: private::FromStrRadix + TryFrom { > +/// Parse a string according to the description in [`Self`]. > +fn from_str(src: &BStr) -> Result { > +match src.deref() { > +[b'-', rest @ ..] => { >

Re: [PATCH v13 3/6] rust: module: use a reference in macros::module::module

2025-06-18 Thread Benno Lossin
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: > When we add parameter support to the module macro, we want to be able to > pass a reference to `ModuleInfo` to a helper function. That is not possible > when we move out of the local `modinfo`. So change the function to access > the loc

Re: [PATCH v13 5/6] rust: samples: add a module parameter to the rust_minimal sample

2025-06-18 Thread Benno Lossin
On Thu Jun 12, 2025 at 3:40 PM CEST, Andreas Hindborg wrote: > Showcase the rust module parameter support by adding a module parameter to > the `rust_minimal` sample. > > Signed-off-by: Andreas Hindborg Reviewed-by: Benno Lossin --- Cheers, Benno > --- > samples/rust/rust_minimal.rs | 10

Re: [PATCH net-next] selftest: add selftest for anycast notifications

2025-06-18 Thread Simon Horman
On Wed, Jun 18, 2025 at 07:40:25PM +0900, Yuyang Huang wrote: > This commit adds a new kernel selftest to verify RTNLGRP_IPV6_ACADDR > notifications. The test works by adding/removing a dummy interface, > enabling packet forwarding, and then confirming that user space can > correctly receive anycas

[PATCH v3] remoteproc: xlnx: allow single core use in split mode

2025-06-18 Thread Tanmay Shah
When operating in split mode, it is a valid usecase to have only one core enabled in the cluster. Remove exact core count expecatation from the driver. Signed-off-by: Tanmay Shah --- Changes in v3: - Fix commit message - Add details about split mode configuration in comment Change in v2:

Re: [PATCH RESEND v4 0/7] futex: Create set_robust_list2

2025-06-18 Thread Arnd Bergmann
On Wed, Jun 18, 2025, at 18:56, Sebastian Andrzej Siewior wrote: > On 2025-06-18 13:39:46 [-0300], André Almeida wrote: >> >> Ops, I forgot to address them. I will do it for v5. >> >> > - You say 64bit x86-64 does not have the problem due the compat syscall. >> >Arm64 has this problem. New ar

Re: [PATCH RESEND v4 0/7] futex: Create set_robust_list2

2025-06-18 Thread Sebastian Andrzej Siewior
On 2025-06-18 13:39:46 [-0300], André Almeida wrote: > > Ops, I forgot to address them. I will do it for v5. > > > - You say 64bit x86-64 does not have the problem due the compat syscall. > >Arm64 has this problem. New arm64 do not provide arm32 facility. You > >introduce the syscall here

Re: [PATCH RESEND v4 0/7] futex: Create set_robust_list2

2025-06-18 Thread André Almeida
Hi Sebastian, Thanks for the feedback! Em 18/06/2025 04:08, Sebastian Andrzej Siewior escreveu: On 2025-06-17 15:34:17 [-0300], André Almeida wrote: This patch adds a new robust_list() syscall. The current syscall can't be expanded to cover the following use case, so a new one is needed. This

Re: [PATCH net-next v5 1/6] geneve: rely on rtnl lock in geneve_offload_rx_ports

2025-06-18 Thread Nikolay Aleksandrov
On 6/16/25 19:21, Stanislav Fomichev wrote: > udp_tunnel_push_rx_port will grab mutex in the next patch so > we can't use rcu. geneve_offload_rx_ports is called > from geneve_netdevice_event for NETDEV_UDP_TUNNEL_PUSH_INFO and > NETDEV_UDP_TUNNEL_DROP_INFO which both have ASSERT_RTNL. > Entries are

Re: [PATCH net-next v5 2/6] vxlan: drop sock_lock

2025-06-18 Thread Nikolay Aleksandrov
On 6/16/25 19:21, Stanislav Fomichev wrote: > We won't be able to sleep soon in vxlan_offload_rx_ports and won't be > able to grab sock_lock. Instead of having separate spinlock to > manage sockets, rely on rtnl lock. This is similar to how geneve > manages its sockets. > > Signed-off-by: Stanisla

Re: [RFC PATCH v8 4/7] mm/mempolicy: Export memory policy symbols

2025-06-18 Thread Gregory Price
On Wed, Jun 18, 2025 at 11:29:32AM +, Shivank Garg wrote: > KVM guest_memfd wants to implement support for NUMA policies just like > shmem already does using the shared policy infrastructure. As > guest_memfd currently resides in KVM module code, we have to export the > relevant symbols. > > I

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

2025-06-18 Thread Mauro Carvalho Chehab
Em Wed, 18 Jun 2025 23:27:13 +0900 "Alexandre Courbot" escreveu: > On Tue Jun 17, 2025 at 7:20 PM JST, Mauro Carvalho Chehab wrote: > > Em Tue, 17 Jun 2025 11:03:18 +0200 > > Mauro Carvalho Chehab escreveu: > > > >> Em Tue, 17 Jun 2025 10:49:38 +0200 > >> Mauro Carvalho Chehab escreveu: > >>

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Dev Jain
On 18/06/25 8:05 pm, Lorenzo Stoakes wrote: On Wed, Jun 18, 2025 at 07:47:18PM +0530, Dev Jain wrote: On 18/06/25 7:37 pm, Lorenzo Stoakes wrote: On Wed, Jun 18, 2025 at 07:28:16PM +0530, Dev Jain wrote: On 18/06/25 5:27 pm, Lorenzo Stoakes wrote: On Wed, Jun 18, 2025 at 05:15:50PM +0530, D

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

2025-06-18 Thread Mauro Carvalho Chehab
Em Wed, 18 Jun 2025 23:16:47 +0900 "Alexandre Courbot" escreveu: > Hi Mauro, > > On Tue Jun 17, 2025 at 5:49 PM JST, Mauro Carvalho Chehab wrote: > > Hi Alex, > > > > Em Tue, 27 May 2025 23:03:39 +0900 > > Alexandre Courbot escreveu: > > > >> > > > Btw, I was looking at: > >> > > > > >> > > >

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Lorenzo Stoakes
On Wed, Jun 18, 2025 at 07:47:18PM +0530, Dev Jain wrote: > > On 18/06/25 7:37 pm, Lorenzo Stoakes wrote: > > On Wed, Jun 18, 2025 at 07:28:16PM +0530, Dev Jain wrote: > > > On 18/06/25 5:27 pm, Lorenzo Stoakes wrote: > > > > On Wed, Jun 18, 2025 at 05:15:50PM +0530, Dev Jain wrote: > > > > Are you

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

2025-06-18 Thread Bjorn Andersson
On Wed, Jun 18, 2025 at 03:14:41PM +0530, Souradeep Chowdhury wrote: > Device awake calls are only present in the recovery path of remoteproc. This is not the problem, this merely documents a related fact. Might be worth mention after the problem has been established. > If an user stops and start

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

2025-06-18 Thread Alexandre Courbot
On Tue Jun 17, 2025 at 7:20 PM JST, Mauro Carvalho Chehab wrote: > Em Tue, 17 Jun 2025 11:03:18 +0200 > Mauro Carvalho Chehab escreveu: > >> Em Tue, 17 Jun 2025 10:49:38 +0200 >> Mauro Carvalho Chehab escreveu: >> >> > Hi Alex, >> > >> > Em Tue, 27 May 2025 23:03:39 +0900 >> > Alexandre Courbot

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Dev Jain
On 18/06/25 7:37 pm, Lorenzo Stoakes wrote: On Wed, Jun 18, 2025 at 07:28:16PM +0530, Dev Jain wrote: On 18/06/25 5:27 pm, Lorenzo Stoakes wrote: On Wed, Jun 18, 2025 at 05:15:50PM +0530, Dev Jain wrote: Are you accounting for sys.max_map_count? If not, then you'll be hitting that first. run

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

2025-06-18 Thread Alexandre Courbot
Hi Mauro, On Tue Jun 17, 2025 at 5:49 PM JST, Mauro Carvalho Chehab wrote: > Hi Alex, > > Em Tue, 27 May 2025 23:03:39 +0900 > Alexandre Courbot escreveu: > >> > > > Btw, I was looking at: >> > > > >> > > > https://github.com/chromeos/virtio-media >> > > > >> > > > (I'm assuming that this

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Lorenzo Stoakes
On Wed, Jun 18, 2025 at 07:28:16PM +0530, Dev Jain wrote: > > On 18/06/25 5:27 pm, Lorenzo Stoakes wrote: > > On Wed, Jun 18, 2025 at 05:15:50PM +0530, Dev Jain wrote: > > Are you accounting for sys.max_map_count? If not, then you'll be hitting > > that > > first. > > run_vmtests.sh will run the t

Re: [PATCH v2 1/2] module: Fix memory deallocation on error path in move_module()

2025-06-18 Thread Daniel Gomez
On 18/06/2025 14.26, Petr Pavlu wrote: > The function move_module() uses the variable t to track how many memory > types it has allocated and consequently how many should be freed if an > error occurs. > > The variable is initially set to 0 and is updated when a call to > module_memory_alloc() fai

Re: [PATCH v2 2/2] module: Avoid unnecessary return value initialization in move_module()

2025-06-18 Thread Daniel Gomez
On 18/06/2025 14.26, Petr Pavlu wrote: > All error conditions in move_module() set the return value by updating the > ret variable. Therefore, it is not necessary to the initialize the variable > when declaring it. > > Remove the unnecessary initialization. > > Signed-off-by: Petr Pavlu > Review

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Dev Jain
On 18/06/25 5:27 pm, Lorenzo Stoakes wrote: On Wed, Jun 18, 2025 at 05:15:50PM +0530, Dev Jain wrote: On 18/06/25 5:07 pm, Lorenzo Stoakes wrote: On Wed, Jun 18, 2025 at 04:58:56PM +0530, Dev Jain wrote: MAP_CHUNK_SIZE was chosen randomly. Good to see it translates into something logical :

[PATCH] selftests: vDSO: fix -Wunitialized in powerpc VDSO_CALL() wrapper

2025-06-18 Thread Thomas Weißschuh
\ "cr6", "cr7", "xer", "lr", "ctr", "memory"\ ); \ - _rval; \ + _r3;\ }) #else --- base-commit: 52da431bf03b5506203bca27fe14a97895c80faf change-id: 20250618-vdso-vdso_call-uninit-ccc33be00568 Best regards, -- Thomas Weißschuh

Re: [PATCH v4 0/3] rpmsg: Introduce RPMSG_CREATE_EPT_FD_IOCTL uAPI

2025-06-18 Thread Arnaud POULIQUEN
Hello Dawei, Please find a few comments below. It is not clear to me which parts of your implementation are mandatory and which are optional "nice-to-have" optimizations. Based on (potentially erroneous) hypothesis, you will find a suggestion for an alternative to the anonymous inode approach,

[PATCH v2] codetag: Avoid unused alloc_tags sections/symbols

2025-06-18 Thread Petr Pavlu
With CONFIG_MEM_ALLOC_PROFILING=n, vmlinux and all modules unnecessarily contain the symbols __start_alloc_tags and __stop_alloc_tags, which define an empty range. In the case of modules, the presence of these symbols also forces the linker to create an empty .codetag.alloc_tags section. Update co

Re: [PATCH net-next v4] page_pool: import Jesper's page_pool benchmark

2025-06-18 Thread Jesper Dangaard Brouer
On 16/06/2025 23.11, Mina Almasry wrote: On Mon, Jun 16, 2025 at 2:29 AM Jesper Dangaard Brouer wrote: On 15/06/2025 22.59, Mina Almasry wrote: From: Jesper Dangaard Brouer We frequently consult with Jesper's out-of-tree page_pool benchmark to evaluate page_pool changes. Import the bench

[PATCH net 1/3] vsock: Fix transport_{h2g,g2h} TOCTOU

2025-06-18 Thread Michal Luczaj
Checking transport_{h2g,g2h} != NULL may race with vsock_core_unregister(). Make sure pointers remain valid. KASAN: null-ptr-deref in range [0x0118-0x011f] RIP: 0010:vsock_dev_do_ioctl.isra.0+0x58/0xf0 Call Trace: __x64_sys_ioctl+0x12d/0x190 do_syscall_64+0x92/0x1c0 entr

[PATCH net 0/3] vsock: Fix transport_{h2g,g2h,dgram,local} TOCTOU issues

2025-06-18 Thread Michal Luczaj
transport_{h2g,g2h,dgram,local} may become NULL on vsock_core_unregister(). Make sure a poorly timed `rmmod transport` won't lead to a NULL/stale pointer dereference. Note that these oopses are pretty unlikely to happen in the wild. Splats were collected after sprinkling kernel with mdelay()s. Si

[PATCH net 2/3] vsock: Fix transport_g2h TOCTOU

2025-06-18 Thread Michal Luczaj
Function may race with vsock_core_unregister(): transport_g2h may become NULL after the NULL check. Protect from a potential null-ptr-deref. KASAN: null-ptr-deref in range [0x0118-0x011f] RIP: 0010:vsock_find_cid+0x47/0x90 Call Trace: __vsock_bind+0x4b2/0x720 vsock_bind+0

Re: Re: [PATCH] vhost: Fix typos in comments and clarity on alignof usage

2025-06-18 Thread Simon Horman
On Wed, Jun 18, 2025 at 01:31:09AM +0530, ALOK TIWARI wrote: > > > Thanks Simon, > > On 6/18/2025 12:07 AM, Simon Horman wrote: > > On Sun, Jun 15, 2025 at 10:39:11AM -0700, Alok Tiwari wrote: > > > This patch fixes multiple typos and improves comment clarity across > > > vhost.c. > > > - Correc

[PATCH net 3/3] vsock: Fix transport_* TOCTOU

2025-06-18 Thread Michal Luczaj
Transport assignment may race with module unload. Protect new_transport from becoming a stale pointer. This also takes care of an insecure call in vsock_use_local_transport(); add a lockdep assert. BUG: unable to handle page fault for address: fbfff8056000 Oops: Oops: [#1] SMP KASAN RIP:

[PATCH v2 2/2] module: Avoid unnecessary return value initialization in move_module()

2025-06-18 Thread Petr Pavlu
All error conditions in move_module() set the return value by updating the ret variable. Therefore, it is not necessary to the initialize the variable when declaring it. Remove the unnecessary initialization. Signed-off-by: Petr Pavlu Reviewed-by: Sami Tolvanen --- kernel/module/main.c | 3 +--

[PATCH v2 1/2] module: Fix memory deallocation on error path in move_module()

2025-06-18 Thread Petr Pavlu
The function move_module() uses the variable t to track how many memory types it has allocated and consequently how many should be freed if an error occurs. The variable is initially set to 0 and is updated when a call to module_memory_alloc() fails. However, move_module() can fail for other reaso

[PATCH v2 0/2] module: Fix memory deallocation on error path in move_module()

2025-06-18 Thread Petr Pavlu
The first patch is an actual fix. The second patch is a minor related cleanup. Changes since v1 [1]: - Initialize t to MOD_MEM_NUM_TYPES in move_module(), instead of assigning the value later. - Merge the definitions of the variables i and ret in move_module(). [1] https://lore.kernel.org/linu

Re: [PATCH v5 3/3] remoteproc: imx_rproc: detect and attach to pre-booted remote cores

2025-06-18 Thread Ulf Hansson
On Tue, 17 Jun 2025 at 21:36, Hiago De Franco wrote: > > From: Hiago De Franco > > When the remote core is started before Linux boots (e.g., by the > bootloader), the driver currently is not able to attach because it only > checks for cores running in different partitions. If the core was kicked

Re: [PATCH v12 1/1] vhost: Reintroduces support of kthread API and adds mode selection

2025-06-18 Thread Nicolas Dichtel
Le 16/06/2025 à 08:28, Cindy Lu a écrit : > This patch reintroduces kthread mode for vhost workers and provides > configuration to select between kthread and task worker. > > - Add 'fork_owner' parameter to vhost_dev to let users select kthread > or task mode. Default mode is task mode(VHOST_FOR

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Lorenzo Stoakes
On Wed, Jun 18, 2025 at 12:57:38PM +0100, Lorenzo Stoakes wrote: > Are you accounting for sys.max_map_count? If not, then you'll be hitting that > first. * vm.max_map_count

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Lorenzo Stoakes
On Wed, Jun 18, 2025 at 05:15:50PM +0530, Dev Jain wrote: > > On 18/06/25 5:07 pm, Lorenzo Stoakes wrote: > > On Wed, Jun 18, 2025 at 04:58:56PM +0530, Dev Jain wrote: > > > MAP_CHUNK_SIZE was chosen randomly. Good to see it translates into > > > something logical : ) > > > > > > So I guess I am c

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Lorenzo Stoakes
On Wed, Jun 18, 2025 at 12:37:29PM +0100, Lorenzo Stoakes wrote: > On Wed, Jun 18, 2025 at 04:58:56PM +0530, Dev Jain wrote: > > > > MAP_CHUNK_SIZE was chosen randomly. Good to see it translates into > > something logical : ) > > To correct myself for being an idiot before, 256 x 4 KB is 1 MB not

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Dev Jain
On 18/06/25 5:07 pm, Lorenzo Stoakes wrote: On Wed, Jun 18, 2025 at 04:58:56PM +0530, Dev Jain wrote: MAP_CHUNK_SIZE was chosen randomly. Good to see it translates into something logical : ) So I guess I am correct, if we can find two VMAs (except at the edge of the high addr boundary) with

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Lorenzo Stoakes
On Wed, Jun 18, 2025 at 04:58:56PM +0530, Dev Jain wrote: > > MAP_CHUNK_SIZE was chosen randomly. Good to see it translates into something > logical : ) > > So I guess I am correct, if we can find two VMAs (except at the edge of the > high addr boundary) > with a gap of greater than MAP_CHUNK_SIZ

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Dev Jain
On 18/06/25 4:52 pm, Lorenzo Stoakes wrote: On Mon, Jun 16, 2025 at 09:57:10PM +0530, Dev Jain wrote: On 16/06/25 9:36 pm, Aboorva Devarajan wrote: From: Donet Tom 3./proc/self/maps may not always have gaps smaller than MAP_CHUNK_SIZE. The gap between the first high address mapping and the p

Re: [PATCH rc 1/4] iommufd/selftest: Fix iommufd_dirty_tracking with large hugepage sizes

2025-06-18 Thread Jason Gunthorpe
On Tue, Jun 17, 2025 at 04:46:57PM -0700, Nicolin Chen wrote: > On Tue, Jun 17, 2025 at 08:01:36PM -0300, Jason Gunthorpe wrote: > > On Tue, Jun 17, 2025 at 02:23:41PM -0700, Nicolin Chen wrote: > > > On Tue, Jun 17, 2025 at 08:59:48AM -0300, Jason Gunthorpe wrote: > > > > On Mon, Jun 16, 2025 at 0

[RFC PATCH v8 7/7] KVM: guest_memfd: selftests: Add tests for mmap and NUMA policy support

2025-06-18 Thread Shivank Garg
Add tests for NUMA memory policy binding and NUMA aware allocation in guest_memfd. This extends the existing selftests by adding proper validation for: - KVM GMEM set_policy and get_policy() vm_ops functionality using mbind() and get_mempolicy() - NUMA policy application before and after memory a

[RFC PATCH v8 4/7] mm/mempolicy: Export memory policy symbols

2025-06-18 Thread Shivank Garg
KVM guest_memfd wants to implement support for NUMA policies just like shmem already does using the shared policy infrastructure. As guest_memfd currently resides in KVM module code, we have to export the relevant symbols. In the future, guest_memfd might be moved to core-mm, at which point the sy

[RFC PATCH v8 6/7] KVM: guest_memfd: Enforce NUMA mempolicy using shared policy

2025-06-18 Thread Shivank Garg
Previously, guest-memfd allocations followed local NUMA node id in absence of process mempolicy, resulting in arbitrary memory allocation. Moreover, mbind() couldn't be used by the VMM as guest memory wasn't mapped into userspace when allocation occurred. Enable NUMA policy support by implementin

[RFC PATCH v8 5/7] KVM: guest_memfd: Add slab-allocated inode cache

2025-06-18 Thread Shivank Garg
Add dedicated inode structure (kvm_gmem_inode_info) and slab-allocated inode cache for guest memory backing, similar to how shmem handles inodes. This adds the necessary allocation/destruction functions and prepares for upcoming guest_memfd NUMA policy support changes. Signed-off-by: Shivank Garg

[RFC PATCH v8 3/7] mm/filemap: Add mempolicy support to the filemap layer

2025-06-18 Thread Shivank Garg
From: Shivansh Dhiman Add NUMA mempolicy support to the filemap allocation path by introducing new APIs that take a mempolicy argument: - filemap_grab_folio_mpol() - filemap_alloc_folio_mpol() - __filemap_get_folio_mpol() These APIs allow callers to specify a NUMA policy during page cache alloca

[RFC PATCH v8 2/7] KVM: guest_memfd: Use guest mem inodes instead of anonymous inodes

2025-06-18 Thread Shivank Garg
From: Ackerley Tng guest_memfd's inode represents memory the guest_memfd is providing. guest_memfd's file represents a struct kvm's view of that memory. Using a custom inode allows customization of the inode teardown process via callbacks. For example, ->evict_inode() allows customization of the

[RFC PATCH v8 1/7] security: Export anon_inode_make_secure_inode for KVM guest_memfd

2025-06-18 Thread Shivank Garg
KVM guest_memfd is implementing its own inodes to store metadata for backing memory using a custom filesystem. This requires the ability to allocate an anonymous inode with security context using anon_inode_make_secure_inode(). As guest_memfd currently resides in the KVM module, we need to export

[RFC PATCH v8 0/7] Add NUMA mempolicy support for KVM guest-memfd

2025-06-18 Thread Shivank Garg
This series introduces NUMA-aware memory placement support for KVM guests with guest_memfd memory backends. It builds upon Fuad Tabba's work that enabled host-mapping for guest_memfd memory [1] and can be applied directly on KVM tree (branch:queue, base commit:7915077245) [2]. == Background == KV

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Lorenzo Stoakes
On Mon, Jun 16, 2025 at 09:57:10PM +0530, Dev Jain wrote: > > On 16/06/25 9:36 pm, Aboorva Devarajan wrote: > > From: Donet Tom > > 3./proc/self/maps may not always have gaps smaller than MAP_CHUNK_SIZE. > > The gap between the first high address mapping and the previous mapping > > is not smaller

[PATCH net-next] selftest: add selftest for anycast notifications

2025-06-18 Thread Yuyang Huang
This commit adds a new kernel selftest to verify RTNLGRP_IPV6_ACADDR notifications. The test works by adding/removing a dummy interface, enabling packet forwarding, and then confirming that user space can correctly receive anycast notifications. The test relies on the iproute2 version to be 6.13+.

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Dev Jain
On 18/06/25 3:36 pm, Donet Tom wrote: On Mon, Jun 16, 2025 at 09:57:10PM +0530, Dev Jain wrote: Hi Dev On 16/06/25 9:36 pm, Aboorva Devarajan wrote: From: Donet Tom In this patch, we are fixing three issues in the virtual_address_range test. 1. validate_addr() checks if the allocated addr

Re: [PATCH net-next, v3] selftest: Add selftest for multicast address notifications

2025-06-18 Thread Yuyang Huang
Sorry, please ignore this patch. Accidentally send the old patch again. On Wed, Jun 18, 2025 at 7:32 PM Yuyang Huang wrote: > > This commit adds a new kernel selftest to verify RTNLGRP_IPV4_MCADDR > and RTNLGRP_IPV6_MCADDR notifications. The test works by adding and > removing a dummy interf

[PATCH net-next, v3] selftest: Add selftest for multicast address notifications

2025-06-18 Thread Yuyang Huang
This commit adds a new kernel selftest to verify RTNLGRP_IPV4_MCADDR and RTNLGRP_IPV6_MCADDR notifications. The test works by adding and removing a dummy interface and then confirming that the system correctly receives join and removal notifications for the 224.0.0.1 and ff02::1 multicast addresses

Re: [PATCH 1/6] mm/selftests: Fix virtual_address_range test issues.

2025-06-18 Thread Donet Tom
On Mon, Jun 16, 2025 at 09:57:10PM +0530, Dev Jain wrote: > Hi Dev > On 16/06/25 9:36 pm, Aboorva Devarajan wrote: > > From: Donet Tom > > > > In this patch, we are fixing three issues in the virtual_address_range > > test. > > > > 1. validate_addr() checks if the allocated address is within

Re: [PATCH v5 1/1] selftests/mm/uffd: Refactor non-composite global vars into struct

2025-06-18 Thread Brendan Jackman
On Tue Jun 17, 2025 at 5:22 PM UTC, Peter Xu wrote: > ERROR: munmap (errno=22, @uffd-common.c:277) Looks the same as what I reported here: https://lore.kernel.org/all/daitjkyrqmfd.olouws7up...@google.com/ > Ujwal, can you reproduce these issues and have a look? The script I mentioned in that ot

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

2025-06-18 Thread Souradeep Chowdhury
Device awake calls are only present in the recovery path of remoteproc. If an user stops and starts rproc by using the sysfs interface, then on pm suspension the firmware fails to load as the request_firmware call under adsp_load relies on usermodehelper process which gets freezed on pm suspension.

[PATCH net-next v4 4/4] netdevsim: account dropped packet length in stats on queue free

2025-06-18 Thread Breno Leitao
Add a call to dev_dstats_rx_dropped_add() in nsim_queue_free() to account for the number of packets dropped when purging the skb queue. This improves the accuracy of RX drop statistics reported by netdevsim. local_bh_{disable, enable}() protection is used to disable preemption, which is necessary

[PATCH net-next v4 3/4] net: add dev_dstats_rx_dropped_add() helper

2025-06-18 Thread Breno Leitao
Introduce the dev_dstats_rx_dropped_add() helper to allow incrementing the rx_drops per-CPU statistic by an arbitrary value, rather than just one. This is useful for drivers or code paths that need to account for multiple dropped packets at once, such as when dropping entire queues. Reviewed-by: J

[PATCH net-next v4 2/4] netdevsim: collect statistics at RX side

2025-06-18 Thread Breno Leitao
When the RX side of netdevsim was added, the RX statistics were missing, making the driver unusable for GenerateTraffic() test framework. This patch adds proper statistics tracking on RX side, complementing the TX path. Reviewed-by: Joe Damato Signed-off-by: Breno Leitao --- drivers/net/netdev

[PATCH net-next v4 1/4] netdevsim: migrate to dstats stats collection

2025-06-18 Thread Breno Leitao
Replace custom statistics tracking with the kernel's dstats infrastructure to simplify code and improve consistency with other network drivers. This change: - Sets dev->pcpu_stat_type = NETDEV_PCPU_STAT_DSTATS for automatic automatic allocation and deallocation. - Removes manual stats fields and

[PATCH net-next v4 0/4] netdevsim: implement RX statistics using NETDEV_PCPU_STAT_DSTATS

2025-06-18 Thread Breno Leitao
The netdevsim driver previously lacked RX statistics support, which prevented its use with the GenerateTraffic() test framework, as this framework verifies traffic flow by checking RX byte counts. This patch migrates netdevsim from its custom statistics collection to the NETDEV_PCPU_STAT_DSTATS fr

Re: [PATCH net-next v5 2/6] vxlan: drop sock_lock

2025-06-18 Thread Ido Schimmel
On Mon, Jun 16, 2025 at 09:21:13AM -0700, Stanislav Fomichev wrote: > We won't be able to sleep soon in vxlan_offload_rx_ports and won't be > able to grab sock_lock. Instead of having separate spinlock to > manage sockets, rely on rtnl lock. This is similar to how geneve > manages its sockets. > >

Re: [PATCH RESEND v4 0/7] futex: Create set_robust_list2

2025-06-18 Thread Sebastian Andrzej Siewior
On 2025-06-17 15:34:17 [-0300], André Almeida wrote: > This patch adds a new robust_list() syscall. The current syscall > can't be expanded to cover the following use case, so a new one is > needed. This new syscall allows users to set multiple robust lists per > process and to have either 32bit or