Re: [PATCH vhost 0/2] vdpa/mlx5: Iova mapping related fixes

2024-11-12 Thread Michael S. Tsirkin
On Wed, Nov 13, 2024 at 09:45:22AM +0800, Jason Wang wrote: > On Mon, Nov 11, 2024 at 4:58 PM Dragos Tatulea wrote: > > > > > > > > On 21.10.24 15:40, Dragos Tatulea wrote: > > > Here are 2 fixes from Si-Wei: > > > - The first one is an important fix that has to be applied as far > > > back as p

Re: [PATCH vhost 2/2] vdpa/mlx5: Fix suboptimal range on iotlb iteration

2024-11-12 Thread Michael S. Tsirkin
On Mon, Oct 21, 2024 at 04:40:40PM +0300, Dragos Tatulea wrote: > From: Si-Wei Liu > > The starting iova address to iterate iotlb map entry within a range > was set to an irrelevant value when passing to the itree_next() > iterator, although luckily it doesn't affect the outcome of finding > out

Re: [PATCH 1/2] kunit: tool: Only print the summary

2024-11-12 Thread David Gow
On Tue, 29 Oct 2024 at 06:43, Rae Moar wrote: > > From: David Gow > > Allow only printing the summary at the end of a test run, rather than all > individual test results. This summary will list a few failing tests if > there are any. > > To use: > > ./tools/testing/kunit/kunit.py run --summary >

Re: [PATCH v2] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-11-12 Thread Alison Schofield
On Tue, Nov 12, 2024 at 10:50:35AM +0530, Suraj Sonawane wrote: > Fix an issue detected by syzbot with KASAN: > > BUG: KASAN: vmalloc-out-of-bounds in cmd_to_func drivers/acpi/nfit/ > core.c:416 [inline] > BUG: KASAN: vmalloc-out-of-bounds in acpi_nfit_ctl+0x20e8/0x24a0 > drivers/acpi/nfit/core.c:

Re: [PATCH v2] acpi: nfit: vmalloc-out-of-bounds Read in acpi_nfit_ctl

2024-11-12 Thread Alison Schofield
On Tue, Nov 12, 2024 at 10:50:35AM +0530, Suraj Sonawane wrote: > Fix an issue detected by syzbot with KASAN: > > BUG: KASAN: vmalloc-out-of-bounds in cmd_to_func drivers/acpi/nfit/ > core.c:416 [inline] > BUG: KASAN: vmalloc-out-of-bounds in acpi_nfit_ctl+0x20e8/0x24a0 > drivers/acpi/nfit/core.c:

Re: [PATCH] kmod: verify module name before invoking modprobe

2024-11-12 Thread Song Chen
Hi Petr, Please see my inline comments, many thanks. BR Song 在 2024/11/12 20:56, Petr Pavlu 写道: On 11/10/24 12:42, Song Chen wrote: Sometimes when kernel calls request_module to load a module into kernel space, it doesn't pass the module name appropriately, and request_module doesn't verify

Re: [PATCH 2/2] rcu/nocb: Fix missed RCU barrier on deoffloading

2024-11-12 Thread Neeraj Upadhyay
On 11/13/2024 3:07 AM, Frederic Weisbecker wrote: > Le Mon, Nov 11, 2024 at 01:07:16PM +0530, Neeraj Upadhyay a écrit : >> >>> diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h >>> index 16865475120b..2605dd234a13 100644 >>> --- a/kernel/rcu/tree_nocb.h >>> +++ b/kernel/rcu/tree_nocb.

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

2024-11-12 Thread Neeraj Upadhyay
>>> >>> static int srcu_torture_read_lock(void) >>> { >>> - if (cur_ops == &srcud_ops) >>> - return srcu_read_lock_nmisafe(srcu_ctlp); >>> - else >>> - return srcu_read_lock(srcu_ctlp); >>> + int idx; >>> + int ret = 0; >>> + >>> + if ((reader_flavor & 0x1) || !(

[PATCH] MAINTAINERS: update Alexey Makhalov's email address

2024-11-12 Thread Alexey Makhalov
Fix a typo in an email address. Reported-by: Konstantin Ryabitsev Closes: https://lore.kernel.org/all/20240925-rational-succinct-vulture-cca9fb@lemur/T/ Signed-off-by: Alexey Makhalov --- MAINTAINERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTA

Re: [PATCH net v2 2/2] selftests: drv-net: rss_ctx: Add test for ntuple rule

2024-11-12 Thread Jakub Kicinski
On Tue, 12 Nov 2024 17:51:50 -0800 Daniel Xu wrote: > > This won't match the output from your ethtool patch, because that > > removes the colon. Probably want to wait until the patch is > > finalised and then write a regex that matches both versions. > > Argh, I meant to have wildcards here.

Re: [PATCH net v2 2/2] selftests: drv-net: rss_ctx: Add test for ntuple rule

2024-11-12 Thread Daniel Xu
Hi Jakub, On Tue, Nov 12, 2024, at 5:44 PM, Jakub Kicinski wrote: > On Mon, 11 Nov 2024 19:23:31 -0700 Daniel Xu wrote: >> Extend the rss_ctx test suite to test that an ntuple action that >> redirects to an RSS context contains that information in `ethtool -n`. >> Otherwise the output from ethtool

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-12 Thread Jason Wang
On Wed, Nov 13, 2024 at 5:46 AM Michael S. Tsirkin wrote: > > On Mon, Nov 11, 2024 at 04:36:52PM +0800, Jason Wang wrote: > > On Mon, Nov 11, 2024 at 3:30 PM Michael S. Tsirkin wrote: > > > > > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > > > There's no need to sync DMA for C

Re: [PATCH net v2 2/2] selftests: drv-net: rss_ctx: Add test for ntuple rule

2024-11-12 Thread Daniel Xu
Hi Ed, On Tue, Nov 12, 2024, at 3:10 AM, Edward Cree wrote: > On 12/11/2024 02:23, Daniel Xu wrote: >> Extend the rss_ctx test suite to test that an ntuple action that >> redirects to an RSS context contains that information in `ethtool -n`. >> Otherwise the output from ethtool is highly deceiving

Re: [PATCH vhost 0/2] vdpa/mlx5: Iova mapping related fixes

2024-11-12 Thread Jason Wang
On Mon, Nov 11, 2024 at 4:58 PM Dragos Tatulea wrote: > > > > On 21.10.24 15:40, Dragos Tatulea wrote: > > Here are 2 fixes from Si-Wei: > > - The first one is an important fix that has to be applied as far > > back as possible (hence CC'ing linux-stable). > > - The second is more of an improvem

Re: [PATCH net-next v11 06/23] ovpn: introduce the ovpn_peer object

2024-11-12 Thread Sergey Ryazanov
On 12.11.2024 19:31, Sabrina Dubroca wrote: 2024-11-10, 15:38:27 +0200, Sergey Ryazanov wrote: On 29.10.2024 12:47, Antonio Quartulli wrote: An ovpn_peer object holds the whole status of a remote peer (regardless whether it is a server or a client). This includes status for crypto, tx/rx buffe

Re: [PATCH net v2 2/2] selftests: drv-net: rss_ctx: Add test for ntuple rule

2024-11-12 Thread Jakub Kicinski
On Mon, 11 Nov 2024 19:23:31 -0700 Daniel Xu wrote: > Extend the rss_ctx test suite to test that an ntuple action that > redirects to an RSS context contains that information in `ethtool -n`. > Otherwise the output from ethtool is highly deceiving. This test helps > ensure drivers are compliant wit

Re: [GIT PULL] virtio: bugfix

2024-11-12 Thread pr-tracker-bot
The pull request you sent on Tue, 12 Nov 2024 18:30:37 -0500: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/f1b785f4c7870c42330b35522c2514e39a1e28e7 Thank you! -- Deet-doot-dot, I am a b

Re: [PATCH net-next v11 04/23] ovpn: add basic interface creation/destruction/management routines

2024-11-12 Thread Sergey Ryazanov
On 12.11.2024 18:47, Sabrina Dubroca wrote: 2024-11-09, 03:01:21 +0200, Sergey Ryazanov wrote: On 29.10.2024 12:47, Antonio Quartulli wrote: +/* When the OpenVPN protocol is ran in AEAD mode, use + * the OpenVPN packet ID as the AEAD nonce: + * + *0005 521c3b01 4308c041 + *[seq # ]

Re: [PATCH] vdpa: vdpa_sim: vdpa_sim_net: fixed cofing style issues

2024-11-12 Thread Michael S. Tsirkin
On Thu, Nov 07, 2024 at 09:19:41PM +0200, Gediminas Repecka wrote: > Fixed coding style issues reported by checkpatch script > --- A lot is wrong with this submission, given it's supposed to fix checkpatch: - no signature - typo in subject - not using direct voice (Fix, not Fixed) pls fix and

[GIT PULL] virtio: bugfix

2024-11-12 Thread Michael S. Tsirkin
The following changes since commit 83e445e64f48bdae3f25013e788fcf592f142576: vdpa/mlx5: Fix error path during device add (2024-11-07 16:51:16 -0500) are available in the Git repository at: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus for you to fetch changes

Re: [PATCH v4 4/6] iio: light: stk3310: use dev_err_probe where possible

2024-11-12 Thread Aren
On Tue, Nov 12, 2024 at 11:15:54AM +0100, Uwe Kleine-König wrote: > Hello Andy, hello Aren, > > On Mon, Nov 11, 2024 at 11:44:51AM +0200, Andy Shevchenko wrote: > > On Sun, Nov 10, 2024 at 04:34:30PM -0500, Aren wrote: > > > On Sun, Nov 10, 2024 at 09:52:32PM +0200, Andy Shevchenko wrote: > > > >

Re: [RFC][PATCH 0/8] module: Strict per-modname namespaces

2024-11-12 Thread Peter Zijlstra
On Tue, Nov 12, 2024 at 09:56:20AM -0800, Sean Christopherson wrote: > This likely needs to be addressed in whatever chunk of code is enforcing the > namespaces. The s/-/_ behavior (and vice versa!) is *very* baked into the > kernel > at this point, e.g. parameqn() will happily parse dashes or u

Re: [PATCH] selftests: lsm: Refactor `flags_overset_lsm_set_self_attr` test

2024-11-12 Thread Casey Schaufler
On 11/12/2024 10:28 AM, Amit Vadhavana wrote: > - Remove unnecessary `tctx` variable, use `ctx` directly. > - Simplified code with no functional changes. > > Signed-off-by: Amit Vadhavana Reviewed-by: Casey Schaufler > --- > tools/testing/selftests/lsm/lsm_set_self_attr_test.c | 7 +++ > 1

[PATCH RFC 3/6] maple_tree: use percpu sheaves for maple_node_cache

2024-11-12 Thread Vlastimil Babka
Setup the maple_node_cache with percpu sheaves of size 32 to hopefully improve its performance. Change the single node rcu freeing in ma_free_rcu() to use kfree_rcu() instead of the custom callback, which allows the rcu_free sheaf batching to be used. Note there are other users of mt_free_rcu() whe

Re: [PATCH] virtio_ring: skip cpu sync when mapping fails

2024-11-12 Thread Michael S. Tsirkin
On Mon, Nov 11, 2024 at 04:36:52PM +0800, Jason Wang wrote: > On Mon, Nov 11, 2024 at 3:30 PM Michael S. Tsirkin wrote: > > > > On Mon, Nov 11, 2024 at 10:55:38AM +0800, Jason Wang wrote: > > > There's no need to sync DMA for CPU on mapping errors. So this patch > > > skips the CPU sync in the err

Re: [PATCH 2/2] rcu/nocb: Fix missed RCU barrier on deoffloading

2024-11-12 Thread Frederic Weisbecker
Le Mon, Nov 11, 2024 at 01:07:16PM +0530, Neeraj Upadhyay a écrit : > > > diff --git a/kernel/rcu/tree_nocb.h b/kernel/rcu/tree_nocb.h > > index 16865475120b..2605dd234a13 100644 > > --- a/kernel/rcu/tree_nocb.h > > +++ b/kernel/rcu/tree_nocb.h > > @@ -891,7 +891,18 @@ static void nocb_cb_wait(str

Re: [RFC PATCH 3/3] module: pre-test setting ro_after_init data read-only

2024-11-12 Thread Luis Chamberlain
On Sat, Nov 09, 2024 at 11:35:37AM +0100, Christophe Leroy wrote: > diff --git a/kernel/module/main.c b/kernel/module/main.c > index 1bf4b0db291b..b603c9647e73 100644 > --- a/kernel/module/main.c > +++ b/kernel/module/main.c > @@ -2582,7 +2582,7 @@ static noinline int do_init_module(struct module *

Re: [RFC][PATCH 0/8] module: Strict per-modname namespaces

2024-11-12 Thread Sean Christopherson
On Tue, Nov 12, 2024, Peter Zijlstra wrote: > On Mon, Nov 11, 2024 at 04:48:58PM -0800, Sean Christopherson wrote: > > On Mon, Nov 11, 2024, Peter Zijlstra wrote: > > > Hi! > > > > > > Implement a means for exports to be available only to an explicit list of > > > named > > > modules. By explicit

Re: [PATCH] dax: Allow block size > PAGE_SIZE

2024-11-12 Thread Dan Williams
Jan Kara wrote: [..] > > I think we should go with that then. Should I send it as Suggested-by: > > Dan or do you want to send it? > > I say go ahead and send it with Dan's suggested-by :) Yeah, no concerns from me, and I can ack it when it comes out.

Re: [PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers

2024-11-12 Thread Catalin Marinas
On Wed, 06 Nov 2024 17:07:51 +, Mark Brown wrote: > We don't currently validate that we exit streaming mode and clear ZA when > we enter a signal handler. Add simple checks for this in the SSVE and ZA > tests. > > Applied to arm64 (for-next/kselftest), thanks! [1/1] kselftest/arm64: Check t

[PATCH] selftests: lsm: Refactor `flags_overset_lsm_set_self_attr` test

2024-11-12 Thread Amit Vadhavana
- Remove unnecessary `tctx` variable, use `ctx` directly. - Simplified code with no functional changes. Signed-off-by: Amit Vadhavana --- tools/testing/selftests/lsm/lsm_set_self_attr_test.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/testing/selftests/lsm/ls

Re: (subset) [PATCH 0/4] kselftest/arm64: Fix compilation warnings/errors in the arm64 tests

2024-11-12 Thread Catalin Marinas
On Fri, 08 Nov 2024 13:49:16 +, Catalin Marinas wrote: > It looks like people started ignoring the compiler warnings (or even > errors) when building the arm64-specific kselftests. The first three > patches are printf() arguments adjustment. The last one adds > ".arch_extension sme", otherwise

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

2024-11-12 Thread Paul E. McKenney
On Tue, Nov 12, 2024 at 10:12:40AM +0530, Neeraj Upadhyay wrote: > On 10/15/2024 9:41 PM, Paul E. McKenney wrote: > > 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. > > >

Re: [PATCH net-next v11 04/23] ovpn: add basic interface creation/destruction/management routines

2024-11-12 Thread Sabrina Dubroca
2024-11-09, 03:01:21 +0200, Sergey Ryazanov wrote: > On 29.10.2024 12:47, Antonio Quartulli wrote: > > +/* When the OpenVPN protocol is ran in AEAD mode, use > > + * the OpenVPN packet ID as the AEAD nonce: > > + * > > + *0005 521c3b01 4308c041 > > + *[seq # ] [ nonce_tail ] > > + *

[PATCH RFC 5/6] mm, slub: cheaper locking for percpu sheaves

2024-11-12 Thread Vlastimil Babka
Instead of local_lock_irqsave(), use just get_cpu_ptr() (which only disables preemption) and then set an active flag. If potential callers include irq handler, the operation must use a trylock variant that bails out if the flag is already set to active because we interrupted another operation in pr

[PATCH RFC 0/6] SLUB percpu sheaves

2024-11-12 Thread Vlastimil Babka
Hi, This is a RFC to add an opt-in percpu array-based caching layer to SLUB. The name "sheaf" was invented by Matthew so we don't call it magazine like the original Bonwick paper. The per-NUMA-node cache of sheaves is thus called "barn". This may seem similar to the arrays in SLAB, but the main d

[RESEND PATCH] x86/sgx: Use vmalloc_array() instead of vmalloc()

2024-11-12 Thread Thorsten Blum
Use vmalloc_array() instead of vmalloc() to calculate the number of bytes to allocate. Reviewed-by: Jarkko Sakkinen Acked-by: Kai Huang Signed-off-by: Thorsten Blum --- arch/x86/kernel/cpu/sgx/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/kernel/cpu/sgx/ma

Re: [PATCH v5 3/3] vsock/test: verify socket options after setting them

2024-11-12 Thread Stefano Garzarella
On Tue, Nov 12, 2024 at 09:18:48AM -0600, Konstantin Shkolnyy wrote: On 11/12/2024 02:58, Stefano Garzarella wrote: On Thu, Nov 07, 2024 at 07:17:26PM -0600, Konstantin Shkolnyy wrote: Replace setsockopt() calls with calls to functions that follow setsockopt() with getsockopt() and check that t

Re: [GIT PULL] virtio: bugfixes

2024-11-12 Thread pr-tracker-bot
The pull request you sent on Mon, 11 Nov 2024 08:50:50 -0500: > https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git tags/for_linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/0ccd733ac99edc473aaee90c8f6adc346d82befb Thank you! -- Deet-doot-dot, I am a b

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

2024-11-12 Thread Frederic Weisbecker
From: "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(). [ paulmck: Apply Dan Carpenter feedback. ] Signed-off-by: Paul E. McKenney Cc: Alexei Starovoitov Cc: Andrii Nakryik

Re: [PATCH v2 0/3] kselftest/arm64: fp-ptrace enhancements

2024-11-12 Thread Catalin Marinas
On Tue, 12 Nov 2024 13:08:13 +, Mark Brown wrote: > This series contains a bit of a grab bag of improvements to the floating > point tests, mainly fp-ptrace. Globally over all the tests we start > using defines from the generated sysregs (following the example of the > KVM selftests) for SVCR,

[PATCH 12/16] rcutorture: Add reader_flavor parameter for SRCU readers

2024-11-12 Thread Frederic Weisbecker
From: "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: Ken

Re: [PATCH net-next v11 06/23] ovpn: introduce the ovpn_peer object

2024-11-12 Thread Sabrina Dubroca
2024-11-10, 15:38:27 +0200, Sergey Ryazanov wrote: > On 29.10.2024 12:47, Antonio Quartulli wrote: > > An ovpn_peer object holds the whole status of a remote peer > > (regardless whether it is a server or a client). > > > > This includes status for crypto, tx/rx buffers, napi, etc. > > > > Only s

Re: [PATCH net-next v11 08/23] ovpn: implement basic TX path (UDP)

2024-11-12 Thread Sabrina Dubroca
2024-11-11, 00:32:51 +0200, Sergey Ryazanov wrote: > On 29.10.2024 12:47, Antonio Quartulli wrote: > > +static void ovpn_encrypt_post(struct sk_buff *skb, int ret) > > +{ > > + struct ovpn_peer *peer = ovpn_skb_cb(skb)->peer; > > + > > + if (unlikely(ret < 0)) > > + goto err; > > + >

Re: [PATCH] kselftest/arm64: Fix build with stricter assemblers

2024-11-12 Thread Catalin Marinas
On Fri, 08 Nov 2024 15:20:46 +, Mark Brown wrote: > While some assemblers (including the LLVM assembler I mostly use) will > happily accept SMSTART as an instruction by default others, specifically > gas, require that any architecture extensions be explicitly enabled. > The assembler SME test p

[PATCH 13/21] kthread: Make sure kthread hasn't started while binding it

2024-11-12 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

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

2024-11-12 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 1/3] rcu: Delete unused rcu_gp_might_be_stalled() function

2024-11-12 Thread Frederic Weisbecker
From: "Paul E. McKenney" The rcu_gp_might_be_stalled() function is no longer used, so this commit removes it. Signed-off-by: Paul E. McKenney Reviewed-by: Joel Fernandes (Google) Signed-off-by: Frederic Weisbecker --- include/linux/rcutiny.h | 1 - include/linux/rcutree.h | 1 - kernel/rcu

[PATCH RFC 6/6] mm, slub: sheaf prefilling for guaranteed allocations

2024-11-12 Thread Vlastimil Babka
Add three functions for efficient guaranteed allocations in a critical section (that cannot sleep) when the exact number of allocations is not known beforehand, but an upper limit can be calculated. kmem_cache_prefill_sheaf() returns a sheaf containing at least given number of objects. kmem_cache

[PATCH 04/16] srcu: Renaming in preparation for additional reader flavor

2024-11-12 Thread Frederic Weisbecker
From: "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 driv

[PATCH RFC 4/6] mm, vma: use sheaves for vm_area_struct cache

2024-11-12 Thread Vlastimil Babka
Create the vm_area_struct cache with percpu sheaves of size 32 to hopefully improve its performance. For CONFIG_PER_VMA_LOCK, change the vma freeing from custom call_rcu() callback to kfree_rcu() which will perform rcu_free sheaf batching. Since there may be additional structures attached and they

[PATCH RFC 1/6] mm/slub: add opt-in caching layer of percpu sheaves

2024-11-12 Thread Vlastimil Babka
Specifying a non-zero value for a new struct kmem_cache_args field sheaf_capacity will setup a caching layer of percpu arrays called sheaves of given capacity for the created cache. Allocations from the cache will allocate via the percpu sheaves (main or spare) as long as they have no NUMA node pr

[PATCH RFC 2/6] mm/slub: add sheaf support for batching kfree_rcu() operations

2024-11-12 Thread Vlastimil Babka
Extend the sheaf infrastructure for more efficient kfree_rcu() handling. For caches where sheafs are initialized, on each cpu maintain a rcu_free sheaf in addition to main and spare sheaves. kfree_rcu() operations will try to put objects on this sheaf. Once full, the sheaf is detached and submitte

[PATCH 0/3] RCU stall for v6.13

2024-11-12 Thread Frederic Weisbecker
Hello, Please find below the RCU stall patches targeted for the upcoming merge window. Paul E. McKenney (3): rcu: Delete unused rcu_gp_might_be_stalled() function rcu: Stop stall warning from dumping stacks if grace period ends rcu: Finer-grained grace-period-end checks in rcu_dump_cpu_stac

Re: [PATCH net-next v11 17/23] ovpn: add support for peer floating

2024-11-12 Thread Antonio Quartulli
On 12/11/2024 11:56, Sabrina Dubroca wrote: 2024-10-29, 11:47:30 +0100, Antonio Quartulli wrote: diff --git a/drivers/net/ovpn/io.c b/drivers/net/ovpn/io.c index 63c140138bf98e5d1df79a2565b666d86513323d..0e8a6f2c76bc7b2ccc287ad1187cf50f033bf261 100644 --- a/drivers/net/ovpn/io.c +++ b/drivers/

Re: (subset) [PATCH v2 0/6] kselftest/arm64: Test floating point signal context restore in fp-stress

2024-11-12 Thread Catalin Marinas
On Thu, 07 Nov 2024 01:39:19 +, Mark Brown wrote: > Currently we test signal delivery to the programs run by fp-stress but > our signal handlers simply count the number of signals seen and don't do > anything with the floating point state. The original fpsimd-test and > sve-test programs had s

Re: [PATCH] kselftest/arm64: Enable build of PAC tests with LLVM=1

2024-11-12 Thread Catalin Marinas
On Mon, 11 Nov 2024 18:32:58 +, Mark Brown wrote: > Currently we don't build the PAC selftests when building with LLVM=1 since > we attempt to test for PAC support in the toolchain before we've set up the > build system to point at LLVM in lib.mk, which has to be one of the last > things in the

Re: [PATCH 0/2] kselftest/arm64: Avoid detecting spurious PAC key collisions

2024-11-12 Thread Catalin Marinas
On Mon, 11 Nov 2024 16:18:54 +, Mark Brown wrote: > The PAC tests currently generate a very small number of false failures > since the limited size of PAC keys, especially with fewer bits allocated > for PAC due to larger VA, means collisions in generated PACs are > possible even if the PAC key

[PATCH 17/21] kthread: Implement preferred affinity

2024-11-12 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

Re: [PATCH net-next v11 17/23] ovpn: add support for peer floating

2024-11-12 Thread Antonio Quartulli
On 04/11/2024 12:24, Sabrina Dubroca wrote: 2024-10-29, 11:47:30 +0100, Antonio Quartulli wrote: +static int ovpn_peer_reset_sockaddr(struct ovpn_peer *peer, + const struct sockaddr_storage *ss, + const u8 *local_ip) +

Re: [PATCH net-next v11 19/23] ovpn: implement key add/get/del/swap via netlink

2024-11-12 Thread Antonio Quartulli
On 05/11/2024 11:16, Sabrina Dubroca wrote: 2024-10-29, 11:47:32 +0100, Antonio Quartulli wrote: This change introduces the netlink commands needed to add, get, delete and swap keys for a specific peer. Userspace is expected to use these commands to create, inspect (non sensible data only), des

Re: [PATCH net-next v11 20/23] ovpn: kill key and notify userspace in case of IV exhaustion

2024-11-12 Thread Antonio Quartulli
On 05/11/2024 11:33, Sabrina Dubroca wrote: 2024-10-29, 11:47:33 +0100, Antonio Quartulli wrote: +int ovpn_nl_key_swap_notify(struct ovpn_peer *peer, u8 key_id) +{ [...] + + nla_nest_end(msg, k_attr); + genlmsg_end(msg, hdr); + + genlmsg_multicast_netns(&ovpn_nl_family, dev_n

Re: [PATCH v5 3/3] vsock/test: verify socket options after setting them

2024-11-12 Thread Konstantin Shkolnyy
On 11/12/2024 02:58, Stefano Garzarella wrote: On Thu, Nov 07, 2024 at 07:17:26PM -0600, Konstantin Shkolnyy wrote: Replace setsockopt() calls with calls to functions that follow setsockopt() with getsockopt() and check that the returned value and its size are the same as have been set. Signed-

[PATCH 14/16] rcutorture: Add light-weight SRCU scenario

2024-11-12 Thread Frederic Weisbecker
From: "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: Revie

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

2024-11-12 Thread Lee Jones
On Sat, 12 Oct 2024 21:31:38 +0200, Karel Balej wrote: > Add a MFD cell for the chip's real-time clock. > > Applied, thanks! [1/2] mfd: 88pm886: add the RTC cell commit: 156d87b679a565a166da4a7ce892cb87f6317faf -- Lee Jones [李琼斯]

[PATCH 18/21] rcu: Use kthread preferred affinity for RCU boost

2024-11-12 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 16/16] srcu: Improve srcu_read_lock_lite() kernel-doc comment

2024-11-12 Thread Frederic Weisbecker
From: "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 Reviewed-by: Neeraj Upadhyay Signed-off-by: Frederic Weisbecker --- include/linux/srcu.h | 3 ++- 1 file change

[PATCH 13/16] rcutorture: Add srcu_read_lock_lite() support to rcutorture.reader_flavor

2024-11-12 Thread Frederic Weisbecker
From: "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: Reviewed-by:

[PATCH 11/16] rcutorture: Expand RCUTORTURE_RDR_MASK_[12] to eight bits

2024-11-12 Thread Frederic Weisbecker
From: "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 permi

[PATCH v5 2/2] selftests: tmpfs: Add kselftest support to tmpfs

2024-11-12 Thread Shivam Chaudhary
Replace direct error handling with 'ksft_test_result_*', 'ksft_exit_fail_msg' macros for better reporting. Test logs: Before change: - Without root error: unshare, errno 1 - With root No, output After change: - Without root TAP version 13 1..1 Bail out! Error : Need to run as root# Planned te

[PATCH 10/16] srcu: Allow inlining of __srcu_read_{,un}lock_lite()

2024-11-12 Thread Frederic Weisbecker
From: "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 a

[PATCH 09/16] srcu: Add srcu_read_lock_lite() and srcu_read_unlock_lite()

2024-11-12 Thread Frederic Weisbecker
From: "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

[PATCH 08/16] srcu: Create CPP macros for normal and NMI-safe SRCU readers

2024-11-12 Thread Frederic Weisbecker
From: "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

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-12 Thread Antonio Quartulli
On 11/11/2024 16:41, Sabrina Dubroca wrote: 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: +static int ovpn_nl_peer_modify(struct ovpn_peer *peer, struct genl_info *info, + struct nlattr **attrs) +{ + struct sockaddr_storage ss = {}; + u32 sockfd, i

[PATCH 07/16] srcu: Improve srcu_read_lock{,_nmisafe}() comments

2024-11-12 Thread Frederic Weisbecker
From: "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 Reviewed-by: Neeraj Upadhyay Signed-off-by: Frederic Weisbecker --- include/

[PATCH 06/16] srcu: Standardize srcu_data pointers to "sdp" and similar

2024-11-12 Thread Frederic Weisbecker
From: "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: Reviewed-by: Neera

[PATCH 05/16] srcu: Bit manipulation changes for additional reader flavor

2024-11-12 Thread Frederic Weisbecker
From: "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-

[PATCH 03/16] srcu: Introduce srcu_gp_is_expedited() helper function

2024-11-12 Thread Frederic Weisbecker
From: "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

[PATCH 02/16] srcu: Rename srcu_might_be_idle() to srcu_should_expedite()

2024-11-12 Thread Frederic Weisbecker
From: "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 m

[PATCH 01/16] srcu: Replace WARN_ON_ONCE() with BUILD_BUG_ON() if possible

2024-11-12 Thread Frederic Weisbecker
From: Zhen Lei The value of ARRAY_SIZE() can be determined at compile time, so if both sides of the equation are ARRAY_SIZE(), using BUILD_BUG_ON() can help us catch the problem earlier. While there are cases where unequal array sizes will work, there is no point in allowing them, so it makes mo

[PATCH 00/16] SRCU for v6.13

2024-11-12 Thread Frederic Weisbecker
Hello, Please find below the SRCU patches targeted for the upcoming merge window. Paul E. McKenney (15): srcu: Rename srcu_might_be_idle() to srcu_should_expedite() srcu: Introduce srcu_gp_is_expedited() helper function srcu: Renaming in preparation for additional reader flavor srcu: Bit

[PATCH 20/21] treewide: Introduce kthread_run_worker[_on_cpu]()

2024-11-12 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 v5 1/2] selftests: tmpfs: Add Test-fail if not run as root

2024-11-12 Thread Shivam Chaudhary
Add 'ksft_exit_fail_msg()', if not run as root, with an appropriate Warning. Add 'ksft_print_header()' and 'ksft_set_plan()' to structure test outputs more effectively. Test logs: Before Change: - Without root error: unshare, errno 1 - With root No, output After Change: - Without root TAP v

[PATCH 3/3] rcu: Finer-grained grace-period-end checks in rcu_dump_cpu_stacks()

2024-11-12 Thread Frederic Weisbecker
From: "Paul E. McKenney" This commit pushes the grace-period-end checks further down into rcu_dump_cpu_stacks(), and also uses lockless checks coupled with finer-grained locking. The result is that the current leaf rcu_node structure's ->lock is acquired only if a stack backtrace might be needed

[PATCH v5 0/2] kselftest: tmpfs: Add ksft macros and skip if no root

2024-11-12 Thread Shivam Chaudhary
This version 5 patch series replace direct error handling methods with ksft macros, which provide better reporting.Currently, when the tmpfs test runs, it does not display any output if it passes,and if it fails (particularly when not run as root),it simply exits without any warning or message. Th

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

2024-11-12 Thread Frederic Weisbecker
From: "Paul E. McKenney" 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 through, this function will be dumping stacks

Re: [RFC PATCH 2/3] module: Don't fail module loading when setting ro_after_init section RO failed

2024-11-12 Thread Petr Pavlu
On 11/12/24 10:43, Daniel Gomez wrote: > On Mon Nov 11, 2024 at 7:53 PM CET, Christophe Leroy wrote: >> >> >> Le 09/11/2024 à 23:17, Daniel Gomez a écrit : >>> On Sat Nov 9, 2024 at 11:35 AM CET, Christophe Leroy wrote: Once module init has succeded it is too late to cancel loading. If se

Re: [PATCH] dax: Allow block size > PAGE_SIZE

2024-11-12 Thread Jan Kara
On Tue 12-11-24 18:49:46, Asahi Lina wrote: > On 11/8/24 9:16 PM, Jan Kara wrote: > > On Fri 08-11-24 01:09:54, Asahi Lina wrote: > >> On 11/7/24 7:01 PM, Jan Kara wrote: > >>> On Wed 06-11-24 11:59:44, Dan Williams wrote: > Jan Kara wrote: > [..] > >> This WARN still feels like the w

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

2024-11-12 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 12/21] sched,arm64: Handle CPU isolation on last resort fallback rq selection

2024-11-12 Thread Frederic Weisbecker
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 last resort. This default decision doesn't mix up very well with nohz_full CPUs that are part of the possible cpumask but don't want to be disturbed

[PATCH 14/21] kthread: Default affine kthread to its preferred NUMA node

2024-11-12 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

Re: [PATCH v4 4/6] iio: light: stk3310: use dev_err_probe where possible

2024-11-12 Thread Nuno Sá
On Tue, 2024-11-12 at 11:15 +0100, Uwe Kleine-König wrote: > Hello Andy, hello Aren, > > On Mon, Nov 11, 2024 at 11:44:51AM +0200, Andy Shevchenko wrote: > > On Sun, Nov 10, 2024 at 04:34:30PM -0500, Aren wrote: > > > On Sun, Nov 10, 2024 at 09:52:32PM +0200, Andy Shevchenko wrote: > > > > Sun, No

Re: [PATCH net-next v11 18/23] ovpn: implement peer add/get/dump/delete via netlink

2024-11-12 Thread Antonio Quartulli
On 04/11/2024 16:14, Sabrina Dubroca wrote: 2024-10-29, 11:47:31 +0100, Antonio Quartulli wrote: +static int ovpn_nl_peer_precheck(struct ovpn_struct *ovpn, +struct genl_info *info, +struct nlattr **attrs) +{ + if (NL_REQ_ATTR

Re: [PATCH v2 3/3] kselftest/arm64: Add FPMR coverage to fp-ptrace

2024-11-12 Thread Mark Brown
On Tue, Nov 12, 2024 at 01:26:52PM +, Catalin Marinas wrote: > On Tue, Nov 12, 2024 at 01:08:16PM +, Mark Brown wrote: > > + // This has to come after we set PSTATE.SM > > +check_fpmr_in: > > + tbz x0, #HAVE_FPMR_SHIFT, wait_for_writes > > + adrpx7, fpmr_in > > + ldr x7,

Re: [PATCH] mac802154: add a check for slave data list before delete

2024-11-12 Thread Lizhi Xu
On Tue, 12 Nov 2024 12:01:21 +0100, Miquel Raynal wrote: >On 12/11/2024 at 08:21:33 +08, Lizhi Xu wrote: > >> On Mon, 11 Nov 2024 20:46:57 +0100, Miquel Raynal wrote: >>> On 08/11/2024 at 22:54:20 +08, Lizhi Xu wrote: >>> >>> > syzkaller reported a corrupted list in ieee802154_if_remove. [1] >>>

[PATCH v2 3/3] kselftest/arm64: Add FPMR coverage to fp-ptrace

2024-11-12 Thread Mark Brown
Add coverage for FPMR to fp-ptrace. FPMR can be available independently of SVE and SME, if SME is supported then FPMR is cleared by entering and exiting streaming mode. As with other registers we generate random values to load into the register, we restrict these to bitfields which are always defin

Re: [PATCH net-next v11 14/23] ovpn: implement peer lookup logic

2024-11-12 Thread Antonio Quartulli
On 12/11/2024 02:18, Sergey Ryazanov wrote: On 04.11.2024 13:26, Sabrina Dubroca wrote: 2024-10-29, 11:47:27 +0100, Antonio Quartulli wrote:   struct ovpn_peer *ovpn_peer_get_by_transp_addr(struct ovpn_struct *ovpn, struct sk_buff *skb)   { -    struct ovpn_peer *p

[PATCH v2 1/3] kselftets/arm64: Use flag bits for features in fp-ptrace assembler code

2024-11-12 Thread Mark Brown
The assembler portions of fp-ptrace are passed feature flags by the C code indicating which architectural features are supported. Currently these use an entire register for each flag which is wasteful and gets cumbersome as new flags are added. Switch to using flag bits in a single register to make

Re: [PATCH v2 3/3] kselftest/arm64: Add FPMR coverage to fp-ptrace

2024-11-12 Thread Catalin Marinas
On Tue, Nov 12, 2024 at 01:08:16PM +, Mark Brown wrote: > + // This has to come after we set PSTATE.SM > +check_fpmr_in: > + tbz x0, #HAVE_FPMR_SHIFT, wait_for_writes > + adrpx7, fpmr_in > + ldr x7, [x7, :lo12:fpmr_in] > + msr FPMR, x7 Did this build for you

Re: [PATCH] kselftest/arm64: Check that SVCR is 0 in signal handlers

2024-11-12 Thread Mark Brown
On Tue, Nov 12, 2024 at 11:30:14AM +, Catalin Marinas wrote: > On Wed, Nov 06, 2024 at 05:07:51PM +, Mark Brown wrote: > > + fprintf(stderr, "Unexpected SVCR %llx\n", get_svcr()); > > + return 1; > > + } > I think I'll change both printf specifiers to %lx here since

  1   2   >