[PATCH v2 01/10] rcu: Change rdp arg to cpu number for rcu_watching_snap_stopped_since()

2024-10-09 Thread neeraj . upadhyay
From: Neeraj Upadhyay In preparation of making rcu_watching_snap_stopped_since() available for RCU code outside of tree.c, change the rdp argument to cpu number. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/tree.c | 14 +++--- kernel/rcu/tree_exp.h | 2 +- 2 files changed, 8 inse

[PATCH v2 02/10] rcu: Make some rcu_watching_* functions global

2024-10-09 Thread neeraj . upadhyay
From: Neeraj Upadhyay rcu_watching_snap_in_eqs() and rcu_watching_snap_stopped_since() will be used in subsequent commits by RCU-tasks to check rcu_watching state of idle tasks. So, make these functions global. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/rcu.h | 4 kernel/rcu/tree.c |

[PATCH v2 03/10] rcu/tasks: Move holdout checks for idle task to a separate function

2024-10-09 Thread neeraj . upadhyay
From: Neeraj Upadhyay Move checks for an idle task being a holdout task for RCU-tasks to a separate function - rcu_idle_task_is_holdout(). This function will be used in subsequent commits to add additional checks for idle task. No functional change intended. Suggested-by: Frederic Weisbecker Si

[PATCH v2 04/10] rcu/tasks: Create rcu_idle_task_is_holdout() definition for !SMP

2024-10-09 Thread neeraj . upadhyay
From: Neeraj Upadhyay rcu_idle_task_is_holdout() is called in rcu_tasks_kthread() context. As idle tasks cannot be non-voluntary preempted, non-running idle tasks are not in RCU-tasks critical section. So, idle task is not a RCU-tasks holdout task on !SMP (which also covers TINY_RCU). Signed-off

[PATCH v2 05/10] rcu/tasks: Consider idle tasks not running on CPU as non-holdouts

2024-10-09 Thread neeraj . upadhyay
From: Neeraj Upadhyay As idle tasks cannot be non-voluntary preempted, idle tasks which are not running on CPU are not in RCU-tasks read side critical section. So, remove them for holdout tasks for RCU-tasks. Signed-off-by: Neeraj Upadhyay --- kernel/rcu/tasks.h | 9 + 1 file changed,

[PATCH v2 08/10] rcu/tasks: Make RCU-tasks pay attention to idle tasks

2024-10-09 Thread neeraj . upadhyay
From: Neeraj Upadhyay Currently, idle tasks are ignored by RCU-tasks. Change this to start paying attention to idle tasks except in deep-idle functions where RCU is not watching. With this, for architectures where kernel entry/exit and deep-idle functions have been properly tagged noinstr, Tasks

[PATCH v2 06/10] rcu/tasks: Check RCU watching state for holdout idle tasks

2024-10-09 Thread neeraj . upadhyay
From: Neeraj Upadhyay Use RCU watching state of a CPU to check whether RCU-tasks GP need to wait for idle task on that CPU. Idle tasks which are in deep-idle states where RCU is not watching or which have transitioned to/from deep-idle state do not block RCU-tasks grace period. Signed-off-by: Ne

[PATCH v2 07/10] rcu/tasks: Check RCU watching state for holdout idle injection tasks

2024-10-09 Thread neeraj . upadhyay
From: Neeraj Upadhyay Use RCU watching state of a CPU to check whether RCU-tasks GP need to wait for idle injection task on that CPU. Idle injection tasks which are in deep-idle states where RCU is not watching or which have transitioned to/from deep-idle state do not block RCU-tasks grace period

[PATCH v2 09/10] context_tracking: Invoke RCU-tasks enter/exit for NMI context

2024-10-09 Thread neeraj . upadhyay
From: Neeraj Upadhyay rcu_task_enter() and rcu_task_exit() are not called on NMI entry and exit. So, Tasks-RCU-Rude grace period wait is required to ensure that NMI handlers have entered/exited into Tasks-RCU eqs. For architectures which do not require Tasks-RCU-Rude (as the code sections where R

[PATCH v2 10/10] rcu: Allow short-circuiting of synchronize_rcu_tasks_rude()

2024-10-09 Thread neeraj . upadhyay
From: "Paul E. McKenney" There are now architectures for which all deep-idle and entry-exit functions are properly inlined or marked noinstr. Such architectures do not need synchronize_rcu_tasks_rude(), or will not once RCU Tasks has been modified to pay attention to idle tasks. This commit the

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

2024-10-09 Thread Abdellatif El Khlifi
Hello folks, > On 22/08/2024 6:09 pm, Abdellatif El Khlifi wrote: > > Add devicetree binding schema for the External Systems remote processors > > > > The External Systems remote processors are provided on the Corstone-1000 > > IoT Reference Design Platform via the SSE-710 subsystem. > > > > For

Re: [PATCH bpf-next v2 0/6] selftests/bpf: Various sockmap-related fixes

2024-10-09 Thread Jakub Sitnicki
I'm back after a short break. Sorry for delay. On Wed, Oct 02, 2024 at 10:27 AM +02, Michal Luczaj wrote: > On 9/27/24 11:15, Jakub Sitnicki wrote: >> On Fri, Sep 27, 2024 at 12:54 AM +02, Michal Luczaj wrote: >>> ... >>> Here's a follow up: my guess is that some checks are missing. I'm not sure >

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

2024-10-09 Thread Arnaud Pouliquen
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 loading of the firmware to the trusted execution context. In such cases, the firmware should be signed and adhere to the image format de

[PATCH v11 4/7] remoteproc: Introduce release_fw optional operation

2024-10-09 Thread Arnaud Pouliquen
This patch updates the rproc_ops struct to include an optional release_fw function. The release_fw ops is responsible for releasing the remote processor firmware image. The ops is called in the following cases: - An error occurs in rproc_start() between the loading of the segments and the

[PATCH v11 5/7] dt-bindings: remoteproc: Add compatibility for TEE support

2024-10-09 Thread Arnaud Pouliquen
The "st,stm32mp1-m4-tee" compatible is utilized in a system configuration where the Cortex-M4 firmware is loaded by the Trusted Execution Environment (TEE). For instance, this compatible is used in both the Linux and OP-TEE device trees: - In OP-TEE, a node is defined in the device tree with the

[PATCH v11 0/7] Introduction of a remoteproc tee to load signed firmware

2024-10-09 Thread Arnaud Pouliquen
Main updates from version V10[1]: - remove "select REMOTEPROC_TEE" in STM32_RPROC config to fix kernel robot To keep history of the updates I have kept in each patches the description of the updates versus the V9[2] revision. Main updates from version V9[2]: - Introduce release_fw remoteproc

[PATCH v11 1/7] remoteproc: core: Introduce rproc_pa_to_va helper

2024-10-09 Thread Arnaud Pouliquen
When a resource table is loaded by an external entity such as U-boot or OP-TEE, we do not necessarily get the device address(da) but the physical address(pa). This helper performs similar translation than the rproc_da_to_va() but based on a physical address. Signed-off-by: Arnaud Pouliquen --- d

[PATCH v11 6/7] remoteproc: stm32: Create sub-functions to request shutdown and release

2024-10-09 Thread Arnaud Pouliquen
To prepare for the support of TEE remoteproc, create sub-functions that can be used in both cases, with and without remoteproc TEE support. Signed-off-by: Arnaud Pouliquen --- Updates vs v9 revision: - Fix stm32_rproc_request_shutdown code, which was not an exact move of the source code from st

[PATCH v11 2/7] remoteproc: Add TEE support

2024-10-09 Thread Arnaud Pouliquen
Add a remoteproc TEE (Trusted Execution Environment) driver that will be probed by the TEE bus. If the associated Trusted application is supported on secure part this driver offers a client interface to load a firmware by the secure part. This firmware could be authenticated by the secure trusted a

[PATCH v11 3/7] remoteproc: core: Refactor resource table cleanup into rproc_release_fw

2024-10-09 Thread Arnaud Pouliquen
This patch centralizing the cleanup of the resource table into a new helper function rproc_release_fw(). More than just factorizing the code into a common function, it is the first step to integrate the release of the firmware image loaded by the OP-TEE remoteproc framework. Suggested-by: Mathieu

Re: [PATCH 0/6] Peripheral Image Loader support for Qualcomm SoCs

2024-10-09 Thread Shiraz Hashim
On Sun, Oct 06, 2024 at 10:34:19PM +0300, Dmitry Baryshkov wrote: > On Sat, Oct 05, 2024 at 02:53:53AM GMT, Mukesh Ojha wrote: > > Qualcomm is looking to enable remote processors on the SA8775p SoC > > running KVM Linux host and is currently trying to figure out an > > upstream-compatible solution

Re: [PATCH net-next v02 1/2] af_packet: allow fanout_add when socket is not RUNNING

2024-10-09 Thread Willem de Bruijn
Gur Stavi wrote: > >> @@ -1846,21 +1846,21 @@ static int fanout_add(struct sock *sk, struct > >> fanout_args *args) > >>err = -EINVAL; > >> > >>spin_lock(&po->bind_lock); > >> - if (packet_sock_flag(po, PACKET_SOCK_RUNNING) && > >> - match->type == type && > >> + if (match->type ==

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

2024-10-09 Thread Andrew Cooper
On 09/10/2024 4:51 am, Manwaring, Derek wrote: > On 2024-10-08 at 19:56+ Sean Christopherson wrote: >> Another (slightly crazy) approach would be use protection keys to provide the >> security properties that you want, while giving KVM (and userspace) a >> quick-and-easy >> override to access

Re: [PATCH v2 00/19] iommufd: Add VIOMMU infrastructure (Part-1)

2024-10-09 Thread Jason Gunthorpe
On Wed, Oct 09, 2024 at 03:20:57PM +0800, Yi Liu wrote: > On 2024/10/1 05:59, Nicolin Chen wrote: > > On Sun, Sep 29, 2024 at 03:16:55PM +0800, Yi Liu wrote: > > > > > > I feel these two might act somehow similarly to the two DIDs > > > > > > during nested translations? > > > > > > > > > > not qui

Re: [PATCH net-next v7] ptp: Add support for the AMZNC10C 'vmclock' device

2024-10-09 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net-next.git (main) by David S. Miller : On Sun, 06 Oct 2024 08:17:58 +0100 you wrote: > From: David Woodhouse > > The vmclock device addresses the problem of live migration with > precision clocks. The tolerances of a hardware counter (e.g. TSC) are > ty

Re: [PATCH v2 1/7] vhost: Add a new modparam to allow userspace select vhost_task

2024-10-09 Thread Jason Wang
On Mon, Oct 7, 2024 at 9:31 PM Stefano Garzarella wrote: > > On Fri, Oct 04, 2024 at 09:58:15AM GMT, Cindy Lu wrote: > >The vhost is now using vhost_task and working as a child of the owner thread. > >While this makes sense from containerization POV, some old userspace is > >confused, as previousl

[PATCH] selftests/bpf: Removed redundant variable

2024-10-09 Thread Zhu Jun
The error check is no longer needed for this test case, simplifying the code. Signed-off-by: Zhu Jun --- tools/testing/selftests/bpf/prog_tests/signal_pending.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/bpf/prog_tests/signal_pending.c b/tools/te

Re: [PATCH 6/6] remoteproc: qcom: Enable map/unmap and SHM bridge support

2024-10-09 Thread neil . armstrong
On 08/10/2024 08:21, Mukesh Ojha wrote: On Mon, Oct 07, 2024 at 08:22:39PM +0530, Mukesh Ojha wrote: On Mon, Oct 07, 2024 at 10:05:08AM +0200, neil.armstr...@linaro.org wrote: On 04/10/2024 23:23, Mukesh Ojha wrote: For Qualcomm SoCs runnning with Qualcomm EL2 hypervisor(QHEE), IOMMU translati

Re: [PATCH 3/6] remoteproc: qcom: Add helper function to support IOMMU devmem translation

2024-10-09 Thread neil . armstrong
Hi, On 07/10/2024 16:37, Mukesh Ojha wrote: On Mon, Oct 07, 2024 at 10:08:16AM +0200, neil.armstr...@linaro.org wrote: On 04/10/2024 23:23, Mukesh Ojha wrote: From: Shiraz Hashim Qualcomm SoCs runnning with Qualcomm EL2 hypervisor(QHEE), IOMMU translation set up for remote processors is mana

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

2024-10-09 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

Re: [PATCH RFC v3 03/10] openat2: explicitly return -E2BIG for (usize > PAGE_SIZE)

2024-10-09 Thread Greg KH
On Thu, Oct 10, 2024 at 07:40:36AM +1100, Aleksa Sarai wrote: > While we do currently return -EFAULT in this case, it seems prudent to > follow the behaviour of other syscalls like clone3. It seems quite > unlikely that anyone depends on this error code being EFAULT, but we can > always revert this

Re: [PATCH RFC v3 00/10] extensible syscalls: CHECK_FIELDS to allow for easier feature detection

2024-10-09 Thread Florian Weimer
* Aleksa Sarai: > This is something that I've been thinking about for a while. We had a > discussion at LPC 2020 about this[1] but the proposals suggested there > never materialised. > > In short, it is quite difficult for userspace to detect the feature > capability of syscalls at runtime. This i

Re: [PATCH bpf v7 1/2] bpf: fix unpopulated name_len field in perf_event link info

2024-10-09 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf.git (master) by Alexei Starovoitov : On Tue, 8 Oct 2024 16:43:11 + you wrote: > Previously when retrieving `bpf_link_info.perf_event` for > kprobe/uprobe/tracepoint, the `name_len` field was not populated by the > kernel, leaving it to reflect the va

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

2024-10-09 Thread Joel Fernandes
On Wed, Oct 9, 2024 at 4:56 PM Frederic Weisbecker wrote: > [...] > > > ? tick_handle_periodic > > > sysvec_apic_timer_interrupt > > > > > > > > > The periodic tick must be shutdown when the CPU is offline, just like is > > > done for oneshot tick. This must be fixed but t

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

2024-10-09 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 v3 0/2] selftests/futex: Create test for robust list

2024-10-09 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] selftests/bpf: Removed redundant fd after close in bpf_prog_load_log_buf

2024-10-09 Thread Zhu Jun
Removed unnecessary `fd = -1` assignments after closing file descriptors. because it will be assigned by the function bpf_prog_load().This improves code readability and removes redundant operations. Signed-off-by: Zhu Jun --- tools/testing/selftests/bpf/prog_tests/log_buf.c | 3 --- 1 file chang

RE: [PATCH net-next v02 1/2] af_packet: allow fanout_add when socket is not RUNNING

2024-10-09 Thread Willem de Bruijn
Gur Stavi wrote: > > Gur Stavi wrote: > > > >> @@ -1846,21 +1846,21 @@ static int fanout_add(struct sock *sk, > > struct fanout_args *args) > > > >>err = -EINVAL; > > > >> > > > >>spin_lock(&po->bind_lock); > > > >> - if (packet_sock_flag(po, PACKET_SOCK_RUNNING) && > > > >> -

Re: [PATCH net-next v7] ptp: Add support for the AMZNC10C 'vmclock' device

2024-10-09 Thread Jakub Kicinski
On Sun, 06 Oct 2024 08:17:58 +0100 David Woodhouse wrote: > +config PTP_1588_CLOCK_VMCLOCK > + tristate "Virtual machine PTP clock" > + depends on X86_TSC || ARM_ARCH_TIMER > + depends on PTP_1588_CLOCK && ACPI && ARCH_SUPPORTS_INT128 > + default y Why default to enabled? Linus wil

Re: [PATCH] selftests: net: rds: fix module not found

2024-10-09 Thread Jakub Kicinski
On Tue, 8 Oct 2024 10:22:53 +0200 Alessandro Zanni wrote: > This fix solves this error, when calling kselftest with targets "net/rds": > > selftests: net/rds: test.py > Traceback (most recent call last): > File "tools/testing/selftests/net/rds/./test.py", line 17, in > from lib.py import i

Re: [PATCH] selftests: drivers: net: fix name not defined

2024-10-09 Thread Jakub Kicinski
On Wed, 9 Oct 2024 00:01:33 +0200 Alessandro Zanni wrote: > This fix solves this error, when calling kselftest with targets "drivers/net": > > File "tools/testing/selftests/net/lib/py/nsim.py", line 64, in __init__ > if e.errno == errno.ENOSPC: > NameError: name 'errno' is not defined > > The

<    1   2