Re: [PATCH 12/19] kthread: Default affine kthread to its preferred NUMA node

2024-09-16 Thread Vlastimil Babka
On 9/17/24 8:26 AM, Michal Hocko wrote: > On Tue 17-09-24 00:49:16, Frederic Weisbecker wrote: >> Kthreads attached to a preferred NUMA node for their task structure >> allocation can also be assumed to run preferrably within that same node. >> >> A more precise affinity is usually notified by call

Re: [PATCH 12/19] kthread: Default affine kthread to its preferred NUMA node

2024-09-16 Thread Michal Hocko
On Tue 17-09-24 00:49:16, Frederic Weisbecker wrote: > Kthreads attached to a preferred NUMA node for their task structure > allocation can also be assumed to run preferrably within that same node. > > A more precise affinity is usually notified by calling > kthread_create_on_cpu() or kthread_bind

Re: [RFC PATCH] remoteproc: k3-r5: Fix check performed in k3_r5_rproc_{mbox_callback/kick}

2024-09-16 Thread Kumar, Udit
On 9/16/2024 8:50 PM, Mathieu Poirier wrote: On Mon, 16 Sept 2024 at 02:31, Siddharth Vadapalli wrote: Commit f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during probe routine") introduced a check in the "k3_r5_rproc_mbox_callback()" and "k3_r5_rproc_kick()" callbacks, causing them

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

2024-09-16 Thread Shuah Khan
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 included. It makes the test to fail every time as the correct number of this syscall o

[GIT PULL] KUnit update for Linux 6.12-rc1

2024-09-16 Thread Shuah Khan
Hi Linus, Please pull the following kunit update for Linux 6.12-rc1. This kunit update for Linux 6.12-rc1 consists of: -- a new int_pow test suite -- documentation update to clarify filename best practices -- kernel-doc fix for EXPORT_SYMBOL_IF_KUNIT -- change to build compile_commands.json aut

[PATCH v3 1/1] lib/llist_kunit.c: add KUnit tests for llist

2024-09-16 Thread Artur Alves
Add KUnit tests for the llist data structure. They test the vast majority of methods and macros defined in include/linux/llist.h. These are inspired by the existing tests for the 'list' doubly linked in lib/list-test.c. Each test case (llist_test_x) tests the behaviour of the llist function/macro

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

2024-09-16 Thread Artur Alves
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 ended up choosing data structures that did not yet have tests. This patch adds tests for the llist data str

[GIT PULL] Kselftest update for Linux 6.12-rc1

2024-09-16 Thread Shuah Khan
Hi Linus, Please pull the following kselftest next update for Linux 6.12-rc1. This kselftest update for Linux 6.12-rc1 consists of: -- test coverage for dup_fd() failure handling in unshare_fd() -- new selftest for the acct() syscall -- basic uprobe testcase -- several small fixes and cleanups

[GIT PULL] nolibc for 6.12-rc1

2024-09-16 Thread Shuah Khan
Hi Linus, Please pull the following nolibc update for Linux 6.12-rc1. This nolibc update for Linux 6.12-rc1 consists of: Highlights -- * Clang support (including LTO) Other Changes - * stdbool.h support * argc/argv/envp arguments for constructors * Small #include ordering

[PATCH 19/19] rcu: Use kthread preferred affinity for RCU exp kworkers

2024-09-16 Thread Frederic Weisbecker
Now that kthreads have an infrastructure to handle preferred affinity against CPU hotplug and housekeeping cpumask, convert RCU exp workers to use it instead of handling all the constraints by itself. Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- kernel/rcu/tree.c | 105

[PATCH 18/19] treewide: Introduce kthread_run_worker[_on_cpu]()

2024-09-16 Thread Frederic Weisbecker
kthread_create() creates a kthread without running it yet. kthread_run() creates a kthread and runs it. On the other hand, kthread_create_worker() creates a kthread worker and runs it. This difference in behaviours is confusing. Also there is no way to create a kthread worker and affine it using

[PATCH 17/19] kthread: Unify kthread_create_on_cpu() and kthread_create_worker_on_cpu() automatic format

2024-09-16 Thread Frederic Weisbecker
kthread_create_on_cpu() uses the CPU argument as an implicit and unique printf argument to add to the format whereas kthread_create_worker_on_cpu() still relies on explicitly passing the printf arguments. This difference in behaviour is error prone and doesn't help standardizing per-CPU kthread nam

[PATCH 16/19] rcu: Use kthread preferred affinity for RCU boost

2024-09-16 Thread Frederic Weisbecker
Now that kthreads have an infrastructure to handle preferred affinity against CPU hotplug and housekeeping cpumask, convert RCU boost to use it instead of handling all the constraints by itself. Acked-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- kernel/rcu/tree.c| 27

[PATCH 15/19] kthread: Implement preferred affinity

2024-09-16 Thread Frederic Weisbecker
Affining kthreads follow either of four existing different patterns: 1) Per-CPU kthreads must stay affine to a single CPU and never execute relevant code on any other CPU. This is currently handled by smpboot code which takes care of CPU-hotplug operations. 2) Kthreads that _have_ to be aff

[PATCH 12/19] kthread: Default affine kthread to its preferred NUMA node

2024-09-16 Thread Frederic Weisbecker
Kthreads attached to a preferred NUMA node for their task structure allocation can also be assumed to run preferrably within that same node. A more precise affinity is usually notified by calling kthread_create_on_cpu() or kthread_bind[_mask]() before the first wakeup. For the others, a default a

[PATCH 11/19] kthread: Make sure kthread hasn't started while binding it

2024-09-16 Thread Frederic Weisbecker
Make sure the kthread is sleeping in the schedule_preempt_disabled() call before calling its handler when kthread_bind[_mask]() is called on it. This provides a sanity check verifying that the task is not randomly blocked later at some point within its function handler, in which case it could be ju

Re: [PATCH v1 0/5] Add Microchip IPC mailbox and remoteproc support

2024-09-16 Thread Bo Gan
Hi Valentina, On 9/12/24 10:00, Valentina Fernandez wrote: Additional details on the Microchip vendor extension and the IPC function IDs described in the driver can be found in the following documentation: https://github.com/linux4microchip/microchip-sbi-ecall-extension The IPC remoteproc plat

Re: [PATCH v1 3/5] mailbox: add Microchip IPC support

2024-09-16 Thread Krzysztof Kozlowski
On 12/09/2024 19:00, Valentina Fernandez wrote: > Add a mailbox controller driver for the Microchip Inter-processor > Communication (IPC), which is used to send and receive data between > processors. > > The driver uses the RISC-V Supervisor Binary Interface (SBI) to > communicate with software ru

Re: [PATCH v1 5/5] remoteproc: add support for Microchip IPC remoteproc platform driver

2024-09-16 Thread Krzysztof Kozlowski
On 12/09/2024 19:00, Valentina Fernandez wrote: > The Microchip family of RISC-V SoCs typically has one or more clusters. > These clusters can be configured to run in Asymmetric Multi-Processing > (AMP) mode. > > Add a remoteproc platform driver to be able to load and boot firmware > to the remote

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

2024-09-16 Thread Krzysztof Kozlowski
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 to run in Asymmetric Multi Processing (AMP) > mode A nit, subject: drop second/last, redundant "binding for". The "dt-bindings" prefix is already sta

Re: [RFC PATCH 30/39] KVM: guest_memfd: Handle folio preparation for guest_memfd mmap

2024-09-16 Thread Elliot Berman
On Tue, Sep 10, 2024 at 11:44:01PM +, Ackerley Tng wrote: > Since guest_memfd now supports mmap(), folios have to be prepared > before they are faulted into userspace. > > When memory attributes are switched between shared and private, the > up-to-date flags will be cleared. > > Use the folio

Re: rustgcc-kselftest: error: unknown unstable option: `patchable-function-entry`

2024-09-16 Thread Miguel Ojeda
Hi Naresh, On Mon, Sep 16, 2024 at 9:17 PM Naresh Kamboju wrote: > > The x86 rust gcc builds failed on the Linux next-20240917 due to following > build > warnings / errors with rustgcc for selftests rust builds. > > First seen on next-20240917 > Good: next-20240913 > BAD: next-20240917 > >

[PATCH net-next] selftests: net: add pmtu_bad.sh regression test

2024-09-16 Thread mitchell . augustin
From: Mitchell Augustin Introduce a regression test that reproduces a bug in pmtu_ipv6_ipv6_exception which causes veth_A-R1's reference counter to remain > 0 after cleanup should have already completed. On affected kernels/platforms, running this test will result in the following being displaye

rustgcc-kselftest: error: unknown unstable option: `patchable-function-entry`

2024-09-16 Thread Naresh Kamboju
unstable option: `patchable-function-entry` make[3]: *** [rust/Makefile:392: rust/core.o] Error 1 Build Log links, - https://qa-reports.linaro.org/lkft/linux-next-master/build/next-20240916/testrun/25144919/suite/build/test/rustgcc-lkftconfig-kselftest/log Build failed comparison

Re: [PATCH] virtio_console: fix misc probe bugs

2024-09-16 Thread Greg Kroah-Hartman
On Mon, Sep 16, 2024 at 02:32:56PM -0400, Michael S. Tsirkin wrote: > This fixes the following issue discovered by code review: > > after vqs have been created, a buggy device can send an interrupt. > > A control vq callback will then try to schedule control_work which has > not been initialized

[PATCH] virtio_console: fix misc probe bugs

2024-09-16 Thread Michael S. Tsirkin
This fixes the following issue discovered by code review: after vqs have been created, a buggy device can send an interrupt. A control vq callback will then try to schedule control_work which has not been initialized yet. Similarly for config interrupt. Further, in and out vq callbacks invoke fi

Re: [PATCH v1 2/5] dt-bindings: mailbox: add binding for Microchip IPC mailbox driver

2024-09-16 Thread Conor Dooley
On Thu, Sep 12, 2024 at 04:23:44PM -0500, Samuel Holland wrote: > Hi Valentina, > > On 2024-09-12 12:00 PM, Valentina Fernandez wrote: > > Add a dt-binding for the Microchip Inter-Processor Communication (IPC) > > mailbox controller. > > > > Signed-off-by: Valentina Fernandez > > --- > > .../bi

Re: [PATCH 1/1] remoteproc: Use iommu_paging_domain_alloc()

2024-09-16 Thread Mathieu Poirier
On Sun, 15 Sept 2024 at 08:09, Jason Gunthorpe wrote: > > On Thu, Aug 22, 2024 at 01:24:25PM -0300, Jason Gunthorpe wrote: > > On Thu, Aug 22, 2024 at 10:17:56AM -0600, Mathieu Poirier wrote: > > > > > > - domain = iommu_domain_alloc(dev->bus); > > > > - if (!domain) { > > > > + domain = iommu_pag

Re: [RFC PATCH] remoteproc: k3-r5: Fix check performed in k3_r5_rproc_{mbox_callback/kick}

2024-09-16 Thread Mathieu Poirier
On Mon, 16 Sept 2024 at 02:31, Siddharth Vadapalli wrote: > > Commit f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during > probe routine") introduced a check in the "k3_r5_rproc_mbox_callback()" and > "k3_r5_rproc_kick()" callbacks, causing them to exit if the remote core's > state is

Re: [PATCH v1 0/5] Add Microchip IPC mailbox and remoteproc support

2024-09-16 Thread Mathieu Poirier
Hi Valentina, On Thu, 12 Sept 2024 at 10:48, Valentina Fernandez wrote: > > Hello all, > > This series adds support for the Microchip Inter-Processor Communication > (IPC) mailbox controller, as well as an IPC remoteproc platform driver. > > Microchip's family of RISC-V SoCs typically has one or

Re: [PATCH v2] dt-bindings: remoteproc: qcom,sa8775p-pas: Document QCS8300 remoteproc

2024-09-16 Thread Krzysztof Kozlowski
On 11/09/2024 08:41, Jingyi Wang wrote: > + - items: > + - enum: > + - qcom,qcs8300-adsp-pas > + - const: qcom,sa8775p-adsp-pas > + - items: > + - enum: > + - qcom,qcs8300-cdsp-pas > + - const: qcom,sa8775p-cdsp0-pas > + -

[GIT PULL] livepatching for 6.12

2024-09-16 Thread Petr Mladek
Hi Linus, please pull the latest changes for the kernel livepatching from git://git.kernel.org/pub/scm/linux/kernel/git/livepatching/livepatching.git tags/livepatching-for-6.12 === - Small documentation improvement. ---

Re: [PATCH v9 7/7] remoteproc: stm32: Add support of an OP-TEE TA to load the firmware

2024-09-16 Thread Arnaud POULIQUEN
Hello Mathieu, On 9/13/24 18:03, Mathieu Poirier wrote: > On Fri, Aug 30, 2024 at 11:51:47AM +0200, Arnaud Pouliquen wrote: >> The new TEE remoteproc driver is used to manage remote firmware in a >> secure, trusted context. The 'st,stm32mp1-m4-tee' compatibility is >> introduced to delegate the lo

Re: BUG: WARNING in kvfree_rcu_bulk

2024-09-16 Thread Uladzislau Rezki
> After several tests, I found that the same PoC can cause multiple > different crashes for some unknown reason. Thus, I suspect that the > bug is capable of performing unintended memory writing without being > caught by KASAN. > I tested the PoC on the latest kernel, Linux 6.11 rc7 and it can stil

[PATCH RT 1/1] Linux 4.19.322-rt138

2024-09-16 Thread Daniel Wagner
v4.19.322-rt138-rc1 stable review patch. If anyone has any objections, please let me know. --- Signed-off-by: Daniel Wagner --- localversion-rt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localversion-rt b/localversion-rt index 41b444e910ef..9f63718d5731 100644

[PATCH RT 0/1] Linux v4.19.322-rt138-rc1

2024-09-16 Thread Daniel Wagner
Dear RT Folks, This is the RT stable review cycle of patch 4.19.322-rt138-rc1. Please scream at me if I messed something up. Please test the patches too. The -rc release is also available on kernel.org https://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git on the v4.19-rt-nex

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

2024-09-16 Thread Jamie Bainbridge
Running this test on a small system produces different failures every test checking deletions, and some flushes. From different test runs: TEST: Common host entries configuration tests (L2)[FAIL] Failed to delete L2 host entry TEST: Common port group entries configuration tests

[GIT PULL] slab updates for 6.11

2024-09-16 Thread Vlastimil Babka
Hi Linus, please pull the latest slab updates from: git://git.kernel.org/pub/scm/linux/kernel/git/vbabka/slab.git tags/slab-for-6.12 There's a small conflict with the rcu tree: https://lore.kernel.org/lkml/20240812124748.37250...@canb.auug.org.au/ For Christian's kmem_cache_create refactorin

Re: [PATCH v1 3/5] mailbox: add Microchip IPC support

2024-09-16 Thread Valentina.FernandezAlanis
On 12/09/2024 22:30, Samuel Holland wrote: > [You don't often get email from samuel.holl...@sifive.com. Learn why this is > important at https://aka.ms/LearnAboutSenderIdentification ] > > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > Hi Valent

[RFC PATCH] remoteproc: k3-r5: Fix check performed in k3_r5_rproc_{mbox_callback/kick}

2024-09-16 Thread Siddharth Vadapalli
Commit f3f11cfe8907 ("remoteproc: k3-r5: Acquire mailbox handle during probe routine") introduced a check in the "k3_r5_rproc_mbox_callback()" and "k3_r5_rproc_kick()" callbacks, causing them to exit if the remote core's state is "RPROC_DETACHED". However, the "__rproc_attach()" function that is re

[PATCH] selftests: Makefile: create OUTPUT dir

2024-09-16 Thread Anders Roxell
When cross building kselftest out-of-tree the following issue can be seen: [...] make[4]: Entering directory '/src/kernel/linux/tools/testing/selftests/net/lib' CC csum /usr/lib/gcc-cross/aarch64-linux-gnu/13/../../../../aarch64-linux-gnu/bin/ld: cannot open output file /tmp/build/kselftes

Re: [PATCH] selftests: Makefile: add missing 'net/lib' to targets

2024-09-16 Thread Anders Roxell
On Sun, 15 Sept 2024 at 16:46, Jakub Kicinski wrote: > > On Sun, 15 Sep 2024 09:36:10 +0200 Willem de Bruijn wrote: > > > You’re right, the patch is incorrect, I could have explained better. > > > I’m seeing an issue with an out-of-tree cross compilation build of > > > kselftest and can’t figure o