Re: [PATCH net-next v1 0/3] Threads support in proc connector

2024-10-15 Thread Jakub Kicinski
On Sun, 13 Oct 2024 10:06:14 -0700 Anjali Kulkarni wrote: > However, for threads, when it does a pthread_exit(&exit_status) call, the > kernel is not aware of the exit status with which pthread_exit is called. > It is sent by child thread to the parent process, if it is waiting in > pthread_join().

Re: [PATCH 3/3] selftests: ignore output files and clean them in Makefile

2024-10-15 Thread Shuah Khan
On 10/14/24 19:08, Li Zhijian wrote: After `make run_tests`, the git status complains: Untracked files: (use "git add ..." to include in what will be committed) cpufreq/cpufreq_selftest.dmesg_cpufreq.txt cpufreq/cpufreq_selftest.dmesg_full.txt cpufreq/cpufreq_selft

Re: [PATCH v2 rcu 13/13] srcu: Improve srcu_read_lock_lite() kernel-doc comment

2024-10-15 Thread Paul E. McKenney
On Fri, Oct 11, 2024 at 10:57:13AM -0700, Andrii Nakryiko wrote: > On Fri, Oct 11, 2024 at 10:39 AM Paul E. McKenney wrote: > > > > Where RCU is watching is where it is OK to invoke rcu_read_lock(). > > > > Reported-by: Andrii Nakryiko > > Signed-off-by: Paul E. McKenney > > --- > > include/lin

[PATCH rcu 06/15] srcu: Improve srcu_read_lock{,_nmisafe}() comments

2024-10-15 Thread Paul E. McKenney
This commit adds some additional usage constraints to the kernel-doc headers of srcu_read_lock() and srcu_read_lock_nmi_safe(). Suggested-by: Andrii Nakryiko Signed-off-by: Paul E. McKenney --- include/linux/srcu.h | 15 +++ 1 file changed, 11 insertions(+), 4 deletions(-) diff --g

[PATCH rcu 07/15] srcu: Create CPP macros for normal and NMI-safe SRCU readers

2024-10-15 Thread Paul E. McKenney
This commit creates SRCU_READ_FLAVOR_NORMAL and SRCU_READ_FLAVOR_NMI C-preprocessor macros for srcu_read_lock() and srcu_read_lock_nmisafe(), respectively. These replace the old true/false values that were previously passed to srcu_check_read_flavor(). In addition, the srcu_check_read_flavor() fu

[PATCH rcu 08/15] srcu: Add srcu_read_lock_lite() and srcu_read_unlock_lite()

2024-10-15 Thread Paul E. McKenney
This patch adds srcu_read_lock_lite() and srcu_read_unlock_lite(), which dispense with the read-side smp_mb() but also are restricted to code regions that RCU is watching. If a given srcu_struct structure uses srcu_read_lock_lite() and srcu_read_unlock_lite(), it is not permitted to use any other

[PATCH rcu 13/15] rcutorture: Add light-weight SRCU scenario

2024-10-15 Thread Paul E. McKenney
This commit adds an rcutorture scenario that tests light-weight SRCU readers. While in the area, it adjusts the size of the TREE10 scenario. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: --- tools/testing/selftests/rcu

[PATCH rcu 10/15] rcutorture: Expand RCUTORTURE_RDR_MASK_[12] to eight bits

2024-10-15 Thread Paul E. McKenney
This commit prepares for testing of multiple SRCU reader flavors by expanding RCUTORTURE_RDR_MASK_1 and RCUTORTURE_RDR_MASK_2 from a single bit to eight bits, allowing them to accommodate the return values from multiple calls to srcu_read_lock*(). This will in turn permit better testing coverage f

[PATCH rcu 09/15] srcu: Allow inlining of __srcu_read_{,un}lock_lite()

2024-10-15 Thread Paul E. McKenney
This commit moves __srcu_read_lock_lite() and __srcu_read_unlock_lite() into include/linux/srcu.h and marks them "static inline" so that they can be inlined into srcu_read_lock_lite() and srcu_read_unlock_lite(), respectively. They are not hand-inlined due to Tree SRCU and Tiny SRCU having differe

[PATCH rcu 15/15] srcu: Improve srcu_read_lock_lite() kernel-doc comment

2024-10-15 Thread Paul E. McKenney
Where RCU is watching is where it is OK to invoke rcu_read_lock(). Reported-by: Andrii Nakryiko Signed-off-by: Paul E. McKenney Acked-by: Andrii Nakryiko --- include/linux/srcu.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/srcu.h b/include/linux/srcu.h i

[PATCH rcu 12/15] rcutorture: Add srcu_read_lock_lite() support to rcutorture.reader_flavor

2024-10-15 Thread Paul E. McKenney
This commit causes bit 0x4 of rcutorture.reader_flavor to select the new srcu_read_lock_lite() and srcu_read_unlock_lite() functions. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: --- Documentation/admin-guide/kernel-pa

[PATCH rcu 04/15] srcu: Bit manipulation changes for additional reader flavor

2024-10-15 Thread Paul E. McKenney
Currently, there are only two flavors of readers, normal and NMI-safe. Very straightforward state updates suffice to check for erroneous mixing of reader flavors on a given srcu_struct structure. This commit upgrades the checking in preparation for the addition of light-weight (as in memory-barrie

[PATCH rcu 05/15] srcu: Standardize srcu_data pointers to "sdp" and similar

2024-10-15 Thread Paul E. McKenney
This commit changes a few "cpuc" variables to "sdp" to align with usage elsewhere. [ paulmck: Apply Neeraj Upadhyay feedback. ] Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: --- kernel/rcu/srcutree.c | 20 ++---

[PATCH rcu 02/15] srcu: Introduce srcu_gp_is_expedited() helper function

2024-10-15 Thread Paul E. McKenney
Even though the open-coded expressions usually fit on one line, this commit replaces them with a call to a new srcu_gp_is_expedited() helper function in order to improve readability. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstre

[PATCH rcu 14/15] refscale: Add srcu_read_lock_lite() support using "srcu-lite"

2024-10-15 Thread Paul E. McKenney
This commit creates a new srcu-lite option for the refscale.scale_type module parameter that selects srcu_read_lock_lite() and srcu_read_unlock_lite(). Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: --- kernel/rcu/refsca

[PATCH rcu 11/15] rcutorture: Add reader_flavor parameter for SRCU readers

2024-10-15 Thread Paul E. McKenney
This commit adds an rcutorture.reader_flavor parameter whose bits correspond to reader flavors. For example, SRCU's readers are 0x1 for normal and 0x2 for NMI-safe. Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryiko Cc: Peter Zijlstra Cc: Kent Overstreet Cc: --- ...

[PATCH rcu 03/15] srcu: Renaming in preparation for additional reader flavor

2024-10-15 Thread Paul E. McKenney
Currently, there are only two flavors of readers, normal and NMI-safe. A number of fields, functions, and types reflect this restriction. This renaming-only commit prepares for the addition of light-weight (as in memory-barrier-free) readers. OK, OK, there is also a drive-by white-space fixeup! S

[PATCH rcu 01/15] srcu: Rename srcu_might_be_idle() to srcu_should_expedite()

2024-10-15 Thread Paul E. McKenney
SRCU auto-expedites grace periods that follow a sufficiently long idle period, and the srcu_might_be_idle() function is used to make this decision. However, the upcoming light-weight SRCU readers will not do auto-expediting because doing so would cause the grace-period machinery to invoke synchron

[PATCH v3 rcu 0/13] SRCU-lite changes for v6.13

2024-10-15 Thread Paul E. McKenney
Hello! This v3 series adds support and testing for srcu_read_lock_lite() and srcu_read_unlock_lite(), which avoid smp_mb(), but add a couple of synchronize_rcu() calls to the grace-period processing and may only be used where RCU is watching. 1. Rename srcu_might_be_idle() to srcu_should_exp

Re: [PATCH] selftests: clone3: Use the capget and capset syscall directly

2024-10-15 Thread Shuah Khan
On 10/15/24 03:00, zhouyuhang wrote: [snip] for clarity. Why is this necessary? This is defined in linux/capability.h. Sorry for not noticing this before. This is to be compatible with some older versions of linux/capability.h that do not define this macro. +int capget(cap_user_header

Re: [PATCH bpf v1 1/2] bpf: fix link info netfilter flags to populate defrag flag

2024-10-15 Thread Florian Westphal
Tyrone Wu wrote: > This patch correctly populates the `bpf_link_info.netfilter.flags` field > when user passes the `BPF_F_NETFILTER_IP_DEFRAG` flag. Indeed, thanks for fixing this. Patch and testcase look good, but one nit: > Fixes: 84601d6ee68a ("bpf: add bpf_link support for BPF_NETFILTER prog

Re: [PATCH 1/3] selftests: Add a few missing gitignore files

2024-10-15 Thread Shuah Khan
On 10/14/24 19:08, Li Zhijian wrote: Binary files should be added to .gitignore 'git status' complains: Untracked files: (use "git add ..." to include in what will be committed) alsa/global-timer alsa/utimer-test filesystems/statmount/statmount_test_ns mm/hugetlb_dio

Re: [PATCH 2/3] selftests/net: Fix ./ns-XXXXXX not cleanup

2024-10-15 Thread Jakub Kicinski
On Tue, 15 Oct 2024 09:08:16 +0800 Li Zhijian wrote: > ``` > readonly STATS="$(mktemp -p /tmp ns-XX)" > readonly BASE=`basename $STATS` > ``` > It would be a mistake to write to $BASE rather than $STATS, where $STATS > is used to save the NSTAT_HISTORY and it will be cleaned up before exit. Sh

Re: [PATCH] rpmsg_ns: Work around TI non-standard message

2024-10-15 Thread Mathieu Poirier
Good morning Richard, On Fri, Oct 11, 2024 at 02:39:22PM +0200, Richard Weinberger wrote: > Texas Instruments ships a patch in their vendor kernels, > which adds a new NS message that includes a description field. > While TI is free to do whatever they want in their copy of the kernel, > it become

Re: [PATCH net-next v1 0/3] Threads support in proc connector

2024-10-15 Thread Jakub Kicinski
On Tue, 15 Oct 2024 16:22:24 + Anjali Kulkarni wrote: > Thank you! However, looking at the MAINTAINERS file, > drivers/connector/ is listed under NETWORKING DRIVERS. > Hence sending on net-next is the most appropriate place? Hm. It was done relatively recently in commit 46cf789b68b25744be3

Re: [PATCH net-next v1 0/3] Threads support in proc connector

2024-10-15 Thread Anjali Kulkarni
On 10/15/24, 9:48 AM, "Jakub Kicinski" mailto:k...@kernel.org>> wrote: On Tue, 15 Oct 2024 16:22:24 + Anjali Kulkarni wrote: > Thank you! However, looking at the MAINTAINERS file, > drivers/connector/ is listed under NETWORKING DRIVERS. > Hence sending on net-next is the most appropriate p

Re: [PATCH] mailbox, remoteproc: k3-m4+: fix compile testing

2024-10-15 Thread Nishanth Menon
On 12:26-20241014, Andrew Davis wrote: > Stubs only make sense for optional components, like GPIOLIB, where > the driver using that component can continue when it is not available. > For all drivers that depend on TI-SCI it is not optional. The dependent > driver *will* fail to probe and error out.

Re: [PATCH v1 4/5] dt-bindings: remoteproc: add binding for Microchip IPC remoteproc

2024-10-15 Thread Krzysztof Kozlowski
On 15/10/2024 14:09, valentina.fernandezala...@microchip.com wrote: > On 16/09/2024 21:14, Krzysztof Kozlowski wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the >> content is safe >> >> On 12/09/2024 19:00, Valentina Fernandez wrote: >>> Microchip family of RISC-

Re: [PATCH net-next v2 1/3] connector/cn_proc: Add hash table for threads

2024-10-15 Thread Liam R. Howlett
* Anjali Kulkarni [241015 13:30]: > Add a new type PROC_CN_MCAST_NOTIFY to proc connector API, which allows a > thread to notify the kernel that is going to exit with a non-zero exit > code and specify the exit code in it. When thread exits in the kernel, > it will send this exit code as a proc fi

Re: [PATCH v3 03/11] iommufd: Introduce IOMMUFD_OBJ_VIOMMU and its related struct

2024-10-15 Thread Nicolin Chen
On Mon, Oct 14, 2024 at 07:01:40PM -0700, Nicolin Chen wrote: > On Tue, Oct 15, 2024 at 09:15:01AM +0800, Zhangfei Gao wrote: > > > > > iommufd_device_bind > > > > iommufd_device_attach > > > > iommufd_vdevice_alloc_ioctl > > > > > > > > iommufd_device_detach > > > > iommufd_device_unbind // refco

Re: [PATCH rcu 2/3] rcu: Stop stall warning from dumping stacks if grace period ends

2024-10-15 Thread Joel Fernandes
On Wed, Oct 09, 2024 at 11:05:08AM -0700, Paul E. McKenney wrote: > Currently, once an RCU CPU stall warning decides to dump the stalling > CPUs' stacks, the rcu_dump_cpu_stacks() function persists until it > has gone through the full list. Unfortunately, if the stalled grace > periods ends midway

Re: [PATCH rcu 0/3] RCU CPU stall-warning changes for v6.13

2024-10-15 Thread Joel Fernandes
On Wed, Oct 09, 2024 at 11:05:02AM -0700, Paul E. McKenney wrote: > Hello! > > This series contains RCU CPU stall-warning changes for v6.13: > > 1.Delete unused rcu_gp_might_be_stalled() function. > > 2.Stop stall warning from dumping stacks if grace period ends. > > 3.Finer-grained

Re: [PATCH net-next v2 1/3] connector/cn_proc: Add hash table for threads

2024-10-15 Thread Anjali Kulkarni
Thanks for the review! See below: > On Oct 15, 2024, at 11:28 AM, Liam Howlett wrote: > > * Anjali Kulkarni [241015 13:30]: >> Add a new type PROC_CN_MCAST_NOTIFY to proc connector API, which allows a >> thread to notify the kernel that is going to exit with a non-zero exit >> code and specify

Re: [PATCH net-next v2 2/3] connector/cn_proc: Kunit tests for threads hash table

2024-10-15 Thread Liam R. Howlett
* Anjali Kulkarni [241015 13:30]: > Kunit tests to test hash table add, delete, duplicate add and delete. > Add following configs and compile kernel code: > > CONFIG_CONNECTOR=y > CONFIG_PROC_EVENTS=y > CONFIG_NET=y > CONFIG_KUNIT=m > CONFIG_CN_HASH_KUNIT_TEST=m > > To run kunit tests: > sudo mo

Re: [PATCH] selftests: clone3: Use the capget and capset syscall directly

2024-10-15 Thread zhouyuhang
在 2024/10/15 06:38, Shuah Khan 写道: On 10/12/24 02:28, zhouyuhang wrote: On 2024/10/11 22:21, Shuah Khan wrote: On 10/11/24 00:59, zhouyuhang wrote: On 2024/10/10 23:50, Shuah Khan wrote: On 10/10/24 06:16, zhouyuhang wrote: From: zhouyuhang The libcap commit aca076443591 ("Make cap_t o

Re: [PATCH v2 4/7] vhost: Add the vhost_worker to support kthread

2024-10-15 Thread Cindy Lu
On Tue, 15 Oct 2024 at 06:56, Mike Christie wrote: > > On 10/3/24 8:58 PM, Cindy Lu wrote: > > Add back the previously removed vhost_worker function to support the kthread > > and rename it vhost_run_work_kthread_list. > > > > The old function vhost_worker was change to support task in > > commit

Re: [PATCH v4] virtio: Make vring_new_virtqueue support for packed vring

2024-10-15 Thread Stefano Garzarella
On Sun, Oct 13, 2024 at 11:32:33AM +0800, huangwenyu1...@gmail.com wrote: From: Wenyu Huang It used for testing in tools/virtio/vringh_test.c. If vring_new_virtqueue supports packed vring, we can add support for packed vring to vringh and test it. I already asked this in v3, but didn't get an

Re: [PATCH v1 4/5] dt-bindings: remoteproc: add binding for Microchip IPC remoteproc

2024-10-15 Thread Valentina.FernandezAlanis
On 16/09/2024 21:14, Krzysztof Kozlowski wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 12/09/2024 19:00, Valentina Fernandez wrote: >> Microchip family of RISC-V SoCs typically has or more clusters. These >> clusters can be configured

Re: [PATCH 5/6] unicode: kunit: refactor selftest to kunit tests

2024-10-15 Thread Gabriel Krisman Bertazi
David Gow writes: > From: Gabriela Bittencourt > > Refactoring 'test' functions into kunit tests, to test utf-8 support in > unicode subsystem. > > This allows the utf8 tests to be run alongside the KUnit test suite > using kunit-tool, quickly compiling and running all desired tests as > part of

Re: [PATCH 6/6] unicode: kunit: change tests filename and path

2024-10-15 Thread Gabriel Krisman Bertazi
David Gow writes: > From: Gabriela Bittencourt > > Change utf8 kunit test filename and path to follow the style > convention on Documentation/dev-tools/kunit/style.rst > > Co-developed-by: Pedro Orlando > Signed-off-by: Pedro Orlando > Co-developed-by: Danilo Pereira > Signed-off-by: Danilo P

Re: [PATCH net-next v3 1/9] af_packet: avoid erroring out after sock_init_data() in packet_create()

2024-10-15 Thread Eric Dumazet
On Mon, Oct 14, 2024 at 5:38 PM Ignat Korchagin wrote: > > After sock_init_data() the allocated sk object is attached to the provided > sock object. On error, packet_create() frees the sk object leaving the > dangling pointer in the sock object on return. Some other code may try > to use this poin

Re: [PATCH 11/20] sched: Handle CPU isolation on last resort fallback rq selection

2024-10-15 Thread Frederic Weisbecker
Le Tue, Oct 08, 2024 at 11:54:35AM +0100, Will Deacon a écrit : > On Fri, Sep 27, 2024 at 12:48:59AM +0200, Frederic Weisbecker wrote: > > When a kthread or any other task has an affinity mask that is fully > > offline or unallowed, the scheduler reaffines the task to all possible > > CPUs as a las

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

2024-10-15 Thread Michael S. Tsirkin
On Mon, Oct 14, 2024 at 03:56:33PM -0500, Mike Christie wrote: > On 10/3/24 8:58 PM, Cindy Lu wrote: > > Add a new UAPI to support setting the vhost device to > > use task mode. The user space application needs to use > > VHOST_SET_INHERIT_FROM_OWNER to set the mode. > > This setting must be set be

Re: [PATCH v2] selftests/intel_pstate: fix operand expected

2024-10-15 Thread Alessandro Zanni
On 24/10/14 06:05, Shuah Khan wrote: > On 10/14/24 11:21, Alessandro Zanni wrote: > > This fix solves theses errors, when calling kselftest with > > targets "intel_pstate": > > > > ./run.sh: line 90: / 1000: syntax error: operand expected (error token is > > "/ 1000") > > > > ./run.sh: line 92:

[PATCH v2] selftests: clone3: Use the capget and capset syscall directly

2024-10-15 Thread zhouyuhang
From: zhouyuhang The libcap commit aca076443591 ("Make cap_t operations thread safe.") added a __u8 mutex at the beginning of the struct _cap_struct, it changes the offset of the members in the structure that breaks the assumption made in the "struct libcap" definition in clone3_cap_checkpoint_re

Re: [PATCH net-next v3 7/9] net: inet6: do not leave a dangling sk pointer in inet6_create()

2024-10-15 Thread Eric Dumazet
On Mon, Oct 14, 2024 at 11:39 PM Kuniyuki Iwashima wrote: > > From: Ignat Korchagin > Date: Mon, 14 Oct 2024 16:38:06 +0100 > > sock_init_data() attaches the allocated sk pointer to the provided sock > > object. If inet6_create() fails later, the sk object is released, but the > > sock object ret

Re: [RFC PATCH v2 2/2] rtc: add driver for Marvell 88PM886 PMIC RTC

2024-10-15 Thread Lee Jones
On Sat, 12 Oct 2024, Karel Balej wrote: > RTC lives on the chip's base register page. Add the relevant register > definitions and implement a basic set/read time functionality. Tested > with the samsung,coreprimevelte smartphone which contains this PMIC and > whose vendor kernel tree has also serv

Re: [RFC PATCH v2 1/2] mfd: 88pm886: add the RTC cell

2024-10-15 Thread Lee Jones
On Sat, 12 Oct 2024, Karel Balej wrote: > Add a MFD cell for the chip's real-time clock. > > Signed-off-by: Karel Balej > --- > > Notes: > RFC v2: > - Break out the register definitions and reword the commit message > accordingly. > - RFC v1: > https://lore.kernel.org/r/20240

Re: [PATCH v2 3/7] vhost: Add kthread support in function vhost_workers_free()

2024-10-15 Thread Cindy Lu
On Tue, 15 Oct 2024 at 14:52, Stefano Garzarella wrote: > > On Tue, Oct 15, 2024 at 02:05:47PM +0800, Cindy Lu wrote: > >On Tue, 15 Oct 2024 at 05:06, Mike Christie > >wrote: > >> > >> On 10/3/24 8:58 PM, Cindy Lu wrote: > >> > +static void vhost_workers_free(struct vhost_dev *dev) > >> > +{ > >

Re: [PATCH 2/4] kunit: qemu_configs: add LoongArch config

2024-10-15 Thread maobibo
Hi Thomas, Thanks for work it out on LoongArch. Reviewed-by: Bibo Mao On 2024/10/14 下午7:36, Thomas Weißschuh wrote: 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 --- tools

Re: [PATCH 4/4] kunit: qemu_configs: loongarch: Enable shutdown

2024-10-15 Thread maobibo
Reviewed-by: Bibo Mao On 2024/10/14 下午7:36, Thomas Weißschuh wrote: 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.

Re: [PATCH net-next v3 2/9] Bluetooth: L2CAP: do not leave dangling sk pointer on error in l2cap_sock_create()

2024-10-15 Thread Eric Dumazet
On Mon, Oct 14, 2024 at 11:23 PM Kuniyuki Iwashima wrote: > > From: Ignat Korchagin > Date: Mon, 14 Oct 2024 16:38:01 +0100 > > bt_sock_alloc() allocates the sk object and attaches it to the provided > > sock object. On error l2cap_sock_alloc() frees the sk object, but the > > dangling pointer is

Re: [PATCH net-next v3 3/9] Bluetooth: RFCOMM: avoid leaving dangling sk pointer in rfcomm_sock_alloc()

2024-10-15 Thread Eric Dumazet
On Mon, Oct 14, 2024 at 11:30 PM Kuniyuki Iwashima wrote: > > From: Ignat Korchagin > Date: Mon, 14 Oct 2024 16:38:02 +0100 > > bt_sock_alloc() attaches allocated sk object to the provided sock object. > > If rfcomm_dlc_alloc() fails, we release the sk object, but leave the > > dangling pointer i

Re: [PATCH net-next v3 5/9] net: ieee802154: do not leave a dangling sk pointer in ieee802154_create()

2024-10-15 Thread Eric Dumazet
On Mon, Oct 14, 2024 at 11:35 PM Kuniyuki Iwashima wrote: > > From: Ignat Korchagin > Date: Mon, 14 Oct 2024 16:38:04 +0100 > > sock_init_data() attaches the allocated sk object to the provided sock > > object. If ieee802154_create() fails later, the allocated sk object is > > freed, but the dang

Re: [PATCH net-next v3 6/9] net: inet: do not leave a dangling sk pointer in inet_create()

2024-10-15 Thread Eric Dumazet
On Mon, Oct 14, 2024 at 11:37 PM Kuniyuki Iwashima wrote: > > From: Ignat Korchagin > Date: Mon, 14 Oct 2024 16:38:05 +0100 > > sock_init_data() attaches the allocated sk object to the provided sock > > object. If inet_create() fails later, the sk object is freed, but the > > sock object retains

Re: [PATCH net-next v3 8/9] net: warn, if pf->create does not clear sock->sk on error

2024-10-15 Thread Eric Dumazet
On Mon, Oct 14, 2024 at 11:40 PM Kuniyuki Iwashima wrote: > > From: Ignat Korchagin > Date: Mon, 14 Oct 2024 16:38:07 +0100 > > All pf->create implementations have been fixed now to clear sock->sk on > > error, when they deallocate the allocated sk object. > > > > Put a warning in place to make s

Re: [PATCH net-next v3 9/9] Revert "net: do not leave a dangling sk pointer, when socket creation fails"

2024-10-15 Thread Eric Dumazet
On Mon, Oct 14, 2024 at 11:42 PM Kuniyuki Iwashima wrote: > > From: Ignat Korchagin > Date: Mon, 14 Oct 2024 16:38:08 +0100 > > This reverts commit 6cd4a78d962bebbaf8beb7d2ead3f34120e3f7b2. > > > > inet/inet6->create() implementations have been fixed to explicitly NULL the > > allocated sk object

[PATCH v2] selftest: hid: add the missing tests directory

2024-10-15 Thread Yun Lu
Commit 160c826b4dd0 ("selftest: hid: add missing run-hid-tools-tests.sh") has added the run-hid-tools-tests.sh script for it to be installed, but I forgot to add the tests directory together. If running the test case without the tests directory, will results in the following error message: m

Re: [PATCH] rpmsg_ns: Work around TI non-standard message

2024-10-15 Thread Richard Weinberger
Mathieu, Am Dienstag, 15. Oktober 2024, 18:48:08 CEST schrieb Mathieu Poirier: > Good morning Richard, > > On Fri, Oct 11, 2024 at 02:39:22PM +0200, Richard Weinberger wrote: > > Texas Instruments ships a patch in their vendor kernels, > > which adds a new NS message that includes a description f

Re: [PATCH net-next v04 0/3] net: af_packet: allow joining a fanout when link is down

2024-10-15 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Sun, 13 Oct 2024 10:15:24 +0300 you wrote: > PACKET socket can retain its fanout membership through link down and up > and leave a fanout while closed regardless of link state. > However, socket was forbidden from

[PATCH net-next v2 1/3] connector/cn_proc: Add hash table for threads

2024-10-15 Thread Anjali Kulkarni
Add a new type PROC_CN_MCAST_NOTIFY to proc connector API, which allows a thread to notify the kernel that is going to exit with a non-zero exit code and specify the exit code in it. When thread exits in the kernel, it will send this exit code as a proc filter notification to any listening process.

[PATCH net-next v2 0/3] Threads support in proc connector

2024-10-15 Thread Anjali Kulkarni
Recently we committed a fix to allow processes to receive notifications for non-zero exits via the process connector module. Commit is a4c9a56e6a2c. However, for threads, when it does a pthread_exit(&exit_status) call, the kernel is not aware of the exit status with which pthread_exit is called. I

[PATCH v3] selftests: tc-testing: Fix spelling errors in cgroup.json and flow.json

2024-10-15 Thread Karan Sanghavi
This patch corrects typographical errors in the "name" fields of the JSON objects with IDs "4319" and "4341" in the tc-testing selftests. - "diffferent" is corrected to "different". - "muliple" is corrected to "multiple". Signed-off-by: Karan Sanghavi --- v3: - Corrected the change logs to make

[PATCH net-next v2 3/3] connector/cn_proc: Selftest for threads

2024-10-15 Thread Anjali Kulkarni
Test to check if setting PROC_CN_MCAST_NOTIFY in proc connector API, allows a thread's non-zero exit status to be returned to proc_filter. The threads.c program creates 2 child threads. 1st thread handles signal SIGSEGV, and 2nd thread needs to indicate some error condition (value 1) to the kernel

[PATCH net-next v2 2/3] connector/cn_proc: Kunit tests for threads hash table

2024-10-15 Thread Anjali Kulkarni
Kunit tests to test hash table add, delete, duplicate add and delete. Add following configs and compile kernel code: CONFIG_CONNECTOR=y CONFIG_PROC_EVENTS=y CONFIG_NET=y CONFIG_KUNIT=m CONFIG_CN_HASH_KUNIT_TEST=m To run kunit tests: sudo modprobe cn_hash_test Output of kunit tests and hash table

Re: [PATCH 00/10] remoteproc: few dev_err_probe() and other cleanups/improvements

2024-10-15 Thread Mathieu Poirier
On Fri, Oct 11, 2024 at 03:09:08PM +0200, Krzysztof Kozlowski wrote: > Simplify drivers in few places around probe function. > > Best regards, > Krzysztof > > --- > Krzysztof Kozlowski (10): > remoteproc: da8xx: Handle deferred probe > remoteproc: da8xx: Simplify with dev_err_probe()

[RFC PATCH 4/7] selftests/damon: remove tests for DAMON debugfs interface

2024-10-15 Thread SeongJae Park
It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. Remove selftests for the interface, to prevent causing unnecessary test failures. Signed-off-by: SeongJae Park --- tools/testing/selftest

[RFC PATCH 5/7] kunit: configs: remove configs for DAMON debugfs interface tests

2024-10-15 Thread SeongJae Park
It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. Remove kernel configs for running DAMON debugfs interface kunit tests from the kunit all_tests configuration, to prevent unnecessary noises

[RFC PATCH 3/7] selftests/damon/config: remove configs for DAMON debugfs interface selftests

2024-10-15 Thread SeongJae Park
It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. Remove configs for selftests of it from DAMON selftests config file, to prevent unnecessary noises from the tests. [1] https://lore.kernel.

[RFC PATCH 6/7] mm/damon: remove DAMON debugfs interface kunit tests

2024-10-15 Thread SeongJae Park
It's time to remove DAMON debugfs interface, which has deprecated long before in February 2023. Read the cover letter of this patch series for more details. Remove kunit tests for the interface, to prevent unnecessary test failures. Signed-off-by: SeongJae Park --- mm/damon/Kconfig

Re: [PATCH] rpmsg_ns: Work around TI non-standard message

2024-10-15 Thread Mathieu Poirier
On Tue, Oct 15, 2024 at 06:58:33PM +0200, Richard Weinberger wrote: > Mathieu, > > Am Dienstag, 15. Oktober 2024, 18:48:08 CEST schrieb Mathieu Poirier: > > Good morning Richard, > > > > On Fri, Oct 11, 2024 at 02:39:22PM +0200, Richard Weinberger wrote: > > > Texas Instruments ships a patch in t

Re: [PATCH v2] selftests: clone3: Use the capget and capset syscall directly

2024-10-15 Thread Shuah Khan
On 10/15/24 04:59, zhouyuhang wrote: From: zhouyuhang The libcap commit aca076443591 ("Make cap_t operations thread safe.") added a __u8 mutex at the beginning of the struct _cap_struct, it changes the offset of the members in the structure that breaks the assumption made in the "struct libcap"

Re: [PATCH net-next v1 0/3] Threads support in proc connector

2024-10-15 Thread Anjali Kulkarni
On 10/15/24, 9:02 AM, "Jakub Kicinski" mailto:k...@kernel.org>> wrote: On Sun, 13 Oct 2024 10:06:14 -0700 Anjali Kulkarni wrote: > However, for threads, when it does a pthread_exit(&exit_status) call, the > kernel is not aware of the exit status with which pthread_exit is called. > It is sent

Re: [PATCH net v2 0/2] mptcp: prevent MPC handshake on port-based signal endpoints

2024-10-15 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Mon, 14 Oct 2024 16:05:59 +0200 you wrote: > MPTCP connection requests toward a listening socket created by the > in-kernel PM for a port based signal endpoint will never be accepted, > they need to be explicitly rejec

Re: [PATCH] rpmsg_ns: Work around TI non-standard message

2024-10-15 Thread Richard Weinberger
Am Dienstag, 15. Oktober 2024, 19:56:08 CEST schrieb Mathieu Poirier: > > > In my opinion the real fix here is to get TI to use the standard message > > > announcement structure. The ->desc field doesn't seem to be that useful > > > since > > > it gets discarted. > > > > This is for the future,

[PATCH v3] remoteproc: Add a new remoteproc state RPROC_DEFUNCT

2024-10-15 Thread Mukesh Ojha
Multiple call to glink_subdev_stop() for the same remoteproc can happen if rproc_stop() fails from Process-A that leaves the rproc state to RPROC_CRASHED state later a call to recovery_store from user space in Process B triggers rproc_trigger_recovery() of the same remoteproc to recover it results

Re: [PATCH net-next v2 1/3] connector/cn_proc: Add hash table for threads

2024-10-15 Thread Anjali Kulkarni
[..snip..] >> +void cn_hash_free_elem(struct uexit_pid_hnode *elem); >> +int cn_hash_add_elem(struct cn_hash_dev *hdev, __u32 uexit_code, pid_t pid); >> +int cn_hash_del_elem(struct cn_hash_dev *hdev, pid_t pid); >> +__u32 cn_hash_del_get_exval(struct cn_hash_dev *hdev, pid_t pid); >> +__u32 cn_

Re: [PATCH v2] remoteproc: Add a new remoteproc state RPROC_DEFUNCT

2024-10-15 Thread kernel test robot
Hi Mukesh, kernel test robot noticed the following build warnings: [auto build test WARNING on remoteproc/rproc-next] [also build test WARNING on linus/master v6.12-rc3 next-20241015] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to

Re: [PATCH v3 03/11] iommufd: Introduce IOMMUFD_OBJ_VIOMMU and its related struct

2024-10-15 Thread Nicolin Chen
On Wed, Oct 16, 2024 at 09:56:51AM +0800, Zhangfei Gao wrote: > On Wed, 16 Oct 2024 at 02:44, Nicolin Chen wrote: > > > > On Mon, Oct 14, 2024 at 07:01:40PM -0700, Nicolin Chen wrote: > > > On Tue, Oct 15, 2024 at 09:15:01AM +0800, Zhangfei Gao wrote: > > > > > > > > > iommufd_device_bind > > > >

Re: [PATCH v2] remoteproc: Add a new remoteproc state RPROC_DEFUNCT

2024-10-15 Thread kernel test robot
Hi Mukesh, kernel test robot noticed the following build warnings: [auto build test WARNING on remoteproc/rproc-next] [also build test WARNING on linus/master v6.12-rc3 next-20241015] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to

Re: [PATCH v3 04/11] iommufd/viommu: Add IOMMU_VIOMMU_ALLOC ioctl

2024-10-15 Thread Nicolin Chen
On Wed, Oct 09, 2024 at 09:38:04AM -0700, Nicolin Chen wrote: > +int iommufd_viommu_alloc_ioctl(struct iommufd_ucmd *ucmd) [...] > + if (cmd->type == IOMMU_VIOMMU_TYPE_DEFAULT) { > + viommu = __iommufd_viommu_alloc(ucmd->ictx, sizeof(*viommu), > +

[PATCH v2] selftest/tcp-ao: Add filter tests

2024-10-15 Thread Leo Stone
Add tests that check if getsockopt(TCP_AO_GET_KEYS) returns the right keys when using different filters. Sample output: > # ok 114 filter keys: by sndid, rcvid, address > # ok 115 filter keys: by is_current > # ok 116 filter keys: by is_rnext > # ok 117 filter keys: by sndid, rcvid > # ok 118 fil

Re: [PATCH v2 1/3] pidfd: extend pidfd_get_pid() and de-duplicate pid lookup

2024-10-15 Thread Lorenzo Stoakes
On Tue, Oct 15, 2024 at 12:40:41PM -0700, Suren Baghdasaryan wrote: [snip] > > -struct pid *pidfd_get_pid(unsigned int fd, unsigned int *flags) > > +struct pid *__pidfd_get_pid(unsigned int pidfd, bool pin_pid, > > + bool allow_proc, unsigned int *flags, > > +

Re: [PATCH v1 4/5] dt-bindings: remoteproc: add binding for Microchip IPC remoteproc

2024-10-15 Thread Conor Dooley
On Tue, Oct 15, 2024 at 03:35:46PM +0200, Krzysztof Kozlowski wrote: > On 15/10/2024 14:09, valentina.fernandezala...@microchip.com wrote: > > On 16/09/2024 21:14, Krzysztof Kozlowski wrote: > >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the > >> content is safe > >> >

Re: [RFC PATCH 26/39] KVM: guest_memfd: Track faultability within a struct kvm_gmem_private

2024-10-15 Thread Peter Xu
On Fri, Oct 11, 2024 at 11:32:11PM +, Ackerley Tng wrote: > Peter Xu writes: > > > On Tue, Sep 10, 2024 at 11:43:57PM +, Ackerley Tng wrote: > >> The faultability xarray is stored on the inode since faultability is a > >> property of the guest_memfd's memory contents. > >> > >> In this R

Re: [PATCH rcu 0/3] RCU CPU stall-warning changes for v6.13

2024-10-15 Thread Joel Fernandes
On Tue, Oct 15, 2024 at 04:02:37PM -0700, Paul E. McKenney wrote: > On Tue, Oct 15, 2024 at 02:49:06PM -0400, Joel Fernandes wrote: > > On Wed, Oct 09, 2024 at 11:05:02AM -0700, Paul E. McKenney wrote: > > > Hello! > > > > > > This series contains RCU CPU stall-warning changes for v6.13: > > > >

Re: [PATCH net-next v2 2/3] connector/cn_proc: Kunit tests for threads hash table

2024-10-15 Thread Liam R. Howlett
* Anjali Kulkarni [241015 17:11]: ... > >> +MODULE_DESCRIPTION("KUnit test for the connector threads hashtable code"); > >> +MODULE_LICENSE("GPL"); > >> diff --git a/lib/cn_hash_test.h b/lib/cn_hash_test.h > >> new file mode 100644 > >> index ..46fcda31b25c > >> --- /dev/null > >> ++

Re: [PATCH net-next v2 3/3] connector/cn_proc: Selftest for threads

2024-10-15 Thread Liam R. Howlett
* Anjali Kulkarni [241015 17:28]: > > > > On Oct 15, 2024, at 12:27 PM, Liam Howlett wrote: > > > > * Anjali Kulkarni [241015 13:30]: > >> Test to check if setting PROC_CN_MCAST_NOTIFY in proc connector API, allows > >> a thread's non-zero exit status to be returned to proc_filter. > >> > >>

Re: [PATCH v3 03/11] iommufd: Introduce IOMMUFD_OBJ_VIOMMU and its related struct

2024-10-15 Thread Zhangfei Gao
On Wed, 16 Oct 2024 at 02:44, Nicolin Chen wrote: > > On Mon, Oct 14, 2024 at 07:01:40PM -0700, Nicolin Chen wrote: > > On Tue, Oct 15, 2024 at 09:15:01AM +0800, Zhangfei Gao wrote: > > > > > > > iommufd_device_bind > > > > > iommufd_device_attach > > > > > iommufd_vdevice_alloc_ioctl > > > > > >

[PATCH rcu] configs/debug: make sure PROVE_RCU_LIST=y takes effect

2024-10-15 Thread Jakub Kicinski
Commit 0aaa8977acbf ("configs: introduce debug.config for CI-like setup") added CONFIG_PROVE_RCU_LIST=y to the common CI config, but RCU_EXPERT is not set, and it's a dependency for CONFIG_PROVE_RCU_LIST=y. Make sure CIs take advantage of CONFIG_PROVE_RCU_LIST=y, recent fixes in networking indicate

[PATCH net-next v9 23/23] testing/selftest: add test tool and scripts for ovpn module

2024-10-15 Thread Antonio Quartulli
The ovpn-cli tool can be compiled and used as selftest for the ovpn kernel module. It implements the netlink API and can thus be integrated in any script for more automated testing. Along with the tool, 2 scripts are added that perform basic functionality tests by means of network namespaces. Th

Re: [PATCH net-next v3 0/9] do not leave dangling sk pointers in pf->create functions

2024-10-15 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Mon, 14 Oct 2024 16:37:59 +0100 you wrote: > Some protocol family create() implementations have an error path after > allocating the sk object and calling sock_init_data(). sock_init_data() > attaches the allocate

Re: [PATCH rcu] configs/debug: make sure PROVE_RCU_LIST=y takes effect

2024-10-15 Thread Joel Fernandes
On Tue, Oct 15, 2024 at 06:11:44PM -0700, Jakub Kicinski wrote: > Commit 0aaa8977acbf ("configs: introduce debug.config for CI-like setup") > added CONFIG_PROVE_RCU_LIST=y to the common CI config, > but RCU_EXPERT is not set, and it's a dependency for > CONFIG_PROVE_RCU_LIST=y. Make sure CIs take a

[PATCH 00/12] Module Validation Refactor

2024-10-15 Thread Matthew Maurer
Split out from Extended MODVERSIONS Support [1] This series refactors module validation during loading to ensure that everything is checked on its way in. This is intended to make the code robust enough that we can more confidently add new pieces like extended MODVERSIONS. [1] https://lore.kernel

[PATCH 04/12] module: Factor out elf_validity_cache_secstrings

2024-10-15 Thread Matthew Maurer
Factor out the validation of section names. There are two behavioral changes: 1. Previously, we did not validate non-SHF_ALLOC sections. This may have once been safe, as find_sec skips non-SHF_ALLOC sections, but find_any_sec, which will be used to load BTF if that is enabled, ignores th

[PATCH 03/12] module: Factor out elf_validity_cache_sechdrs

2024-10-15 Thread Matthew Maurer
Factor out and document the validation of section headers. Because we now validate all section offsets and lengths before accessing them, we can remove the ad-hoc checks. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 125 --- 1 file changed, 82

[PATCH 01/12] module: Take const arg in validate_section_offset

2024-10-15 Thread Matthew Maurer
`validate_section_offset` doesn't modify the info passed in. Make this clear by adjusting the type signature. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index ef54733bd7d2.

[PATCH 02/12] module: Factor out elf_validity_ehdr

2024-10-15 Thread Matthew Maurer
Factor out verification of the ELF header and document what is checked. Signed-off-by: Matthew Maurer --- kernel/module/main.c | 70 +--- 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/kernel/module/main.c b/kernel/module/main.c index 1ed1

Re: [PATCH v5 14/16] modules: Support extended MODVERSIONS info

2024-10-15 Thread Matthew Maurer
So, the basic things I can think of to test here are: 1. The kernel can still load the previous MODVERSIONS format 2. The kernel can load the new MODVERSIONS format 3. If we artificially tweak a CRC in the previous format, it will fail to load. 4. If we artificially tweak a CRC in the new format,

Re: [PATCH rcu 0/3] RCU CPU stall-warning changes for v6.13

2024-10-15 Thread Paul E. McKenney
On Tue, Oct 15, 2024 at 02:49:06PM -0400, Joel Fernandes wrote: > On Wed, Oct 09, 2024 at 11:05:02AM -0700, Paul E. McKenney wrote: > > Hello! > > > > This series contains RCU CPU stall-warning changes for v6.13: > > > > 1. Delete unused rcu_gp_might_be_stalled() function. > > > > 2. Stop stal

  1   2   >