Re: [PATCH v2] mac802154: Fix potential RCU dereference issue in mac802154_scan_worker

2024-09-20 Thread Jiawei Ye
Hi Miquèl, I'm sorry for the accidental email sent while testing my email setup. Please disregard the previous message. On 9/20/24 19:21, Miquel Raynal wrote: > Hi Jiawei, > > jiawei...@foxmail.com wrote on Fri, 20 Sep 2024 04:03:32 +: > > > In the `mac802154_scan_worker` function, the `sc

Re: [PATCH v3 0/1] Add KUnit tests for llist

2024-09-20 Thread Artur Alves Cavalcante de Barros
On 9/20/24 12:10 PM, Shuah Khan wrote: On 9/20/24 01:10, David Gow wrote: On Fri, 20 Sept 2024 at 00:01, Shuah Khan wrote: On 9/16/24 18:51, Artur Alves wrote: Hi all, This is part of a hackathon organized by LKCAMP[1], focused on writing tests using KUnit. We reached out a while ago asking

Re: [PATCH v3 0/1] Add KUnit tests for llist

2024-09-20 Thread Artur Alves Cavalcante de Barros
On 9/20/24 4:10 AM, David Gow wrote: On Fri, 20 Sept 2024 at 00:01, Shuah Khan wrote: On 9/16/24 18:51, Artur Alves wrote: Hi all, This is part of a hackathon organized by LKCAMP[1], focused on writing tests using KUnit. We reached out a while ago asking for advice on what would be a useful

Re: [PATCH] selftests: Makefile: create OUTPUT dir

2024-09-20 Thread Jakub Kicinski
On Thu, 19 Sep 2024 09:51:47 -0600 Shuah Khan wrote: > > @@ -261,6 +261,7 @@ ifdef INSTALL_PATH > > @ret=1; \ > > for TARGET in $(TARGETS) $(INSTALL_DEP_TARGETS); do \ > > BUILD_TARGET=$$BUILD/$$TARGET; \ > > + mkdir -p $$BUILD_TARGET;\ > > $(MAKE)

Re: [PATCH net-next 1/2] connector/cn_proc: Handle threads for proc connector

2024-09-20 Thread Oleg Nesterov
On 09/19, Anjali Kulkarni wrote: > > @@ -413,6 +416,10 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg, > if (msg->len == sizeof(*pinput)) { > pinput = (struct proc_input *)msg->data; > mc_op = pinput->mcast_op; > + if (mc_op == PROC_CN_MCAST_NOTIFY

Re: [PATCH v2 7/7] kunit, slub: add test_kfree_rcu() and test_leak_destroy()

2024-09-20 Thread Guenter Roeck
Hi, On Wed, Aug 07, 2024 at 12:31:20PM +0200, Vlastimil Babka wrote: > Add a test that will create cache, allocate one object, kfree_rcu() it > and attempt to destroy it. As long as the usage of kvfree_rcu_barrier() > in kmem_cache_destroy() works correctly, there should be no warnings in > dmesg

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-20 Thread Jonas Oberhauser
Am 9/19/2024 um 10:30 PM schrieb Jonas Oberhauser: Am 9/19/2024 um 2:12 AM schrieb Jann Horn: On Tue, Sep 17, 2024 at 4:33 PM Boqun Feng wrote: Hazard pointers [1] provide a way to dynamically distribute refcounting and can be used to improve the scalability of refcounting without signif

Re: [PATCH v3 0/1] Add KUnit tests for llist

2024-09-20 Thread David Gow
On Fri, 20 Sept 2024 at 00:01, Shuah Khan wrote: > > On 9/16/24 18:51, Artur Alves wrote: > > Hi all, > > > > This is part of a hackathon organized by LKCAMP[1], focused on writing > > tests using KUnit. We reached out a while ago asking for advice on what > > would be a useful contribution[2] and

Re: [PATCH net v2] selftests: forwarding: Avoid false MDB delete/flush failures

2024-09-20 Thread Jamie Bainbridge
On Fri, 20 Sept 2024 at 00:56, Ido Schimmel wrote: > > Hi, > > Thanks for the patch and sorry for the late reply (was OOO). > > On Mon, Sep 16, 2024 at 07:49:05PM +1000, Jamie Bainbridge wrote: > > Running this test on a small system produces different failures every > > test checking deletions, a

Re: [RFC PATCH 14/39] KVM: guest_memfd: hugetlb: initialization and cleanup

2024-09-20 Thread Vishal Annapurve
On Wed, Sep 11, 2024 at 1:44 AM Ackerley Tng wrote: > > ... > +} > + > +static void kvm_gmem_evict_inode(struct inode *inode) > +{ > + u64 flags = (u64)inode->i_private; > + > + if (flags & KVM_GUEST_MEMFD_HUGETLB) > + kvm_gmem_hugetlb_teardown(inode); > + else > +

Re: [PATCH v2 1/5] dt-bindings: remoteproc: sse710: Add the External Systems remote processors

2024-09-20 Thread Krzysztof Kozlowski
On 19/09/2024 16:57, Abdellatif El Khlifi wrote: > Hi Krzysztof, > > + '#extsys-id': '#' is not correct for sure, that's not a cell specifier. But anyway, we do not accept in general instance IDs. >>> >>> I'm happy to replace the instance ID with another solution. >>> In

Re: [RFC PATCH 1/4] hazptr: Add initial implementation of hazard pointers

2024-09-20 Thread Jonas Oberhauser
Am 9/17/2024 um 4:33 PM schrieb Boqun Feng: +static inline void *__hazptr_tryprotect(hazptr_t *hzp, + void *const *p, + unsigned long head_offset) +{ + void *ptr; + struct callback_head *head; + + ptr

[PATCH v6] ptp: Add support for the AMZNC10C 'vmclock' device

2024-09-20 Thread David Woodhouse
From: David Woodhouse The vmclock device addresses the problem of live migration with precision clocks. The tolerances of a hardware counter (e.g. TSC) are typically around ±50PPM. A guest will use NTP/PTP/PPS to discipline that counter against an external source of 'real' time, and track the pre

[PATCH 0/2] livepatch: introduce 'order' sysfs interface to klp_patch

2024-09-20 Thread Wardenjohn
As previous discussion, maintainers think that patch-level sysfs interface is the only acceptable way to maintain the information of the order that klp_patch is applied to the system. However, the previous patch introduce klp_ops into klp_func is a optimization methods of the patch introducing

[PATCH 2/2] Documentation: Add description to klp_patch order interface

2024-09-20 Thread Wardenjohn
Update description of klp_patch order sysfs interface to livepatch ABI documentation. Signed-off-by: Wardenjohn diff --git a/Documentation/ABI/testing/sysfs-kernel-livepatch b/Documentation/ABI/testing/sysfs-kernel-livepatch index 3735d868013d..14218419b9ea 100644 --- a/Documentation/ABI/testin

[PATCH 1/2] livepatch: introduce 'order' sysfs interface to klp_patch

2024-09-20 Thread Wardenjohn
This feature can provide livepatch patch order information. With the order of sysfs interface of one klp_patch, we can use patch order to find out which function of the patch is now activate. After the discussion, we decided that patch-level sysfs interface is the only accaptable way to introduce

[PATCH] remoteproc: virtio: Add synchronize_cbs to remoteproc_virtio

2024-09-20 Thread Mark-PK Tsai
Add synchornize_cbs to rproc_virtio_config_ops and a synchronize_vqs callback to the rproc_ops to ensure vqs' state changes are visible in vring_interrupts when the vq is broken or removed. And when VIRTIO_HARDEN_NOTIFICATION is not set, call rproc_virtio_synchronize_cbs directly in __rproc_virtio

[PATCH v3 3/3] selftests: livepatch: test livepatching a kprobed function

2024-09-20 Thread Michael Vetter
The test proves that a function that is being kprobed and uses a post_handler cannot be livepatched. Only one ftrace_ops with FTRACE_OPS_FL_IPMODIFY set may be registered to any given function at a time. Signed-off-by: Michael Vetter --- tools/testing/selftests/livepatch/Makefile| 3 +- ..

[PATCH v3 0/3] selftests: livepatch: test livepatching a kprobed function

2024-09-20 Thread Michael Vetter
This patchset adds a test for livepatching a kprobed function. Thanks to Petr and Marcos for the reviews! V3: Save and restore kprobe state also when test fails, by integrating it into setup_config() and cleanup(). Rename SYSFS variables in a more logical way. Sort test modules in alphabetical or

[PATCH v3 1/3] selftests: livepatch: rename KLP_SYSFS_DIR to SYSFS_KLP_DIR

2024-09-20 Thread Michael Vetter
This naming makes more sense according to the directory structure. Especially when we later add more paths. Signed-off-by: Michael Vetter --- tools/testing/selftests/livepatch/functions.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/livepatch

[PATCH v3 2/3] selftests: livepatch: save and restore kprobe state

2024-09-20 Thread Michael Vetter
Save the state of /sys/kernel/livepatch/debug/kprobes/enabled during setup_config() and restore it during cleanup(). This is in preparation for a future commit that will add a test that should confirm that we cannot livepatch a kprobed function if that kprobe has a post handler. Signed-off-by: Mi

Re: [PATCH v2 1/5] dt-bindings: remoteproc: sse710: Add the External Systems remote processors

2024-09-20 Thread Abdellatif El Khlifi
Hi Krzysztof, > > + '#extsys-id': > > '#' is not correct for sure, that's not a cell specifier. > > But anyway, we do not accept in general instance IDs. > >>> > >>> I'm happy to replace the instance ID with another solution. > >>> In our case the remoteproc instance does

Re: [PATCH v2 1/5] dt-bindings: remoteproc: sse710: Add the External Systems remote processors

2024-09-20 Thread Abdellatif El Khlifi
Hi Krzysztof, > >>> + '#extsys-id': > >> > >> '#' is not correct for sure, that's not a cell specifier. > >> > >> But anyway, we do not accept in general instance IDs. > > > > I'm happy to replace the instance ID with another solution. > > In our case the remotepr

[RFC PATCH 1/2] mfd: 88pm886: add the RTC cell and relevant definitions

2024-09-20 Thread Karel Balej
RTC lives on the base register page of the chip. Add definitions of the registers needed for a basic set/read time functionality. Signed-off-by: Karel Balej --- drivers/mfd/88pm886.c | 1 + include/linux/mfd/88pm886.h | 9 + 2 files changed, 10 insertions(+) diff --git a/drivers/m

Re: [PATCH net-next 1/2] connector/cn_proc: Handle threads for proc connector

2024-09-20 Thread Oleg Nesterov
On 09/20, Anjali Kulkarni wrote: > > > On Sep 20, 2024, at 4:00 AM, Oleg Nesterov wrote: > > > > I don't think you can use task_struct->exit_code. If this task is ptraced, > > it can be changed/cleared in, say, ptrace_stop() after PROC_CN_MCAST_NOTIFY. > > > > Thank you, that’s a good point! Howev

Re: [BUG] selftests/nci: ./nci_dev hang in wait4()

2024-09-20 Thread Mirsad Todorovac
On 9/20/24 18:22, Mirsad Todorovac wrote: > Hi, all, > > I was testing Linux torvalds tree vanilla kernel, and I've noticed for a > number of releases this > ./nci_dev stops testing until it's terminated (15). > > Now, I tried to examine what went wrong, I hoped it will go away by itself. > it

Re: [PATCH 1/2] kselftests: mm: Fix wrong __NR_userfaultfd value

2024-09-20 Thread Shuah Khan
On 9/17/24 23:46, Muhammad Usama Anjum wrote: On 9/17/24 6:56 AM, Shuah Khan wrote: On 9/16/24 00:32, Muhammad Usama Anjum wrote: On 9/12/24 8:44 PM, Shuah Khan wrote: On 9/12/24 04:31, Muhammad Usama Anjum wrote: The value of __NR_userfaultfd was changed to 282 when asm-generic/unistd.h was

Re: [PATCH net-next 1/2] connector/cn_proc: Handle threads for proc connector

2024-09-20 Thread Anjali Kulkarni
> On Sep 20, 2024, at 4:00 AM, Oleg Nesterov wrote: > > On 09/19, Anjali Kulkarni wrote: >> >> @@ -413,6 +416,10 @@ static void cn_proc_mcast_ctl(struct cn_msg *msg, >> if (msg->len == sizeof(*pinput)) { >> pinput = (struct proc_input *)msg->data; >> mc_op = pinp

Re: [RFC PATCH 1/3] ipv4: Run a reverse sk_lookup on sendmsg.

2024-09-20 Thread Tiago Lam
On Wed, Sep 18, 2024 at 08:45:23AM -0400, Willem de Bruijn wrote: > Tiago Lam wrote: > > In order to check if egress traffic should be allowed through, we run a > > reverse socket lookup (i.e. normal socket lookup with the src/dst > > addresses and ports reversed) to check if the corresponding ingr

[RFC PATCH v2 0/3] Allow sk_lookup UDP return traffic to egress when setting src port/address.

2024-09-20 Thread Tiago Lam
Currently, sk_lookup allows an ebpf program to run on the ingress socket lookup path, and accept traffic not only on a range of addresses, but also on a range of ports. At Cloudflare we use sk_lookup for two main cases: 1. Sharing a single port between multiple services - i.e. two services (or m

[RFC PATCH v2 1/3] ipv4: Support setting src port in sendmsg().

2024-09-20 Thread Tiago Lam
sendmsg() doesn't currently allow users to set the src port from which egress traffic should be sent from. This is possible if a user wants to configure the src address from which egress traffic should be sent from - with the IP_PKTINFO ancillary message, a user is currently able to specify a sou

[RFC PATCH v2 3/3] bpf: Add sk_lookup test to use ORIGDSTADDR cmsg.

2024-09-20 Thread Tiago Lam
This patch reuses the framework already in place for sk_lookup, allowing it now to send a reply from the server fd directly, instead of having to create a socket bound to the original destination address and reply from there. It does this by passing the source address and port from where to reply f

[RFC PATCH v2 2/3] ipv6: Support setting src port in sendmsg().

2024-09-20 Thread Tiago Lam
This follows the same rationale provided for the ipv4 counterpart, where the sendmsg() path is also extended here to support the IPV6_ORIGDSTADDR ancillary message to be able to specify a source address/port. This allows users to configure the source address and/or port egress traffic should be sen

[PATCH] virtio: Make vring_new_virtqueue support for packed vring

2024-09-20 Thread Wenyu Huang
From: Wenyu Huang It's also available for packed ring now. Signed-off-by: Wenyu Huang --- drivers/virtio/virtio_ring.c | 153 +-- 1 file changed, 92 insertions(+), 61 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index be

Re: [PATCH bpf-next v2 2/2] bpf: selftests: verifier: Add nullness elision tests

2024-09-20 Thread Eduard Zingerman
On Sun, 2024-09-15 at 21:45 -0600, Daniel Xu wrote: > Test that nullness elision works for common use cases. For example, we > want to check that both full and subreg stack slots are recognized. As > well as when there's both const and non-const values of R2 leading up to > a lookup. And obviously

Re: [PATCH bpf-next v2 1/2] bpf: verifier: Support eliding map lookup nullness

2024-09-20 Thread Eduard Zingerman
On Sun, 2024-09-15 at 21:45 -0600, Daniel Xu wrote: > This commit allows progs to elide a null check on statically known map > lookup keys. In other words, if the verifier can statically prove that > the lookup will be in-bounds, allow the prog to drop the null check. > > This is useful for two re

Re: [PATCH v2 1/5] dt-bindings: remoteproc: sse710: Add the External Systems remote processors

2024-09-20 Thread Krzysztof Kozlowski
On 20/09/2024 16:19, Abdellatif El Khlifi wrote: > Hi Krzysztof, > >>> + '#extsys-id': >> >> '#' is not correct for sure, that's not a cell specifier. >> >> But anyway, we do not accept in general instance IDs. > > I'm happy to replace the instance ID with another sol

Re: [PATCH v2] mac802154: Fix potential RCU dereference issue in mac802154_scan_worker

2024-09-20 Thread Miquel Raynal
Hi Jiawei, jiawei...@foxmail.com wrote on Fri, 20 Sep 2024 04:03:32 +: > In the `mac802154_scan_worker` function, the `scan_req->type` field was > accessed after the RCU read-side critical section was unlocked. According > to RCU usage rules, this is illegal and can lead to unpredictable > be

Re: [PATCH net-next 1/2] connector/cn_proc: Handle threads for proc connector

2024-09-20 Thread Anjali Kulkarni
> On Sep 20, 2024, at 11:44 AM, Oleg Nesterov wrote: > > On 09/20, Anjali Kulkarni wrote: >> >>> On Sep 20, 2024, at 4:00 AM, Oleg Nesterov wrote: >>> >>> I don't think you can use task_struct->exit_code. If this task is ptraced, >>> it can be changed/cleared in, say, ptrace_stop() after PRO

Re: [PATCH v3 0/1] Add KUnit tests for llist

2024-09-20 Thread Shuah Khan
On 9/20/24 01:10, David Gow wrote: On Fri, 20 Sept 2024 at 00:01, Shuah Khan wrote: On 9/16/24 18:51, Artur Alves wrote: Hi all, This is part of a hackathon organized by LKCAMP[1], focused on writing tests using KUnit. We reached out a while ago asking for advice on what would be a useful co

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

2024-09-20 Thread Karel Balej
Only basic set/read time functionality is supported at the moment. Tested with the samsung,coreprimevelte smartphone which contains this PMIC and whose vendor kernel tree has also served as the sole reference for this. Signed-off-by: Karel Balej --- MAINTAINERS | 1 + drivers/rtc/

[PATCH] selftest: remoteproc: Add basic test for start/stop sequence

2024-09-20 Thread Wasim Nazir
Add new basic remoteproc test that check start/stop sequence of all subsystems available. diff --git a/MAINTAINERS b/MAINTAINERS index e062b5328341..aff76edc4242 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18225,6 +18225,7 @@ F: Documentation/staging/remoteproc.rst F: drivers/remotepr