[PATCH v2 2/2] selftests: coredump: Add stackdump test

2024-12-30 Thread Nam Cao
Add a test which checks that the kstkesp field in /proc/pid/stat can be read for all threads of a coredumping process. For full details including the motivation for this test and how it works, see the README file added by this commit. Reviewed-by: John Ogness Signed-off-by: Nam Cao --- tools/t

[PATCH v2 0/2] fix reading ESP during coredump

2024-12-30 Thread Nam Cao
Hi, In /proc/PID/stat, there is the kstkesp field which is the stack pointer of a thread. While the thread is active, this field reads zero. But during a coredump, it should have a valid value. However, at the moment, kstkesp is zero even during coredump. The first commit fixes this problem, and

[PATCH v2 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-12-30 Thread Nam Cao
The field "eip" (instruction pointer) and "esp" (stack pointer) of a task can be read from /proc/PID/stat. These fields can be interesting for coredump. However, these fields were disabled by commit 0a1eb2d474ed ("fs/proc: Stop reporting eip and esp in /proc/PID/stat"), because it is generally uns

Re: [PATCH v2 28/28] cfi: Use RCU while invoking __module_address().

2024-12-30 Thread Elliot Berman
On Fri, Dec 20, 2024 at 06:41:42PM +0100, Sebastian Andrzej Siewior wrote: > __module_address() can be invoked within a RCU section, there is no > requirement to have preemption disabled. > > I'm not sure if using rcu_read_lock() will introduce the regression that > has been fixed in commit 14c4c8

Re: Linux 6.1.120

2024-12-30 Thread Greg Kroah-Hartman
On Mon, Dec 30, 2024 at 03:46:25PM +0100, Greg Kroah-Hartman wrote: > On Wed, Dec 18, 2024 at 04:29:31PM +, Conor Dooley wrote: > > On Tue, Dec 17, 2024 at 09:28:18AM +0100, Greg Kroah-Hartman wrote: > > > On Tue, Dec 17, 2024 at 04:11:21PM +0800, Z qiang wrote: > > > > > > > > > > On Sat, Dec

Re: [RFC net-next] net: mac802154: Remove unused ieee802154_mlme_tx_one

2024-12-30 Thread Dr. David Alan Gilbert
* Stefan Schmidt (ste...@datenfreihafen.org) wrote: > Hello li...@treblig.org. > > On Wed, 25 Dec 2024 01:24:23 +, li...@treblig.org wrote: > > ieee802154_mlme_tx_one() was added in 2022 by > > commit ddd9ee7cda12 ("net: mac802154: Introduce a synchronous API for MLME > > commands") but has re

Re: [RFC net-next] net: mac802154: Remove unused ieee802154_mlme_tx_one

2024-12-30 Thread Stefan Schmidt
Hello li...@treblig.org. On Wed, 25 Dec 2024 01:24:23 +, li...@treblig.org wrote: > ieee802154_mlme_tx_one() was added in 2022 by > commit ddd9ee7cda12 ("net: mac802154: Introduce a synchronous API for MLME > commands") but has remained unused. > > Remove it. > > Note, there's still a ieee80

Re: [RFC net-next] net: mac802154: Remove unused ieee802154_mlme_tx_one

2024-12-30 Thread Stefan Schmidt
Hello Dave, On 30.12.24 18:44, Dr. David Alan Gilbert wrote: * Stefan Schmidt (ste...@datenfreihafen.org) wrote: Hello li...@treblig.org. On Wed, 25 Dec 2024 01:24:23 +, li...@treblig.org wrote: ieee802154_mlme_tx_one() was added in 2022 by commit ddd9ee7cda12 ("net: mac802154: Introduce

Re: [PATCH v2 1/2] fs/proc: do_task_stat: Fix ESP not readable during coredump

2024-12-30 Thread Kees Cook
On Mon, Dec 30, 2024 at 11:17:30AM +0100, Nam Cao wrote: > The field "eip" (instruction pointer) and "esp" (stack pointer) of a task > can be read from /proc/PID/stat. These fields can be interesting for > coredump. > > However, these fields were disabled by commit 0a1eb2d474ed ("fs/proc: Stop > r

Re: [PATCH v2 2/2] selftests: coredump: Add stackdump test

2024-12-30 Thread Kees Cook
On Mon, Dec 30, 2024 at 11:17:31AM +0100, Nam Cao wrote: > Add a test which checks that the kstkesp field in /proc/pid/stat can be > read for all threads of a coredumping process. > > For full details including the motivation for this test and how it works, > see the README file added by this comm

Re: [PATCH v2 28/28] cfi: Use RCU while invoking __module_address().

2024-12-30 Thread Petr Pavlu
On 12/20/24 18:41, Sebastian Andrzej Siewior wrote: > __module_address() can be invoked within a RCU section, there is no > requirement to have preemption disabled. > > I'm not sure if using rcu_read_lock() will introduce the regression that > has been fixed in commit 14c4c8e41511a ("cfi: Use > rc

Re: [PATCH 2/3 v2] rcu: Remove swake_up_one_online() bandaid

2024-12-30 Thread Usama Arif
On 26/12/2024 23:30, Frederic Weisbecker wrote: > It's now ok to perform a wake-up from an offline CPU because the > resulting armed scheduler bandwidth hrtimers are now correctly targeted > by hrtimer infrastructure. > > Remove the obsolete hackerry. > > Signed-off-by: Frederic Weisbecker R

Re: [PATCH 3/3 v2] Revert "rcu/nocb: Fix rcuog wake-up from offline softirq"

2024-12-30 Thread Usama Arif
On 26/12/2024 23:30, Frederic Weisbecker wrote: > This reverts commit f7345ccc62a4b880cf76458db5f320725f28e400. > > swake_up_one_online() has been removed because hrtimers can now assign > a proper online target to hrtimers queued from offline CPUs. Therefore > remove the related hackery. > >

Re: [PATCH 1/2] module: get symbol crc back to unsigned

2024-12-30 Thread Petr Pavlu
On 12/28/24 16:45, Masahiro Yamada wrote: > Commit 71810db27c1c ("modversions: treat symbol CRCs as 32 bit > quantities") changed the CRC fields to s32 because the __kcrctab and > __kcrctab_gpl sections contained relative references to the actual > CRC values stored in the .rodata section when CONF

Re: [RFC net-next] net: mac802154: Remove unused ieee802154_mlme_tx_one

2024-12-30 Thread Miquel Raynal
Hello, On 25/12/2024 at 01:24:23 GMT, li...@treblig.org wrote: > From: "Dr. David Alan Gilbert" > > ieee802154_mlme_tx_one() was added in 2022 by > commit ddd9ee7cda12 ("net: mac802154: Introduce a synchronous API for MLME > commands") but has remained unused. > > Remove it. > > Note, there's st

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

2024-12-30 Thread Usama Arif
On 26/12/2024 23:30, 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 involved in the CPU hotplug forward progress. > > However wake ups can still be per

Re: [PATCH v4 7/8] vhost: Add new UAPI to support change to task mode

2024-12-30 Thread Cindy Lu
On Wed, Dec 11, 2024 at 1:55 AM Stefano Garzarella wrote: > > On Wed, Dec 11, 2024 at 12:41:46AM +0800, Cindy Lu wrote: > >Add a new UAPI to enable setting the vhost device to task mode. > >The userspace application can use VHOST_SET_INHERIT_FROM_OWNER > >to configure the mode if necessary. > >Thi

[PATCH v5 0/6] vhost: Add support of kthread API

2024-12-30 Thread Cindy Lu
In commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads"), the vhost now uses vhost_task and operates as a child of the owner thread. This aligns with containerization principles. However, this change has caused confusion for some legacy userspace applications. Therefore, we

[PATCH v5 1/6] vhost: Add a new parameter in vhost_dev to allow user select kthread

2024-12-30 Thread Cindy Lu
The vhost now uses vhost_task and workers as a child of the owner thread. While this aligns with containerization principles, it confuses some legacy userspace applications. Therefore, we are reintroducing support for the kthread API. Introduce a new parameter to enable users to choose between kth

[PATCH v5 2/6] vhost: Add the vhost_worker to support kthread

2024-12-30 Thread Cindy Lu
Add the previously removed function vhost_worker() back to support the kthread and rename it to vhost_run_work_kthread_list. The old function vhost_worker() was changed to support tasks in commit 6e890c5d5021 ("vhost: use vhost_tasks for worker threads") and to support multiple workers per device

[PATCH v5 3/6] vhost: Add the cgroup related function

2024-12-30 Thread Cindy Lu
Reintroduce the previously removed functions vhost_attach_cgroups_work() and vhost_attach_cgroups() to support kthread mode. Rename vhost_attach_cgroups() to vhost_attach_task_to_cgroups(), and include the implementation of the old function vhost_dev_flush() in this new function. These function wa

[PATCH v5 5/6] vhost: Add new UAPI to support change to task mode

2024-12-30 Thread Cindy Lu
Add a new UAPI to enable setting the vhost device to task mode. The userspace application can use VHOST_SET_INHERIT_FROM_OWNER to configure the mode if necessary. This setting must be applied before VHOST_SET_OWNER, as the worker will be created in the VHOST_SET_OWNER function Signed-off-by: Cindy

[PATCH v5 4/6] vhost: Add worker related functions to support kthread

2024-12-30 Thread Cindy Lu
Restore the previously removed functions kthread_wakeup and kthread_stop, and add two new function pointers to wake up and stop the workers. The function vhost_worker_create will initialize these pointers based on the value of inherit_owner. The functions vhost_worker_queue() and vhost_worker_dest

[PATCH v5 6/6] vhost_scsi: Add check for inherit_owner status

2024-12-30 Thread Cindy Lu
The vhost_scsi VHOST_NEW_WORKER requires the inherit_owner setting to be true. So we need to implement a check for this. Signed-off-by: Cindy Lu --- drivers/vhost/scsi.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 718fa4e0b31e..0d

Re: Linux 6.1.120

2024-12-30 Thread Greg Kroah-Hartman
On Wed, Dec 18, 2024 at 04:29:31PM +, Conor Dooley wrote: > On Tue, Dec 17, 2024 at 09:28:18AM +0100, Greg Kroah-Hartman wrote: > > On Tue, Dec 17, 2024 at 04:11:21PM +0800, Z qiang wrote: > > > > > > > > On Sat, Dec 14, 2024 at 09:53:13PM +0100, Greg Kroah-Hartman wrote: > > > > > I'm announci

Re: [PATCH v2 0/3] sysfs: constify bin_attribute argument of sysfs_bin_attr_simple_read()

2024-12-30 Thread Alexei Starovoitov
On Sat, Dec 28, 2024 at 12:43 AM Thomas Weißschuh wrote: > > Most users use this function through the BIN_ATTR_SIMPLE* macros, > they can handle the switch transparently. > > This series is meant to be merged through the driver core tree. hmm. why? I'd rather take patches 2 and 3 into bpf-next t

Re: [PATCH bpf-next v4 0/2] bpf, verifier: Improve precision of BPF_MUL

2024-12-30 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Alexei Starovoitov : On Tue, 17 Dec 2024 22:23:33 -0500 you wrote: > Hi All, > > This patch-set aims to improve precision of BPF_MUL and add testcases > to illustrate precision gains using signed and unsigned bounds. > > Thanks for

Re: [PATCH net-next v16 26/26] testing/selftests: add test tool and scripts for ovpn module

2024-12-30 Thread Antonio Quartulli
On 20/12/24 05:02, Jakub Kicinski wrote: On Thu, 19 Dec 2024 02:42:20 +0100 Antonio Quartulli wrote: +uint64_t nla_get_uint(struct nlattr *attr) +{ + if (nla_len(attr) == sizeof(uint32_t)) + return nla_get_u32(attr); + else + return nla_get_u64(attr); +}

Re: [PATCH net-next v16 06/26] kref/refcount: implement kref_put_sock()

2024-12-30 Thread Antonio Quartulli
Hi Will, Thanks a lot for chiming in and sorry for the delay. See below. On 19/12/24 18:20, Will Deacon wrote: [...] +/** + * refcount_dec_and_lock_sock - return holding locked sock if able to decrement + * refcount to 0 + * @r: the refcount + * @sock: the sock to be