[PATCH v2 resend] selftests: timers: clocksource-switch: Adapt progress to kselftest framework

2024-12-12 Thread Geert Uytterhoeven
When adapting the test to the kselftest framework, a few printf() calls indicating test progress were not updated. Fix this by replacing these printf() calls by ksft_print_msg() calls. Fixes: ce7d101750ff8450 ("selftests: timers: clocksource-switch: adapt to kselftest framework") Signed-off-by:

Re: [PATCH net 1/2] bonding: fix xfrm offload feature setup on active-backup mode

2024-12-12 Thread Nikolay Aleksandrov
On 12/11/24 09:11, Hangbin Liu wrote: > The active-backup bonding mode supports XFRM ESP offload. However, when > a bond is added using command like `ip link add bond0 type bond mode 1 > miimon 100`, the `ethtool -k` command shows that the XFRM ESP offload is > disabled. This occurs because, in bon

Re: [PATCH net 1/2] bonding: fix xfrm offload feature setup on active-backup mode

2024-12-12 Thread Hangbin Liu
On Thu, Dec 12, 2024 at 11:19:33AM +0200, Nikolay Aleksandrov wrote: > > diff --git a/drivers/net/bonding/bond_main.c > > b/drivers/net/bonding/bond_main.c > > index 49dd4fe195e5..7daeab67e7b5 100644 > > --- a/drivers/net/bonding/bond_main.c > > +++ b/drivers/net/bonding/bond_main.c > > @@ -4389,7

Re: [PATCH net 1/2] bonding: fix xfrm offload feature setup on active-backup mode

2024-12-12 Thread Nikolay Aleksandrov
On 12/12/24 11:39, Hangbin Liu wrote: > On Thu, Dec 12, 2024 at 11:19:33AM +0200, Nikolay Aleksandrov wrote: >>> diff --git a/drivers/net/bonding/bond_main.c >>> b/drivers/net/bonding/bond_main.c >>> index 49dd4fe195e5..7daeab67e7b5 100644 >>> --- a/drivers/net/bonding/bond_main.c >>> +++ b/driver

[ANNOUNCE] EOL 4.19.325-rt140

2024-12-12 Thread Daniel Wagner
Hello RT-list! I'm pleased to announce the 4.19.325-rt140 stable release. This just an update to the last release of the v4.19 stable tree. No RT specific changes. The v4.19 stable branch reached the end of life, thus this is also the last update for v4.19-rt. Users are encouraged to migrate to

Re: [PATCH v3 0/4] Migrate PCI Endpoint Subsystem tests to Kselftest

2024-12-12 Thread Niklas Cassel
Hello Mani, On Wed, Dec 11, 2024 at 01:31:01PM +0530, Manivannan Sadhasivam wrote: > Hi, > > This series carries forward the effort to add Kselftest for PCI Endpoint > Subsystem started by Aman Gupta [1] a while ago. I reworked the initial > version > based on another patch that fixes the return

Re: [RFC v1 0/5] Move kvfree_rcu() into SLAB

2024-12-12 Thread Vlastimil Babka
On 12/10/24 17:40, Uladzislau Rezki (Sony) wrote: > Hello! Hi and thanks! > This series is based on v6.12 kernel. Could it be rebased to v6.13-rc1, which is a basis for most -next branches? Right now patch 5 doesn't apply on v6.13-rc1. Please also Cc all slab maintainers/reviewers. > It is an

Re: [RFC v2 04/13] rust: sync: atomic: Add generic atomics

2024-12-12 Thread Alice Ryhl
On Fri, Nov 1, 2024 at 7:03 AM Boqun Feng wrote: > > To provide using LKMM atomics for Rust code, a generic `Atomic` is > added, currently `T` needs to be Send + Copy because these are the > straightforward usages and all basic types support this. The trait > `AllowAtomic` should be only ipmlement

[PATCH v6 03/16] rust: implement `IdArray`, `IdTable` and `RawDeviceId`

2024-12-12 Thread Danilo Krummrich
Most subsystems use some kind of ID to match devices and drivers. Hence, we have to provide Rust drivers an abstraction to register an ID table for the driver to match. Generally, those IDs are subsystem specific and hence need to be implemented by the corresponding subsystem. However, the `IdArra

[PATCH v6 04/16] rust: add rcu abstraction

2024-12-12 Thread Danilo Krummrich
From: Wedson Almeida Filho Add a simple abstraction to guard critical code sections with an rcu read lock. Reviewed-by: Boqun Feng Signed-off-by: Wedson Almeida Filho Co-developed-by: Danilo Krummrich Signed-off-by: Danilo Krummrich --- MAINTAINERS | 1 + rust/helpers/helpers.c

[PATCH v6 12/16] rust: of: add `of::DeviceId` abstraction

2024-12-12 Thread Danilo Krummrich
`of::DeviceId` is an abstraction around `struct of_device_id`. This is used by subsequent patches, in particular the platform bus abstractions, to create OF device ID tables. Reviewed-by: Rob Herring (Arm) Signed-off-by: Danilo Krummrich --- MAINTAINERS| 1 + rust/kernel/lib.rs | 1 +

[PATCH v6 13/16] rust: driver: implement `Adapter`

2024-12-12 Thread Danilo Krummrich
In order to not duplicate code in bus specific implementations (e.g. platform), implement a generic `driver::Adapter` to represent the connection of matched drivers and devices. Bus specific `Adapter` implementations can simply implement this trait to inherit generic functionality, such as matchin

[PATCH v6 06/16] rust: add `Revocable` type

2024-12-12 Thread Danilo Krummrich
From: Wedson Almeida Filho Revocable allows access to objects to be safely revoked at run time. This is useful, for example, for resources allocated during device probe; when the device is removed, the driver should stop accessing the device resources even if another state is kept in memory due

[PATCH v6 07/16] rust: add `io::{Io, IoRaw}` base types

2024-12-12 Thread Danilo Krummrich
I/O memory is typically either mapped through direct calls to ioremap() or subsystem / bus specific ones such as pci_iomap(). Even though subsystem / bus specific functions to map I/O memory are based on ioremap() / iounmap() it is not desirable to re-implement them in Rust. Instead, implement a

Re: [PATCH v2 3/6] KVM: VMX: Handle vectoring error in check_emulate_instruction

2024-12-12 Thread Ivan Orlov
On Wed, Dec 11, 2024 at 05:01:07PM -0800, Sean Christopherson wrote: > > Hm, by the way, what is the desired behaviour if EMULTYPE_ALLOW_RETRY_PF is > > set? Is it correct that we return an internal error if it is set during > > vectoring? Or KVM may try to unprotect the page and re-execute? > > H

[PATCH v6 16/16] MAINTAINERS: add Danilo to DRIVER CORE

2024-12-12 Thread Danilo Krummrich
Let's keep an eye on the Rust abstractions; add myself as reviewer to DRIVER CORE. Signed-off-by: Danilo Krummrich --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 95bd7dc88ad8..6b9e10551392 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7021,6

[PATCH v6 09/16] rust: pci: add basic PCI device / driver abstractions

2024-12-12 Thread Danilo Krummrich
Implement the basic PCI abstractions required to write a basic PCI driver. This includes the following data structures: The `pci::Driver` trait represents the interface to the driver and provides `pci::Driver::probe` for the driver to implement. The `pci::Device` abstraction represents a `struct

[PATCH v6 02/16] rust: implement generic driver registration

2024-12-12 Thread Danilo Krummrich
Implement the generic `Registration` type and the `RegistrationOps` trait. The `Registration` structure is the common type that represents a driver registration and is typically bound to the lifetime of a module. However, it doesn't implement actual calls to the kernel's driver core to register dr

[PATCH v6 11/16] samples: rust: add Rust PCI sample driver

2024-12-12 Thread Danilo Krummrich
This commit adds a sample Rust PCI driver for QEMU's "pci-testdev" device. To enable this device QEMU has to be called with `-device pci-testdev`. The same driver shows how to use the PCI device / driver abstractions, as well as how to request and map PCI BARs, including a short sequence of MMIO o

[PATCH v6 10/16] rust: pci: implement I/O mappable `pci::Bar`

2024-12-12 Thread Danilo Krummrich
Implement `pci::Bar`, `pci::Device::iomap_region` and `pci::Device::iomap_region_sized` to allow for I/O mappings of PCI BARs. To ensure that a `pci::Bar`, and hence the I/O memory mapping, can't out-live the PCI device, the `pci::Bar` type is always embedded into a `Devres` container, such that t

[PATCH v6 15/16] samples: rust: add Rust platform sample driver

2024-12-12 Thread Danilo Krummrich
Add a sample Rust platform driver illustrating the usage of the platform bus abstractions. This driver probes through either a match of device / driver name or a match within the OF ID table. Reviewed-by: Rob Herring (Arm) Signed-off-by: Danilo Krummrich --- MAINTAINERS

[PATCH v6 14/16] rust: platform: add basic platform device / driver abstractions

2024-12-12 Thread Danilo Krummrich
Implement the basic platform bus abstractions required to write a basic platform driver. This includes the following data structures: The `platform::Driver` trait represents the interface to the driver and provides `platform::Driver::probe` for the driver to implement. The `platform::Device` abst

[GIT PULL] OpenRISC fixes for 6.13-rc3

2024-12-12 Thread Stafford Horne
Hello Linus, Please consider for pull, The following changes since commit fac04efc5c793dccbd07e2d59af9f90b7fc0dca4: Linux 6.13-rc2 (2024-12-08 14:03:39 -0800) are available in the Git repository at: https://github.com/openrisc/linux.git tags/for-linus for you to fetch changes up to c8f8d4

Re: [RFC v2 02/13] rust: sync: Add basic atomic operation mapping framework

2024-12-12 Thread Boqun Feng
On Thu, Dec 12, 2024 at 11:51:23AM +0100, Alice Ryhl wrote: > On Fri, Nov 1, 2024 at 7:03 AM Boqun Feng wrote: > > > > Preparation for generic atomic implementation. To unify the > > ipmlementation of a generic method over `i32` and `i64`, the C side > > atomic methods need to be grouped so that i

Re: [PATCH v3 0/3] PCI: endpoint: fix bug for 2 APIs and simplify 1 API

2024-12-12 Thread Dan Carpenter
On Tue, Dec 10, 2024 at 10:00:17PM +0800, Zijun Hu wrote: > This patch series is to fix bug for APIs > - devm_pci_epc_destroy(). > - pci_epf_remove_vepf(). > > and simplify APIs below: > - pci_epc_get(). > > Signed-off-by: Zijun Hu > --- This is very good. This is Config FS. Is there a kself

Re: [RFC v2 02/13] rust: sync: Add basic atomic operation mapping framework

2024-12-12 Thread Alice Ryhl
On Fri, Nov 1, 2024 at 7:03 AM Boqun Feng wrote: > > Preparation for generic atomic implementation. To unify the > ipmlementation of a generic method over `i32` and `i64`, the C side > atomic methods need to be grouped so that in a generic method, they can > be referred as ::, otherwise their para

Re: [PATCH net-next v15 06/22] ovpn: introduce the ovpn_socket object

2024-12-12 Thread Sabrina Dubroca
2024-12-11, 22:15:10 +0100, Antonio Quartulli wrote: > +static struct ovpn_socket *ovpn_socket_get(struct socket *sock) > +{ > + struct ovpn_socket *ovpn_sock; > + > + rcu_read_lock(); > + ovpn_sock = rcu_dereference_sk_user_data(sock->sk); > + if (WARN_ON(!ovpn_socket_hold(ovpn_soc

[PATCH v6 00/16] Device / Driver PCI / Platform Rust abstractions

2024-12-12 Thread Danilo Krummrich
This patch series implements the necessary Rust abstractions to implement device drivers in Rust. This includes some basic generalizations for driver registration, handling of ID tables, MMIO operations and device resource handling. Those generalizations are used to implement device driver suppor

[PATCH v6 01/16] rust: module: add trait `ModuleMetadata`

2024-12-12 Thread Danilo Krummrich
In order to access static metadata of a Rust kernel module, add the `ModuleMetadata` trait. In particular, this trait provides the name of a Rust kernel module as specified by the `module!` macro. Signed-off-by: Danilo Krummrich --- rust/kernel/lib.rs| 6 ++ rust/macros/module.rs | 4 ++

[PATCH v6 05/16] rust: types: add `Opaque::pin_init`

2024-12-12 Thread Danilo Krummrich
Analogous to `Opaque::new` add `Opaque::pin_init`, which instead of a value `T` takes a `PinInit` and returns a `PinInit>`. Suggested-by: Alice Ryhl Signed-off-by: Danilo Krummrich --- rust/kernel/types.rs | 11 +++ 1 file changed, 11 insertions(+) diff --git a/rust/kernel/types.rs b/r

[PATCH v6 08/16] rust: add devres abstraction

2024-12-12 Thread Danilo Krummrich
Add a Rust abstraction for the kernel's devres (device resource management) implementation. The Devres type acts as a container to manage the lifetime and accessibility of device bound resources. Therefore it registers a devres callback and revokes access to the resource on invocation. Users of t

Re: [PATCH v2 6/6] selftests: KVM: Add test case for MMIO during vectoring

2024-12-12 Thread Ivan Orlov
On Wed, Dec 11, 2024 at 10:19:40AM -0800, Sean Christopherson wrote: > > +static void guest_code_mmio_during_vectoring(void) > > +{ > > + const struct desc_ptr idt_desc = { > > + .address = MEM_REGION_GPA, > > + .size = 0xFFF, > > + }; > > + > > + set_idt(&idt_de

Re: [PATCH net 0/2] bond: fix xfrm offload feature during init

2024-12-12 Thread Jakub Kicinski
On Wed, 11 Dec 2024 07:11:25 + Hangbin Liu wrote: > The first patch fixes the xfrm offload feature during setup active-backup > mode. The second patch add a ipsec offload testing. Looks like the test is too good, is there a fix pending somewhere for the BUG below? We can't merge the test befor

Re: [PATCH v3 0/3] PCI: endpoint: fix bug for 2 APIs and simplify 1 API

2024-12-12 Thread Zijun Hu
On 2024/12/12 17:35, Dan Carpenter wrote: > On Tue, Dec 10, 2024 at 10:00:17PM +0800, Zijun Hu wrote: >> This patch series is to fix bug for APIs >> - devm_pci_epc_destroy(). >> - pci_epf_remove_vepf(). >> >> and simplify APIs below: >> - pci_epc_get(). >> >> Signed-off-by: Zijun Hu >> --- > > Th

[PATCH rcu 2/3] srcu: Fix typo s/srcu_check_read_flavor()/__srcu_check_read_flavor()/

2024-12-12 Thread Paul E. McKenney
This commit fixes a typo in which a comment needed to have been updated from srcu_check_read_flavor() to __srcu_check_read_flavor(). Reported-by: Neeraj Upadhyay Closes: https://lore.kernel.org/all/b75d1fcd-6fcd-4619-bb5c-507fa599e...@amd.com/ Signed-off-by: Paul E. McKenney --- include/linux/

[PATCH rcu 3/3] srcu: Remove redundant GP sequence checks in srcu_funnel_gp_start

2024-12-12 Thread Paul E. McKenney
From: Feng Lee <379943...@qq.com> We will perform GP sequence checking at the beginning of srcu_gp_start, thus making it safe to remove duplicate GP sequence checks prior to calling srcu_gp_start. Signed-off-by: Feng Lee <379943...@qq.com> Signed-off-by: Paul E. McKenney --- kernel/rcu/srcutree

[PATCH rcu 1/3] srcu: Guarantee non-negative return value from srcu_read_lock()

2024-12-12 Thread Paul E. McKenney
For almost 20 years, the int return value from srcu_read_lock() has been always either zero or one. This commit therefore documents the fact that it will be non-negative, and does the same for the underlying __srcu_read_lock(). [ paulmck: Apply Andrii Nakryiko feedback. ] Signed-off-by: Paul E.

[PATCH rcu 0/3] SRCU updates for v6.14

2024-12-12 Thread Paul E. McKenney
Hello! This series contains SRCU updates: 1. Guarantee non-negative return value from srcu_read_lock(). 2. Fix typo s/srcu_check_read_flavor()/__srcu_check_read_flavor()/. 3. Remove redundant GP sequence checks in srcu_funnel_gp_start, courtesy of Feng Lee.

[PATCH rcu 1/2] refscale: Add test for sched_clock()

2024-12-12 Thread Paul E. McKenney
This commit adds a "sched-clock" test for the sched_clock() function. Signed-off-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker --- kernel/rcu/refscale.c | 40 +--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/kernel/rcu/refscale.c

[PATCH rcu 2/2] torture: Make kvm-remote.sh give up on unresponsive system

2024-12-12 Thread Paul E. McKenney
Currently, a system that stops responding at the wrong time will hang kvm-remote.sh. This can happen when the system in question is forced offline for maintenance, and there is currently no way for the user to kick this script into moving ahead. This commit therefore causes kvm-remote.sh to wait

[PATCH rcu 0/2] Torture-test updates for v6.14

2024-12-12 Thread Paul E. McKenney
Hello! This series provides a couple of torture-test updates. 1. Add test for sched_clock(). 2. Make kvm-remote.sh give up on unresponsive system. Thanx, Paul ke

Re: [PATCH v2 0/5] Move kvfree_rcu() into SLAB (v2)

2024-12-12 Thread Uladzislau Rezki
On Thu, Dec 12, 2024 at 10:30:28AM -0800, Christoph Lameter (Ampere) wrote: > On Thu, 12 Dec 2024, Uladzislau Rezki (Sony) wrote: > > > This is v2. It is based on the Linux 6.13-rc2. The first version is > > here: > > I do not see any use of internal slab interfaces by this code. It seems to > be

Re: [PATCH v2 0/5] Move kvfree_rcu() into SLAB (v2)

2024-12-12 Thread Paul E. McKenney
On Thu, Dec 12, 2024 at 10:30:28AM -0800, Christoph Lameter (Ampere) wrote: > On Thu, 12 Dec 2024, Uladzislau Rezki (Sony) wrote: > > > This is v2. It is based on the Linux 6.13-rc2. The first version is > > here: > > I do not see any use of internal slab interfaces by this code. It seems to > be

Re: [RFC v2 04/13] rust: sync: atomic: Add generic atomics

2024-12-12 Thread Boqun Feng
On Thu, Dec 12, 2024 at 11:57:07AM +0100, Alice Ryhl wrote: [...] > > diff --git a/rust/kernel/sync/atomic/generic.rs > > b/rust/kernel/sync/atomic/generic.rs > > new file mode 100644 > > index ..204da38e2691 > > --- /dev/null > > +++ b/rust/kernel/sync/atomic/generic.rs > > @@ -0,0 +1

[PATCH v2 3/5] rcu/kvfree: Adjust names passed into trace functions

2024-12-12 Thread Uladzislau Rezki (Sony)
Currently trace functions are supplied with "rcu_state.name" member which is located in the structure. The problem is that the "rcu_state" structure variable is local and can not be accessed from another place. To address this, this preparation patch passes "slab" string as a first argument. Sign

Re: [PATCH v2 3/6] KVM: VMX: Handle vectoring error in check_emulate_instruction

2024-12-12 Thread Sean Christopherson
On Thu, Dec 12, 2024, Ivan Orlov wrote: > On Wed, Dec 11, 2024 at 05:01:07PM -0800, Sean Christopherson wrote: > > > Hm, by the way, what is the desired behaviour if EMULTYPE_ALLOW_RETRY_PF > > > is > > > set? Is it correct that we return an internal error if it is set during > > > vectoring? Or K

Re: [PATCH net-next v15 06/22] ovpn: introduce the ovpn_socket object

2024-12-12 Thread Antonio Quartulli
On 12/12/2024 17:19, Sabrina Dubroca wrote: 2024-12-11, 22:15:10 +0100, Antonio Quartulli wrote: +static struct ovpn_socket *ovpn_socket_get(struct socket *sock) +{ + struct ovpn_socket *ovpn_sock; + + rcu_read_lock(); + ovpn_sock = rcu_dereference_sk_user_data(sock->sk); +

[PATCH v2 0/5] Move kvfree_rcu() into SLAB (v2)

2024-12-12 Thread Uladzislau Rezki (Sony)
Hello! This is v2. It is based on the Linux 6.13-rc2. The first version is here: https://lore.kernel.org/linux-mm/20241210164035.3391747-4-ure...@gmail.com/T/ The difference between v1 and v2 is that, the preparation process is done in original place instead and after that there is one final mov

[PATCH rcu 6/8] rcu: Add KCSAN exclusive-writer assertions for rdp->cpu_no_qs.b.exp

2024-12-12 Thread Paul E. McKenney
The value of rdp->cpu_no_qs.b.exp may be changed only by the corresponding CPU, and that CPU is not even allowed to race with itself, for example, via interrupt handlers. This commit therefore adds KCSAN exclusive-writer assertions to check this constraint. Signed-off-by: Paul E. McKenney Cc: Fr

[PATCH rcu 11/18] rcutorture: Make rcutorture_one_extend() check reader state

2024-12-12 Thread Paul E. McKenney
This commit adds reader-state debugging checks to a new function named rcutorture_one_extend_check(), which is invoked before and after setting new reader states by the existing rcutorture_one_extend() function. These checks have proven to be rather heavyweight, reducing reproduction rate of some f

[PATCH rcu 07/18] rcutorture: Check preemption for failing reader

2024-12-12 Thread Paul E. McKenney
This commit checks to see if the RCU reader has been preempted within its read-side critical section for RCU flavors supporting this notion (currently only preemptible RCU). If such a preemption occurred, then this is printed at the end of the "Failure/close-call rcutorture reader segments" list a

[PATCH rcu 09/18] rcutorture: Add full read-side contexts to "busted" torture type

2024-12-12 Thread Paul E. McKenney
The purpose of the "busted" torture type is to test rcutorture code paths used only when a too-short grace period is detected. Currently, "busted" only uses normal rcu_read_lock()-style readers, which fails to exercise much of the "Failure/close-call rcutorture reader segments" functionality. This

[PATCH rcu 04/18] rcutorture: Decorate failing reader segments with CPU ID

2024-12-12 Thread Paul E. McKenney
This commit adds CPU number to the "Failure/close-call rcutorture reader segments" list printed at the end of an rcutorture run that had too-short grace periods. This information can help debugging interactions with migration and CPU hotplug. However, experience indicates that sampling the CPU nu

[PATCH rcu 13/18] rcutorture: Add documentation for recent conditional and polled APIs

2024-12-12 Thread Paul E. McKenney
This commit adds kernel-parameters.txt documentation for rcutorture's (relatively) new gp_cond_exp, gp_cond_full, gp_cond_exp, gp_poll, gp_poll_exp, gp_poll_full, and gp_poll_exp module parameters. Signed-off-by: Paul E. McKenney --- .../admin-guide/kernel-parameters.txt | 36 +++

[PATCH rcu 10/18] rcutorture: Pretty-print rcutorture reader segments

2024-12-12 Thread Paul E. McKenney
The current "Failure/close-call rcutorture reader segments" output is good and sufficient, but annoying when you have to interpret several tens of them after an all-night rcutorture run. This commit therefore makes them a bit more human-readable. Signed-off-by: Paul E. McKenney Cc: Frederic Weis

[PATCH rcu 0/18] RCU torture-test updates for v6.14

2024-12-12 Thread Paul E. McKenney
Hello! This series contains rcutorture updates: 1. Add dowarn argument to torture_sched_setaffinity(). 2. Add random real-time preemption. 3. Make the TREE03 scenario do preemption. 4. Decorate failing reader segments with CPU ID. 5. Use finer-grained timeouts for rcu

[PATCH rcu 01/18] torture: Add dowarn argument to torture_sched_setaffinity()

2024-12-12 Thread Paul E. McKenney
Current use cases of torture_sched_setaffinity() are well served by its unconditional warning on error. However, an upcoming use case for a preemption kthread needs to avoid warnings that might otherwise arise when that kthread attempted to bind itself to a CPU on its way offline. This commit ther

[PATCH rcu 02/18] rcutorture: Add random real-time preemption

2024-12-12 Thread Paul E. McKenney
This commit adds the rcutorture.preempt_duration kernel module parameter, which gives the real-time preemption duration in milliseconds (zero to disable, which is the default) and also the rcutorture.preempt_interval module parameter, which gives the interval between successive preemptions, also in

[PATCH rcu 03/18] rcutorture: Make the TREE03 scenario do preemption

2024-12-12 Thread Paul E. McKenney
This commit adds the rcutorture.preempt_duration module parameter to rcutorture's TREE03.boot parameter list in order to better test preemption of RCU read-side critical sections. Signed-off-by: Paul E. McKenney --- tools/testing/selftests/rcutorture/configs/rcu/TREE03.boot | 1 + 1 file changed

[PATCH rcu 06/18] rcutorture: Add ->cond_sync_exp_full function to rcu_ops structure

2024-12-12 Thread Paul E. McKenney
The rcu_ops structure currently lacks a ->cond_sync_exp_full function, which prevents testign of conditional full-state polled grace periods. This commit therefore adds them, enabling testing this option. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcutorture.c | 1 + 1 file changed, 1 insert

[PATCH rcu 12/18] rcutorture: Ignore attempts to test preemption and forward progress

2024-12-12 Thread Paul E. McKenney
Use of the rcutorture preempt_duration and the default-on fwd_progress kernel parameters can result in preemption of callback processing during forward-progress testing, which is an excellent way to OOM your test if your kernel offloads RCU callbacks. This commit therefore treats preempt_duration

[PATCH rcu 08/18] rcutorture: Decorate failing reader segments with last CPU ID

2024-12-12 Thread Paul E. McKenney
In kernels built with CONFIG_RCU_TORTURE_TEST_LOG_CPU=y, the CPU is logged at the beginning of each reader segment. This commit further logs it at the end of the full set of reader segments in order to show any migration that might have occurred during the last reader segment. Signed-off-by: Paul

[PATCH rcu 05/18] rcutorture: Use finer-grained timeouts for rcu_torture_writer() polling

2024-12-12 Thread Paul E. McKenney
The rcu_torture_writer() polling currently uses timeouts ranging from zero to 16 milliseconds to wait for the polled grace period to end. This works, but it would be better to have a higher probability of exercising races with the code that cleans up after a grace period. This commit therefore swit

[PATCH rcu 17/18] rcutorture: Add per-reader-segment preemption diagnostics

2024-12-12 Thread Paul E. McKenney
For preemptible RCU, this commit adds an indication for each reader segments to whether the rcu_torture_reader() task was on the ->blkd_tasks lists, though only in kernels built with CONFIG_RCU_TORTURE_TEST_LOG_CPU=y. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcutorture.c | 9 + 1 f

[PATCH rcu 14/18] rcutorture: Add parameters to control polled/conditional wait interval

2024-12-12 Thread Paul E. McKenney
This commit adds rcutorture module parameters gp_cond_wi, gp_cond_wi_exp, gp_poll_wi, and gp_poll_wi_exp to control the wait interval for conditional, conditional expedited, polled, and polled expedited grace periods, respectively. When rcu_torture_writer() is testing these types of grace periods,

[PATCH rcu 18/18] rcutorture: Use symbols for SRCU reader flavors

2024-12-12 Thread Paul E. McKenney
This commit converts rcutorture.c values for the reader_flavor module parameter from hexadecimal to the SRCU_READ_FLAVOR_* C-preprocessor macros. The actual modprobe or kernel-boot-parameter values for read_flavor must still be entered in hexadecimal. Link: https://lore.kernel.org/all/c48c9dca-fe

[PATCH rcu 16/18] rcutorture: Read CPU ID for decoration protected by both reader types

2024-12-12 Thread Paul E. McKenney
Currently, rcutorture_one_extend() reads the CPU ID before making any change to the type of RCU reader. This can be confusing because the properties of the code from which the CPU ID is read are not that of the reader segment that this same CPU ID is listed with. This commit therefore causes rcut

[PATCH rcu 15/18] rcutorture: Add preempt_count() to rcutorture_one_extend_check() diagnostics

2024-12-12 Thread Paul E. McKenney
This commit adds the value of preempt_count() to the diagnostics produced by rcutorture_one_extend_check() to improve debugging. Signed-off-by: Paul E. McKenney --- kernel/rcu/rcutorture.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rc

Re: [PATCH v2 0/5] Move kvfree_rcu() into SLAB (v2)

2024-12-12 Thread Christoph Lameter (Ampere)
On Thu, 12 Dec 2024, Uladzislau Rezki (Sony) wrote: > This is v2. It is based on the Linux 6.13-rc2. The first version is > here: I do not see any use of internal slab interfaces by this code. It seems to be using rcu internals though. So it would best be placed with the rcu code.

[PATCH rcu 2/8] rcu: Make rcu_report_exp_cpu_mult() caller acquire lock

2024-12-12 Thread Paul E. McKenney
There is a hard-to-trigger bug in the expedited grace-period computation whose fix requires that the __sync_rcu_exp_select_node_cpus() function to check that the grace-period sequence number has not changed before invoking rcu_report_exp_cpu_mult(). However, this check must be done while holding t

[PATCH rcu 5/8] rcu: Make preemptible rcu_exp_handler() check idempotency

2024-12-12 Thread Paul E. McKenney
Although the non-preemptible implementation of rcu_exp_handler() contains checks to enforce idempotency, the preemptible version does not. The reason for this omission is that in preemptible kernels, there is no reporting of quiescent states from CPU hotplug notifiers, and thus no need for idempote

[PATCH rcu 0/8] Miscellaneous fixes for v6.14

2024-12-12 Thread Paul E. McKenney
Hello! This series contains miscellaneous fixes: 1. Report callbacks enqueued on offline CPU blind spot, courtesy of Frederic Weisbecker. 2. Make rcu_report_exp_cpu_mult() caller acquire lock. 3. Move rcu_report_exp_rdp() setting of ->cpu_no_qs.b.exp under lock. 4.

[PATCH rcu 3/8] rcu: Move rcu_report_exp_rdp() setting of ->cpu_no_qs.b.exp under lock

2024-12-12 Thread Paul E. McKenney
This commit reduces the state space of rcu_report_exp_rdp() by moving the setting of ->cpu_no_qs.b.exp under the rcu_node structure's ->lock. The lock isn't really all that important here, given that this per-CPU field is supposed to be written only by its CPU, but the disabling of interrupts exclu

[PATCH rcu 7/8] rcu: Add lockdep_assert_irqs_disabled() to rcu_exp_need_qs()

2024-12-12 Thread Paul E. McKenney
Callers to rcu_exp_need_qs() are supposed to disable interrupts, so this commit enlists lockdep's aid in checking this. Signed-off-by: Paul E. McKenney Cc: Frederic Weisbecker --- kernel/rcu/tree_exp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/rcu/tree_exp.h b/kernel/rcu/tree_e

[PATCH rcu 8/8] MAINTAINERS: Update RCU git tree

2024-12-12 Thread Paul E. McKenney
RCU now has a shiny new shared git tree, so this commit updates MAINTAINERS to point to it instead of my personal -rcu tree. Reported-by: Song Liu Signed-off-by: Paul E. McKenney --- MAINTAINERS | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MAINTAINERS b/MAINTAI

[PATCH rcu 1/8] rcu: Report callbacks enqueued on offline CPU blind spot

2024-12-12 Thread Paul E. McKenney
From: Frederic Weisbecker Callbacks enqueued after rcutree_report_cpu_dead() fall into RCU barrier blind spot. Report any potential misuse. Reported-by: Paul E. McKenney Signed-off-by: Frederic Weisbecker Signed-off-by: Paul E. McKenney --- kernel/rcu/tree.c | 3 +++ 1 file changed, 3 insert

[PATCH rcu 4/8] rcu: Replace open-coded rcu_exp_need_qs() from rcu_exp_handler() with call

2024-12-12 Thread Paul E. McKenney
Currently, the preemptible implementation of rcu_exp_handler() almost open-codes rcu_exp_need_qs(). A call to that function would be shorter and would improve expediting in cases where rcu_exp_handler() interrupted a preemption-disabled or bh-disabled region of code. This commit therefore moves rc

[PATCH rcu 1/2] rcu/nocb: Use switch/case on NOCB timer state machine

2024-12-12 Thread Paul E. McKenney
From: Frederic Weisbecker It's more convenient to benefit from the fallthrough feature of switch / case to handle the timer state machine. Also a new state is about to be added that will take advantage of it. No intended functional change. Signed-off-by: Frederic Weisbecker Signed-off-by: Paul

[PATCH rcu 2/2] rcu/nocb: Fix rcuog wake-up from offline softirq

2024-12-12 Thread Paul E. McKenney
From: Frederic Weisbecker After a CPU has set itself offline and before it eventually calls rcutree_report_cpu_dead(), there are still opportunities for callbacks to be enqueued, for example from an IRQ. When that happens on NOCB, the rcuog wake-up is deferred through an IPI to an online CPU in o

[PATCH rcu 0/2] No-CB changes for v6.14

2024-12-12 Thread Paul E. McKenney
Hello! This series contains NOCB updates: 1. Use switch/case on NOCB timer state machine, courtesy of Frederic Weisbecker. 2. Fix rcuog wake-up from offline softirq, courtesy of Frederic Weisbecker. Thanx, Paul -

Re: [PATCH 2/4] platform/x86: wmi-bmof: Switch to sysfs_bin_attr_simple_read()

2024-12-12 Thread Armin Wolf
Am 05.12.24 um 18:35 schrieb Thomas Weißschuh: The generic function from the sysfs core can replace the custom one. Sorry for taking quite a bit to respond, i totally overlooked this patch. This patch is superseded by a patch of mine: https://lore.kernel.org/platform-driver-x86/2024120621565

Re: [RFC v1 0/5] Move kvfree_rcu() into SLAB

2024-12-12 Thread Uladzislau Rezki
On Thu, Dec 12, 2024 at 11:30:36AM +0100, Vlastimil Babka wrote: > On 12/10/24 17:40, Uladzislau Rezki (Sony) wrote: > > Hello! > > Hi and thanks! > > > This series is based on v6.12 kernel. > > Could it be rebased to v6.13-rc1, which is a basis for most -next branches? > Right now patch 5 doesn

[PATCH v2 5/5] mm/slab: Move kvfree_rcu() into SLAB

2024-12-12 Thread Uladzislau Rezki (Sony)
Move kvfree_rcu() functionality to the slab_common.c file. Signed-off-by: Uladzislau Rezki (Sony) --- include/linux/rcupdate.h | 1 - include/linux/slab.h | 1 + kernel/rcu/tree.c| 879 -- mm/slab_common.c | 880

Re: [GIT PULL] OpenRISC fixes for 6.13-rc3

2024-12-12 Thread pr-tracker-bot
The pull request you sent on Thu, 12 Dec 2024 16:49:15 +: > https://github.com/openrisc/linux.git tags/for-linus has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/eefa7a9c069908412f8f5d15833901d1b46ae1b2 Thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.ke

Re: [PATCH v3 3/4] virtio-pci: define type and header for PCI vendor data

2024-12-12 Thread Jason Wang
On Mon, Dec 9, 2024 at 11:16 PM Shijith Thotton wrote: > > Added macro definition for VIRTIO_PCI_CAP_VENDOR_CFG to identify the PCI > vendor data type in the virtio_pci_cap structure. Defined a new struct > virtio_pci_vndr_data for the vendor data capability header as per the > specification. > >

Re: [PATCH v3 4/4] vdpa/octeon_ep: read vendor-specific PCI capability

2024-12-12 Thread Jason Wang
On Mon, Dec 9, 2024 at 11:16 PM Shijith Thotton wrote: > > Added support to read the vendor-specific PCI capability to identify the > type of device being emulated. > > Reviewed-by: Dan Carpenter > Signed-off-by: Shijith Thotton > --- > drivers/vdpa/octeon_ep/octep_vdpa.h | 20

Re: [PATCH v3 1/4] vdpa/octeon_ep: enable support for multiple interrupts per device

2024-12-12 Thread Jason Wang
On Mon, Dec 9, 2024 at 11:16 PM Shijith Thotton wrote: > > Updated the driver to utilize all the MSI-X interrupt vectors supported > by each OCTEON endpoint VF, instead of relying on a single vector. > Enabling more interrupts allows packets from multiple rings to be > distributed across multiple

Re: [PATCH bpf-next v5 4/5] bpf: verifier: Support eliding map lookup nullness

2024-12-12 Thread Eduard Zingerman
On Thu, 2024-12-12 at 16:22 -0700, Daniel Xu wrote: I think these changes are fine in general, but see below. > diff --git a/kernel/bpf/verifier.c b/kernel/bpf/verifier.c > index 58b36cc96bd5..4947ef884a18 100644 > --- a/kernel/bpf/verifier.c > +++ b/kernel/bpf/verifier.c > @@ -287,6 +287,7 @@ st

Re: [PATCH bpf-next v5 3/5] bpf: verifier: Refactor helper access type tracking

2024-12-12 Thread Eduard Zingerman
On Thu, 2024-12-12 at 16:22 -0700, Daniel Xu wrote: > Previously, the verifier was treating all PTR_TO_STACK registers passed > to a helper call as potentially written to by the helper. However, all > calls to check_stack_range_initialized() already have precise access type > information available.

Re: [PATCH 1/4] KVM: VMX: read the PML log in the same order as it was written

2024-12-12 Thread Maxim Levitsky
On Wed, 2024-12-11 at 16:44 -0800, Sean Christopherson wrote: > On Wed, Dec 11, 2024, Maxim Levitsky wrote: > > X86 spec specifies that the CPU writes to the PML log 'backwards' > > SDM, because this is Intel specific. True. > > > or in other words, it first writes entry 511, then entry 510 and s

Re: [PATCH v3 05/57] KVM: x86: Account for KVM-reserved CR4 bits when passing through CR4 on VMX

2024-12-12 Thread Chao Gao
On Wed, Nov 27, 2024 at 05:33:32PM -0800, Sean Christopherson wrote: >Drop x86.c's local pre-computed cr4_reserved bits and instead fold KVM's >reserved bits into the guest's reserved bits. This fixes a bug where VMX's >set_cr4_guest_host_mask() fails to account for KVM-reserved bits when >decidin

[PATCH RFC rcu] Fix get_state_synchronize_rcu_full() GP-start detection

2024-12-12 Thread Paul E. McKenney
The get_state_synchronize_rcu_full() and poll_state_synchronize_rcu_full() functions use the root rcu_node structure's ->gp_seq field to detect the beginnings and ends of grace periods, respectively. This choice is necessary for the poll_state_synchronize_rcu_full() function because (give or take

[PATCH v2 2/5] rcu/kvfree: Move some functions under CONFIG_TINY_RCU

2024-12-12 Thread Uladzislau Rezki (Sony)
Currently when a tiny RCU is enabled, the tree.c file is not compiled, thus duplicating function names do not conflict with each other. Because of moving of kvfree_rcu() functionality to the SLAB, we have to reorder some functions and place them together under CONFIG_TINY_RCU macro definition. The

[PATCH v2 4/5] rcu/kvfree: Adjust a shrinker name

2024-12-12 Thread Uladzislau Rezki (Sony)
Rename "rcu-kfree" to "slab-kvfree-rcu" since it goes to the slab_common.c file soon. Signed-off-by: Uladzislau Rezki (Sony) --- kernel/rcu/tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c index 6ab21655c248..b7ec998f360e 100644 ---

[PATCH v2 1/5] rcu/kvfree: Initialize kvfree_rcu() separately

2024-12-12 Thread Uladzislau Rezki (Sony)
Introduce a separate initialization of kvfree_rcu() functionality. For such purpose a kfree_rcu_batch_init() is renamed to a kvfree_rcu_init() and it is invoked from the main.c right after rcu_init() is done. Signed-off-by: Uladzislau Rezki (Sony) --- include/linux/rcupdate.h | 1 + init/main.c

[PATCH v4 2/2] selftests/futex: Create test for robust list

2024-12-12 Thread André Almeida
Create a test for the robust list mechanism. Test the following uAPI operations: - Creating a robust mutex where the lock waiter is wake by the kernel when the lock owner died - Setting a robust list to the current task - Getting a robust list from the current task - Getting a robust list from a

[PATCH v4 0/2] selftests/futex: Create test for robust list

2024-12-12 Thread André Almeida
This patchset creates a selftest for the robust list interface, to track regressions and assure that the interface keeps working as expected. In this version I removed the kselftest_harness include, but I expanded the current futex selftest API a little bit with basic ASSERT_ macros to make the te

[PATCH v4 1/2] selftests/futex: Add ASSERT_ macros

2024-12-12 Thread André Almeida
Create ASSERT_{EQ, NE, TRUE, FALSE} macros to make test creation easier. Signed-off-by: André Almeida --- .../testing/selftests/futex/include/logging.h | 28 +++ 1 file changed, 28 insertions(+) diff --git a/tools/testing/selftests/futex/include/logging.h b/tools/testing/selfte

[PATCH bpf-next v5 4/5] bpf: verifier: Support eliding map lookup nullness

2024-12-12 Thread Daniel Xu
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 reasons: 1. Large numbers of nullness checks (especially when t

[PATCHv3 net-next 2/2] selftests: wireguard: update to using nft for qemu test

2024-12-12 Thread Hangbin Liu
Since we will replace iptables with nft for wireguard netns testing, let's also convert the qemu test to use nft at the same time. Co-developed-by: Phil Sutter Signed-off-by: Phil Sutter Signed-off-by: Hangbin Liu --- .../testing/selftests/wireguard/qemu/Makefile | 40 ++- .../

  1   2   >