[PATCH] function_graph: Fix the ret_stack used by ftrace_graph_ret_addr()

2024-08-03 Thread Petr Pavlu
When ftrace_graph_ret_addr() is invoked to convert a found stack return address to its original value, the function can end up producing the following crash: [ 95.442712] BUG: kernel NULL pointer dereference, address: 0028 [ 95.442720] #PF: supervisor read access in kernel mode [

Re: [PATCH 2/8] uprobes: revamp uprobe refcounting and lifetime management

2024-08-02 Thread Oleg Nesterov
On 08/02, Andrii Nakryiko wrote: > > On Fri, Aug 2, 2024 at 1:50 AM Oleg Nesterov wrote: > > > > On 08/01, Andrii Nakryiko wrote: > > > > > > > + /* TODO : cant unregister? schedule a worker thread */ > > > > + WARN(err, "leaking uprobe due to failed > > > >

[PATCH v2 3/3] tracing/kprobes: Use APIs that matches symbols without .XXX suffix

2024-08-02 Thread Song Liu
Use the new kallsyms APIs that matches symbols name with .XXX suffix. This allows userspace tools to get kprobes on the expected function name, while the actual symbol has a .llvm. suffix. This only effects kernel compile with CONFIG_LTO_CLANG. Signed-off-by: Song Liu --- kernel/kprobes.c

[PATCH v2 2/3] kallsyms: Add APIs to match symbol without .XXXX suffix.

2024-08-02 Thread Song Liu
With CONFIG_LTO_CLANG=y, the compiler may add suffix to function names to avoid duplication. This causes confusion with users of kallsyms. On one hand, users like livepatch are required to match the symbols exactly. On the other hand, users like kprobe would like to match to original function

[PATCH v2 1/3] kallsyms: Do not cleanup .llvm. suffix before sorting symbols

2024-08-02 Thread Song Liu
Cleaning up the symbols causes various issues afterwards. Let's sort the list based on original name and handle suffix later during the symbol lookup. Signed-off-by: Song Liu --- scripts/kallsyms.c | 31 ++- scripts/link-vmlinux.sh | 4 2 files changed, 2

[PATCH v2 0/3] Fix kallsyms with CONFIG_LTO_CLANG

2024-08-02 Thread Song Liu
With CONFIG_LTO_CLANG, the compiler/linker adds .llvm. suffix to local symbols to avoid duplications. Existing scripts/kallsyms sorts symbols without .llvm. suffix. However, this causes quite some issues later on. Some users of kallsyms, such as livepatch, have to match symbols exactly; while

[PATCH 4/7] remoteproc: keystone: Use devm_pm_runtime_enable() helper

2024-08-02 Thread Andrew Davis
Use device life-cycle managed runtime enable function to simplify probe and exit paths. Signed-off-by: Andrew Davis --- drivers/remoteproc/keystone_remoteproc.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/remoteproc/keystone_remoteproc.c

[PATCH 2/7] remoteproc: keystone: Use devm_rproc_alloc() helper

2024-08-02 Thread Andrew Davis
Use the device lifecycle managed allocation function. This helps prevent mistakes like freeing out of order in cleanup functions and forgetting to free on error paths. Signed-off-by: Andrew Davis --- drivers/remoteproc/keystone_remoteproc.c | 15 +-- 1 file changed, 5 insertions(+),

[PATCH 3/7] remoteproc: keystone: Use devm action to release reserved memory

2024-08-02 Thread Andrew Davis
This helps prevent mistakes like freeing out of order in cleanup functions and forgetting to free on error paths. Signed-off-by: Andrew Davis --- drivers/remoteproc/keystone_remoteproc.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git

[PATCH 6/7] remoteproc: keystone: Use devm_gpiod_get() helper

2024-08-02 Thread Andrew Davis
Use device life-cycle managed GPIO get function to simplify probe and exit paths. Signed-off-by: Andrew Davis --- drivers/remoteproc/keystone_remoteproc.c | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/remoteproc/keystone_remoteproc.c

[PATCH 7/7] remoteproc: keystone: Use devm_rproc_add() helper

2024-08-02 Thread Andrew Davis
Use the device lifecycle managed add function. This helps prevent mistakes like deleting out of order in cleanup functions and forgetting to delete on error paths. Signed-off-by: Andrew Davis --- drivers/remoteproc/keystone_remoteproc.c | 12 +--- 1 file changed, 1 insertion(+), 11

[PATCH 1/7] remoteproc: keystone: Use devm_kasprintf() to build name string

2024-08-02 Thread Andrew Davis
This is simpler and removes the need to assume the id length to be 1 digit, which then removes a W=1 compile warning about the same. Signed-off-by: Andrew Davis --- drivers/remoteproc/keystone_remoteproc.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git

[PATCH 5/7] remoteproc: keystone: Use devm action to call PM runtime put sync

2024-08-02 Thread Andrew Davis
This helps prevent mistakes like putting out of order in cleanup functions and forgetting to put sync on error paths. Signed-off-by: Andrew Davis --- drivers/remoteproc/keystone_remoteproc.c | 34 1 file changed, 17 insertions(+), 17 deletions(-) diff --git

Re: [PATCH v5 2/2] rust: add tracepoint support

2024-08-02 Thread Benno Lossin
On 02.08.24 11:31, Alice Ryhl wrote: > diff --git a/rust/kernel/tracepoint.rs b/rust/kernel/tracepoint.rs > new file mode 100644 > index ..69dafdb8bfe8 > --- /dev/null > +++ b/rust/kernel/tracepoint.rs > @@ -0,0 +1,49 @@ > +// SPDX-License-Identifier: GPL-2.0 > + > +// Copyright (C)

Re: [PATCH 2/3] kallsyms: Add APIs to match symbol without .llmv. suffix.

2024-08-02 Thread Song Liu
> On Jul 29, 2024, at 5:54 PM, Song Liu wrote: > > With CONFIG_LTO_CLANG=y, the compiler may add suffix to function names > to avoid duplication. This causes confusion with users of kallsyms. > On one hand, users like livepatch are required to match the symbols > exactly. On the other hand,

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-02 Thread Adrian Hunter
On 2/08/24 14:02, Adrian Hunter wrote: > On 2/08/24 12:25, Peter Zijlstra wrote: >> On Thu, Aug 01, 2024 at 02:13:41PM -0700, Andrii Nakryiko wrote: >> >>> Ok, this bisected to: >>> >>> 675ad74989c2 ("perf/core: Add aux_pause, aux_resume, aux_start_paused") >> >> Adrian, there are at least two

Re: [PATCH] rust: add `module_params` macro

2024-08-02 Thread Benno Lossin
On 02.08.24 12:27, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 01.08.24 17:11, Andreas Hindborg wrote: >>> "Benno Lossin" writes: On 01.08.24 15:40, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 01.08.24 13:29, Andreas Hindborg wrote: >>> "Benno Lossin"

Re: [PATCH 2/3] kallsyms: Add APIs to match symbol without .llmv. suffix.

2024-08-02 Thread Song Liu
Hi Petr, > On Aug 2, 2024, at 8:45 AM, Petr Mladek wrote: [...] > > IMHO, it depends on the use case. Let's keep "ping_table/" > as an example. Why people would want to trace this function? > There might be various reasons, for example: > > 1. ping_table.llvm.15394922576589127018 appeared

Re: [PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-08-02 Thread Alexander Duyck
On Fri, Aug 2, 2024 at 3:05 AM Yunsheng Lin wrote: > > On 2024/8/1 23:21, Alexander Duyck wrote: > > On Thu, Aug 1, 2024 at 6:01 AM Yunsheng Lin wrote: > >> > >> On 2024/8/1 2:13, Alexander Duyck wrote: > >>> On Wed, Jul 31, 2024 at 5:50 AM Yunsheng Lin > >>> wrote: > > Currently the

Re: [PATCH 2/3] kallsyms: Add APIs to match symbol without .llmv. suffix.

2024-08-02 Thread Petr Mladek
On Wed 2024-07-31 01:00:34, Song Liu wrote: > Hi Masami, > > > On Jul 30, 2024, at 6:03 AM, Masami Hiramatsu wrote: > > > > On Mon, 29 Jul 2024 17:54:32 -0700 > > Song Liu wrote: > > > >> With CONFIG_LTO_CLANG=y, the compiler may add suffix to function names > >> to avoid duplication. This

[PATCH v11 8/9] arm64: dts: ti: k3-am642-evm: Add M4F remoteproc node

2024-08-02 Thread Andrew Davis
From: Hari Nagalla The AM64x SoCs of the TI K3 family have a Cortex M4F core in the MCU domain. This core can be used by non safety applications as a remote processor. When used as a remote processor with virtio/rpmessage IPC, two carveout reserved memory nodes are needed. The first region is

[PATCH v11 9/9] arm64: defconfig: Enable TI K3 M4 remoteproc driver

2024-08-02 Thread Andrew Davis
From: Hari Nagalla Some K3 platform devices (AM64x, AM62x) have a Cortex M4 core. Build the M4 remote proc driver as a module for these platforms. Signed-off-by: Hari Nagalla Signed-off-by: Andrew Davis --- arch/arm64/configs/defconfig | 1 + 1 file changed, 1 insertion(+) diff --git

[PATCH v11 6/9] arm64: dts: ti: k3-am64: Add M4F remoteproc node

2024-08-02 Thread Andrew Davis
From: Hari Nagalla The AM64x SoCs of the TI K3 family have a Cortex M4F core in the MCU domain. This core can be used by non safety applications as a remote processor. When used as a remote processor with virtio/rpmessage IPC, two carveout reserved memory nodes are needed. Disable by default as

[PATCH v11 5/9] arm64: dts: ti: k3-am625-sk: Add M4F remoteproc node

2024-08-02 Thread Andrew Davis
From: Hari Nagalla The AM62x SoCs of the TI K3 family have a Cortex M4F core in the MCU domain. This core can be used by non safety applications as a remote processor. When used as a remote processor with virtio/rpmessage IPC, two carveout reserved memory nodes are needed. The first region is

[PATCH v11 3/9] remoteproc: k3-m4: Add a remoteproc driver for M4F subsystem

2024-08-02 Thread Andrew Davis
From: Martyn Welch The AM62x and AM64x SoCs of the TI K3 family has a Cortex M4F core in the MCU domain. This core is typically used for safety applications in a stand alone mode. However, some application (non safety related) may want to use the M4F core as a generic remote processor with IPC

[PATCH v11 1/9] dt-bindings: remoteproc: k3-m4f: Add K3 AM64x SoCs

2024-08-02 Thread Andrew Davis
From: Hari Nagalla K3 AM64x SoC has a Cortex M4F subsystem in the MCU voltage domain. The remote processor's life cycle management and IPC mechanisms are similar across the R5F and M4F cores from remote processor driver point of view. However, there are subtle differences in image loading and

[PATCH v11 0/9] TI K3 M4F support on AM62 and AM64 SoCs

2024-08-02 Thread Andrew Davis
Hello all, This is the continuation of the M4F RProc support series from here[0]. I'm helping out with the upstream task for Hari and so versions (v8+) is a little different than the previous(v7-) postings[0]. Most notable change I've introduced being the patches factoring out common support from

[PATCH v11 7/9] arm64: dts: ti: k3-am642-sk: Add M4F remoteproc node

2024-08-02 Thread Andrew Davis
From: Hari Nagalla The AM64x SoCs of the TI K3 family have a Cortex M4F core in the MCU domain. This core can be used by non safety applications as a remote processor. When used as a remote processor with virtio/rpmessage IPC, two carveout reserved memory nodes are needed. The first region is

[PATCH v11 2/9] remoteproc: k3: Factor out TI-SCI processor control OF get function

2024-08-02 Thread Andrew Davis
Building the TSP structure is common for users of the TI-SCI processor control interface. Factor out this function and put it with the rest of the TI-SCI processor control functions. Signed-off-by: Andrew Davis --- drivers/remoteproc/ti_k3_dsp_remoteproc.c | 28 +--

[PATCH v11 4/9] arm64: dts: ti: k3-am62: Add M4F remoteproc node

2024-08-02 Thread Andrew Davis
From: Hari Nagalla The AM62x SoCs of the TI K3 family have a Cortex M4F core in the MCU domain. This core can be used by non safety applications as a remote processor. When used as a remote processor with virtio/rpmessage IPC, two carveout reserved memory nodes are needed. Disable by default as

Re: [PATCH 6/8] perf/uprobe: split uprobe_unregister()

2024-08-02 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 7:41 PM Liao, Chang wrote: > > > > 在 2024/8/1 5:42, Andrii Nakryiko 写道: > > From: Peter Zijlstra > > > > With uprobe_unregister() having grown a synchronize_srcu(), it becomes > > fairly slow to call. Esp. since both users of this API call it in a > > loop. > > > > Peel

Re: [PATCH 2/8] uprobes: revamp uprobe refcounting and lifetime management

2024-08-02 Thread Andrii Nakryiko
On Fri, Aug 2, 2024 at 4:11 AM Jiri Olsa wrote: > > On Wed, Jul 31, 2024 at 02:42:50PM -0700, Andrii Nakryiko wrote: > > SNIP > > > -/* > > - * There could be threads that have already hit the breakpoint. They > > - * will recheck the current insn and restart if find_uprobe() fails. > > - * See

Re: [PATCH 2/8] uprobes: revamp uprobe refcounting and lifetime management

2024-08-02 Thread Andrii Nakryiko
On Fri, Aug 2, 2024 at 1:50 AM Oleg Nesterov wrote: > > On 08/01, Andrii Nakryiko wrote: > > > > > + /* TODO : cant unregister? schedule a worker thread */ > > > + WARN(err, "leaking uprobe due to failed unregistration"); > > > Ok, so now that I added this very loud

[PATCH] kprobes: Fix to check symbol prefixes correctly

2024-08-02 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Since str_has_prefix() takes the prefix as the 2nd argument and the string as the first, is_cfi_preamble_symbol() always fails to check the prefix. Fix the function parameter order so that it correctly check the prefix. Fixes: de02f2ac5d8c ("kprobes: Prohibit

Re: [PATCH v4] x86/paravirt: Disable virt spinlock on bare metal

2024-08-02 Thread Chen Yu
On 2024-08-02 at 16:13:48 +0800, maobibo wrote: > > Hi Chenyu, > On 2024/8/2 下午3:56, Chen Yu wrote: > > On 2024-08-02 at 09:27:32 +0800, maobibo wrote: > > > Hi Chenyu, > > > > > > On 2024/8/1 下午10:40, Chen Yu wrote: > > > > Hi Bibo, > > > > > > > > On 2024-08-01 at 16:00:19 +0800, maobibo

Re: [PATCH vhost 0/7] vdpa/mlx5: Parallelize device suspend/resume

2024-08-02 Thread Michael S. Tsirkin
On Fri, Aug 02, 2024 at 10:20:17AM +0300, Dragos Tatulea wrote: > This series parallelizes the mlx5_vdpa device suspend and resume > operations through the firmware async API. The purpose is to reduce live > migration downtime. > > The series starts with changing the VQ suspend and resume

Re: [PATCH 2/3] kallsyms: Add APIs to match symbol without .llmv. suffix.

2024-08-02 Thread Google
Hi, Sorry for late reply. On Fri, 2 Aug 2024 03:45:42 + Song Liu wrote: > > > > On Aug 1, 2024, at 6:18 PM, Leizhen (ThunderTown) > > wrote: > > > > On 2024/7/31 9:00, Song Liu wrote: > >> Hi Masami, > >> > >>> On Jul 30, 2024, at 6:03 AM, Masami Hiramatsu wrote: > >>> > >>> On

Re: [PATCH v2 1/2] Add prctl to allow userlevel TDX hypercalls

2024-08-02 Thread Kirill A . Shutemov
On Fri, Jul 26, 2024 at 06:58:00PM +, Tim Merrifield wrote: > Add a new process-level prctl option to enable/disable user-level > hypercalls when running in a confidential VM. Add support for > checking this flag on VMCALL #VE for TDX and transfer control to > a hypervisor vendor-specific

Re: [PATCH v5 1/2] rust: add static_key_false

2024-08-02 Thread Alice Ryhl
On Fri, Aug 2, 2024 at 11:40 AM Peter Zijlstra wrote: > > On Fri, Aug 02, 2024 at 09:31:27AM +, Alice Ryhl wrote: > > Add just enough support for static key so that we can use it from > > tracepoints. Tracepoints rely on `static_key_false` even though it is > > deprecated, so we add the same

Re: [PATCH 2/8] uprobes: revamp uprobe refcounting and lifetime management

2024-08-02 Thread Jiri Olsa
On Wed, Jul 31, 2024 at 02:42:50PM -0700, Andrii Nakryiko wrote: SNIP > -/* > - * There could be threads that have already hit the breakpoint. They > - * will recheck the current insn and restart if find_uprobe() fails. > - * See find_active_uprobe(). > - */ > -static void delete_uprobe(struct

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-02 Thread Adrian Hunter
On 2/08/24 12:25, Peter Zijlstra wrote: > On Thu, Aug 01, 2024 at 02:13:41PM -0700, Andrii Nakryiko wrote: > >> Ok, this bisected to: >> >> 675ad74989c2 ("perf/core: Add aux_pause, aux_resume, aux_start_paused") > > Adrian, there are at least two obvious bugs there: > > - aux_action was key's

Re: [PATCH] rust: add `module_params` macro

2024-08-02 Thread Andreas Hindborg
"Benno Lossin" writes: > On 01.08.24 17:11, Andreas Hindborg wrote: >> "Benno Lossin" writes: >>> On 01.08.24 15:40, Andreas Hindborg wrote: "Benno Lossin" writes: > On 01.08.24 13:29, Andreas Hindborg wrote: >> "Benno Lossin" writes: >>> On 05.07.24 13:15, Andreas Hindborg

Re: [PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-08-02 Thread Yunsheng Lin
On 2024/8/1 23:21, Alexander Duyck wrote: > On Thu, Aug 1, 2024 at 6:01 AM Yunsheng Lin wrote: >> >> On 2024/8/1 2:13, Alexander Duyck wrote: >>> On Wed, Jul 31, 2024 at 5:50 AM Yunsheng Lin wrote: Currently the page_frag API is returning 'virtual address' or 'va' when allocing

Re: [PATCH v5 1/2] rust: add static_key_false

2024-08-02 Thread Peter Zijlstra
On Fri, Aug 02, 2024 at 09:31:27AM +, Alice Ryhl wrote: > Add just enough support for static key so that we can use it from > tracepoints. Tracepoints rely on `static_key_false` even though it is > deprecated, so we add the same functionality to Rust. > > It is not possible to use the

[PATCH v5 2/2] rust: add tracepoint support

2024-08-02 Thread Alice Ryhl
Make it possible to have Rust code call into tracepoints defined by C code. It is still required that the tracepoint is declared in a C header, and that this header is included in the input to bindgen. Instead of calling __DO_TRACE directly, the exported rust_do_trace_ function calls an inline

[PATCH v5 1/2] rust: add static_key_false

2024-08-02 Thread Alice Ryhl
Add just enough support for static key so that we can use it from tracepoints. Tracepoints rely on `static_key_false` even though it is deprecated, so we add the same functionality to Rust. It is not possible to use the existing C implementation of arch_static_branch because it passes the

[PATCH v5 0/2] Tracepoints and static branch in Rust

2024-08-02 Thread Alice Ryhl
An important part of a production ready Linux kernel driver is tracepoints. So to write production ready Linux kernel drivers in Rust, we must be able to call tracepoints from Rust code. This patch series adds support for calling tracepoints declared in C from Rust. To use the tracepoint support,

Re: [PATCH] uprobes: Improve scalability by reducing the contention on siglock

2024-08-02 Thread Oleg Nesterov
On 08/02, Liao, Chang wrote: > > > 在 2024/8/1 22:06, Oleg Nesterov 写道: > > On 08/01, Liao Chang wrote: > >> > >> @@ -2276,22 +2277,25 @@ static void handle_singlestep(struct uprobe_task > >> *utask, struct pt_regs *regs) > >>int err = 0; > >> > >>uprobe = utask->active_uprobe; > >> - if

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-02 Thread Peter Zijlstra
On Thu, Aug 01, 2024 at 02:13:41PM -0700, Andrii Nakryiko wrote: > Ok, this bisected to: > > 675ad74989c2 ("perf/core: Add aux_pause, aux_resume, aux_start_paused") Adrian, there are at least two obvious bugs there: - aux_action was key's off of PERF_PMU_CAP_AUX_OUTPUT, which is not right,

Re: [PATCH 2/8] uprobes: revamp uprobe refcounting and lifetime management

2024-08-02 Thread Oleg Nesterov
On 08/01, Andrii Nakryiko wrote: > > > + /* TODO : cant unregister? schedule a worker thread */ > > + WARN(err, "leaking uprobe due to failed unregistration"); > Ok, so now that I added this very loud warning if > register_for_each_vma(uprobe, NULL) returns error, it

Re: [PATCH net-next v4 0/3] ioctl support for AF_VSOCK and virtio-based transports

2024-08-02 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by David S. Miller : On Tue, 30 Jul 2024 21:43:05 +0200 you wrote: > This patch series introduce the support for ioctl(s) in AF_VSOCK. > The only ioctl currently available is SIOCOUTQ, which returns > the number of unsent or unacked

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-02 Thread Peter Zijlstra
On Thu, Aug 01, 2024 at 02:13:41PM -0700, Andrii Nakryiko wrote: > On Thu, Aug 1, 2024 at 11:58 AM Andrii Nakryiko > wrote: > > > > + bpf > > > > On Thu, Aug 1, 2024 at 6:36 AM Peter Zijlstra wrote: > > > > > > On Thu, Aug 01, 2024 at 03:26:38PM +0200, Oleg Nesterov wrote: > > > > (Andrii, I'll

Re: [PATCH v4] x86/paravirt: Disable virt spinlock on bare metal

2024-08-02 Thread maobibo
Hi Chenyu, On 2024/8/2 下午3:56, Chen Yu wrote: On 2024-08-02 at 09:27:32 +0800, maobibo wrote: Hi Chenyu, On 2024/8/1 下午10:40, Chen Yu wrote: Hi Bibo, On 2024-08-01 at 16:00:19 +0800, maobibo wrote: Chenyu, I do not know much about x86, just give some comments(probably incorrected) from

Re: [syzbot] [trace?] linux-next test error: WARNING in rcu_core

2024-08-02 Thread Marco Elver
On Fri, 2 Aug 2024 at 09:58, syzbot wrote: > > Hello, > > syzbot found the following issue on: > > HEAD commit:f524a5e4dfb7 Add linux-next specific files for 20240802 > git tree: linux-next > console output: https://syzkaller.appspot.com/x/log.txt?x=174c896d98 > kernel config:

[PATCH 2/2] arm64: dts: qcom: msm8916-samsung-j3ltetw: Add initial device tree

2024-08-02 Thread Lin, Meng-Bo
The dts and dtsi add support for msm8916 variant of Samsung Galaxy J3 SM-J320YZ smartphone released in 2016. Add a device tree for SM-J320YZ with initial support for: - GPIO keys - SDHCI (internal and external storage) - USB Device Mode - UART (on USB connector via the SM5703 MUIC) - WCNSS

[PATCH 1/2] dt-bindings: qcom: Document samsung,j3ltetw

2024-08-02 Thread Lin, Meng-Bo
Document samsung,j3ltetw bindings used in its device tree. Signed-off-by: "Lin, Meng-Bo" --- Documentation/devicetree/bindings/arm/qcom.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml

[PATCH 0/2] arm64: dts: qcom: msm8916-samsung-j3ltetw: Add initial device tree

2024-08-02 Thread Lin, Meng-Bo
The dts and dtsi add support for msm8916 variant of Samsung Galaxy J3 SM-J320YZ smartphone released in 2016. Add a device tree for SM-J320YZ with initial support for: - GPIO keys - SDHCI (internal and external storage) - USB Device Mode - UART (on USB connector via the SM5703 MUIC) - WCNSS

[syzbot] [trace?] linux-next test error: WARNING in rcu_core

2024-08-02 Thread syzbot
Hello, syzbot found the following issue on: HEAD commit:f524a5e4dfb7 Add linux-next specific files for 20240802 git tree: linux-next console output: https://syzkaller.appspot.com/x/log.txt?x=174c896d98 kernel config: https://syzkaller.appspot.com/x/.config?x=a66a5509e9947c4c

Re: [PATCH v4] x86/paravirt: Disable virt spinlock on bare metal

2024-08-02 Thread Chen Yu
On 2024-08-02 at 09:27:32 +0800, maobibo wrote: > Hi Chenyu, > > On 2024/8/1 下午10:40, Chen Yu wrote: > > Hi Bibo, > > > > On 2024-08-01 at 16:00:19 +0800, maobibo wrote: > > > Chenyu, > > > > > > I do not know much about x86, just give some comments(probably > > > incorrected) > > > from the

[PATCH vhost 7/7] vdpa/mlx5: Keep notifiers during suspend but ignore

2024-08-02 Thread Dragos Tatulea
Unregistering notifiers is a costly operation. Instead of removing the notifiers during device suspend and adding them back at resume, simply ignore the call when the device is suspended. At resume time call queue_link_work() to make sure that the device state is propagated in case there were

[PATCH vhost 6/7] vdpa/mlx5: Parallelize device resume

2024-08-02 Thread Dragos Tatulea
Currently device resume works on vqs serially. Building up on previous changes that converted vq operations to the async api, this patch parallelizes the device resume. For 1 vDPA device x 32 VQs (16 VQPs) attached to a large VM (256 GB RAM, 32 CPUs x 2 threads per core), the device resume time

[PATCH vhost 5/7] vdpa/mlx5: Parallelize device suspend

2024-08-02 Thread Dragos Tatulea
Currently device suspend works on vqs serially. Building up on previous changes that converted vq operations to the async api, this patch parallelizes the device suspend: 1) Suspend all active vqs parallel. 2) Query suspended vqs in parallel. For 1 vDPA device x 32 VQs (16 VQPs) attached to a

[PATCH vhost 4/7] vdpa/mlx5: Use async API for vq modify commands

2024-08-02 Thread Dragos Tatulea
Switch firmware vq modify command to be issued via the async API to allow future parallelization. The new refactored function applies the modify on a range of vqs and waits for their execution to complete. For now the command is still used in a serial fashion. A later patch will switch to

[PATCH vhost 3/7] vdpa/mlx5: Use async API for vq query command

2024-08-02 Thread Dragos Tatulea
Switch firmware vq query command to be issued via the async API to allow future parallelization. exec_virtqueue_async_cmds() is a generic execution function that will be used to issue other async operations as well. Handling of throttled commands is built in. For now the command is still serial

[PATCH vhost 2/7] vdpa/mlx5: Introduce error logging function

2024-08-02 Thread Dragos Tatulea
mlx5_vdpa_err() was missing. This patch adds it and uses it in the necessary places. Signed-off-by: Dragos Tatulea Reviewed-by: Tariq Toukan --- drivers/vdpa/mlx5/core/mlx5_vdpa.h | 5 + drivers/vdpa/mlx5/net/mlx5_vnet.c | 24 2 files changed, 17 insertions(+),

[PATCH vhost 0/7] vdpa/mlx5: Parallelize device suspend/resume

2024-08-02 Thread Dragos Tatulea
This series parallelizes the mlx5_vdpa device suspend and resume operations through the firmware async API. The purpose is to reduce live migration downtime. The series starts with changing the VQ suspend and resume commands to the async API. After that, the switch is made to issue multiple

Re: [PATCH 2/3] kallsyms: Add APIs to match symbol without .llmv. suffix.

2024-08-02 Thread Leizhen (ThunderTown)
On 2024/8/2 11:45, Song Liu wrote: > > >> On Aug 1, 2024, at 6:18 PM, Leizhen (ThunderTown) >> wrote: >> >> On 2024/7/31 9:00, Song Liu wrote: >>> Hi Masami, >>> On Jul 30, 2024, at 6:03 AM, Masami Hiramatsu wrote: On Mon, 29 Jul 2024 17:54:32 -0700 Song Liu wrote:

Re: [RFC PATCH vhost] vhost-vdpa: Fix invalid irq bypass unregister

2024-08-02 Thread Dragos Tatulea
On Fri, 2024-08-02 at 11:29 +0800, Jason Wang wrote: > On Thu, Aug 1, 2024 at 11:38 PM Dragos Tatulea wrote: > > > > The following workflow triggers the crash referenced below: > > > > 1) vhost_vdpa_unsetup_vq_irq() unregisters the irq bypass producer > >but the producer->token is still

RE: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off for i.MX7ULP

2024-08-01 Thread Peng Fan
> Subject: Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system off > for i.MX7ULP > > On Tue, Jul 30, 2024 at 08:06:22AM +, Peng Fan wrote: > > > Subject: Re: [PATCH v2 2/2] remoteproc: imx_rproc: handle system > off > > > for i.MX7ULP > > > > > > On Fri, Jul 19, 2024 at 04:49:04PM +0800,

Re: [PATCH 2/3] kallsyms: Add APIs to match symbol without .llmv. suffix.

2024-08-01 Thread Song Liu
> On Aug 1, 2024, at 6:18 PM, Leizhen (ThunderTown) > wrote: > > On 2024/7/31 9:00, Song Liu wrote: >> Hi Masami, >> >>> On Jul 30, 2024, at 6:03 AM, Masami Hiramatsu wrote: >>> >>> On Mon, 29 Jul 2024 17:54:32 -0700 >>> Song Liu wrote: >>> With CONFIG_LTO_CLANG=y, the compiler may

Re: [RFC PATCH vhost] vhost-vdpa: Fix invalid irq bypass unregister

2024-08-01 Thread Jason Wang
On Thu, Aug 1, 2024 at 11:38 PM Dragos Tatulea wrote: > > The following workflow triggers the crash referenced below: > > 1) vhost_vdpa_unsetup_vq_irq() unregisters the irq bypass producer >but the producer->token is still valid. > 2) vq context gets released and reassigned to another vq.

Re: [PATCH V4 net-next 3/3] virtio-net: synchronize operstate with admin state on up/down

2024-08-01 Thread Jason Wang
On Thu, Aug 1, 2024 at 3:00 PM Michael S. Tsirkin wrote: > > On Thu, Aug 01, 2024 at 02:55:10PM +0800, Jason Wang wrote: > > On Thu, Aug 1, 2024 at 2:42 PM Michael S. Tsirkin wrote: > > > > > > On Thu, Aug 01, 2024 at 02:13:18PM +0800, Jason Wang wrote: > > > > On Thu, Aug 1, 2024 at 1:58 PM

Re: [PATCH 6/8] perf/uprobe: split uprobe_unregister()

2024-08-01 Thread Liao, Chang
在 2024/8/1 5:42, Andrii Nakryiko 写道: > From: Peter Zijlstra > > With uprobe_unregister() having grown a synchronize_srcu(), it becomes > fairly slow to call. Esp. since both users of this API call it in a > loop. > > Peel off the sync_srcu() and do it once, after the loop. > > With recent

Re: [PATCH] uprobes: Improve scalability by reducing the contention on siglock

2024-08-01 Thread Liao, Chang
在 2024/8/1 22:06, Oleg Nesterov 写道: > On 08/01, Liao Chang wrote: >> >> @@ -2276,22 +2277,25 @@ static void handle_singlestep(struct uprobe_task >> *utask, struct pt_regs *regs) >> int err = 0; >> >> uprobe = utask->active_uprobe; >> -if (utask->state == UTASK_SSTEP_ACK) >> +

Re: [PATCH 3/8] uprobes: protected uprobe lifetime with SRCU

2024-08-01 Thread Liao, Chang
在 2024/8/2 0:49, Andrii Nakryiko 写道: > On Thu, Aug 1, 2024 at 5:23 AM Liao, Chang wrote: >> >> >> >> 在 2024/8/1 5:42, Andrii Nakryiko 写道: >>> To avoid unnecessarily taking a (brief) refcount on uprobe during >>> breakpoint handling in handle_swbp for entry uprobes, make find_uprobe() >>> not

Re: [PATCH v4] x86/paravirt: Disable virt spinlock on bare metal

2024-08-01 Thread maobibo
Hi Chenyu, On 2024/8/1 下午10:40, Chen Yu wrote: Hi Bibo, On 2024-08-01 at 16:00:19 +0800, maobibo wrote: Chenyu, I do not know much about x86, just give some comments(probably incorrected) from the code. On 2024/7/29 下午2:52, Chen Yu wrote: X86_FEATURE_HYPERVISOR YYY N

Re: [PATCH 2/3] kallsyms: Add APIs to match symbol without .llmv. suffix.

2024-08-01 Thread Leizhen (ThunderTown)
On 2024/7/31 9:00, Song Liu wrote: > Hi Masami, > >> On Jul 30, 2024, at 6:03 AM, Masami Hiramatsu wrote: >> >> On Mon, 29 Jul 2024 17:54:32 -0700 >> Song Liu wrote: >> >>> With CONFIG_LTO_CLANG=y, the compiler may add suffix to function names >>> to avoid duplication. This causes confusion

Re: [PATCH 2/8] uprobes: revamp uprobe refcounting and lifetime management

2024-08-01 Thread Andrii Nakryiko
On Wed, Jul 31, 2024 at 2:43 PM Andrii Nakryiko wrote: > > Revamp how struct uprobe is refcounted, and thus how its lifetime is > managed. > > Right now, there are a few possible "owners" of uprobe refcount: > - uprobes_tree RB tree assumes one refcount when uprobe is registered > and added

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-01 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 11:58 AM Andrii Nakryiko wrote: > > + bpf > > On Thu, Aug 1, 2024 at 6:36 AM Peter Zijlstra wrote: > > > > On Thu, Aug 01, 2024 at 03:26:38PM +0200, Oleg Nesterov wrote: > > > (Andrii, I'll try to look at your new series on Weekend). > > > > OK, I dropped all your previous

Re: [PATCH 00/15] Implement MODVERSIONS for Rust

2024-08-01 Thread Sami Tolvanen
Hi Petr, On Thu, Aug 1, 2024 at 4:22 AM Petr Pavlu wrote: > > STG is an interesting tool. I've played with it a bit last year. To be > frank, I was surprised to see a new tool being proposed by Google to > generate modversion CRCs from DWARF instead of potentially extending > your STG project

Re: [PATCH] rust: add `module_params` macro

2024-08-01 Thread Benno Lossin
On 01.08.24 17:11, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 01.08.24 15:40, Andreas Hindborg wrote: >>> "Benno Lossin" writes: On 01.08.24 13:29, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 05.07.24 13:15, Andreas Hindborg wrote: >>> + >>> +///

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-01 Thread Andrii Nakryiko
+ bpf On Thu, Aug 1, 2024 at 6:36 AM Peter Zijlstra wrote: > > On Thu, Aug 01, 2024 at 03:26:38PM +0200, Oleg Nesterov wrote: > > (Andrii, I'll try to look at your new series on Weekend). > > OK, I dropped all your previous patches and stuffed these in. > > They should all be visible in

Re: [PATCH v4 1/2] rust: add static_key_false

2024-08-01 Thread Alice Ryhl
On Thu, Aug 1, 2024 at 12:28 PM Peter Zijlstra wrote: > > On Wed, Jul 31, 2024 at 11:34:13PM +0200, Alice Ryhl wrote: > > > > Please work harder to not have to duplicate stuff like this. > > > > I really didn't want to duplicate it, but it's very hard to find a > > performant alternative. Is

Re: [PATCH 8/8] uprobes: switch to RCU Tasks Trace flavor for better performance

2024-08-01 Thread Paul E. McKenney
On Thu, Aug 01, 2024 at 11:35:05AM +0200, Peter Zijlstra wrote: > On Wed, Jul 31, 2024 at 02:42:56PM -0700, Andrii Nakryiko wrote: > > This patch switches uprobes SRCU usage to RCU Tasks Trace flavor, which > > is optimized for more lightweight and quick readers (at the expense of > > slower

[ANNOUNCE] 5.10.222-rt114

2024-08-01 Thread Luis Claudio R. Goncalves
Hello RT-list! I'm pleased to announce the 5.10.222-rt114 stable release. This release is just an update to the new stable 5.10.222 version and no RT specific changes have been made. You can get this release via the git tree at:

Re: [PATCH 5/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-01 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 7:27 AM Jiri Olsa wrote: > > On Wed, Jul 31, 2024 at 02:42:53PM -0700, Andrii Nakryiko wrote: > > SNIP > > > static int __copy_insn(struct address_space *mapping, struct file *filp, > > void *insn, int nbytes, loff_t offset) > > { > > @@ -924,7

Re: [PATCH 3/8] uprobes: protected uprobe lifetime with SRCU

2024-08-01 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 5:23 AM Liao, Chang wrote: > > > > 在 2024/8/1 5:42, Andrii Nakryiko 写道: > > To avoid unnecessarily taking a (brief) refcount on uprobe during > > breakpoint handling in handle_swbp for entry uprobes, make find_uprobe() > > not take refcount, but protect the lifetime of a

Re: [PATCH 2/8] uprobes: revamp uprobe refcounting and lifetime management

2024-08-01 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 4:09 AM Jiri Olsa wrote: > > On Wed, Jul 31, 2024 at 02:42:50PM -0700, Andrii Nakryiko wrote: > > SNIP > > > static void put_uprobe(struct uprobe *uprobe) > > { > > - if (refcount_dec_and_test(>ref)) { > > - /* > > - * If application

Re: [PATCH 8/8] uprobes: switch to RCU Tasks Trace flavor for better performance

2024-08-01 Thread Andrii Nakryiko
On Thu, Aug 1, 2024 at 2:35 AM Peter Zijlstra wrote: > > On Wed, Jul 31, 2024 at 02:42:56PM -0700, Andrii Nakryiko wrote: > > This patch switches uprobes SRCU usage to RCU Tasks Trace flavor, which > > is optimized for more lightweight and quick readers (at the expense of > > slower writers,

Re: [PATCH net-next v4 0/3] ioctl support for AF_VSOCK and virtio-based transports

2024-08-01 Thread Cong Wang
On Tue, Jul 30, 2024 at 09:43:05PM +0200, Luigi Leonardi via B4 Relay wrote: > This patch series introduce the support for ioctl(s) in AF_VSOCK. > The only ioctl currently available is SIOCOUTQ, which returns > the number of unsent or unacked packets. It is available for > SOCK_STREAM,

[RFC PATCH vhost] vhost-vdpa: Fix invalid irq bypass unregister

2024-08-01 Thread Dragos Tatulea
The following workflow triggers the crash referenced below: 1) vhost_vdpa_unsetup_vq_irq() unregisters the irq bypass producer but the producer->token is still valid. 2) vq context gets released and reassigned to another vq. 3) That other vq registers it's producer with the same vq context

Re: [PATCH net-next v12 04/14] mm: page_frag: add '_va' suffix to page_frag API

2024-08-01 Thread Alexander Duyck
On Thu, Aug 1, 2024 at 6:01 AM Yunsheng Lin wrote: > > On 2024/8/1 2:13, Alexander Duyck wrote: > > On Wed, Jul 31, 2024 at 5:50 AM Yunsheng Lin wrote: > >> > >> Currently the page_frag API is returning 'virtual address' > >> or 'va' when allocing and expecting 'virtual address' or > >> 'va' as

Re: [PATCH] rust: add `module_params` macro

2024-08-01 Thread Andreas Hindborg
"Benno Lossin" writes: > On 01.08.24 15:40, Andreas Hindborg wrote: >> "Benno Lossin" writes: >>> On 01.08.24 13:29, Andreas Hindborg wrote: "Benno Lossin" writes: > On 05.07.24 13:15, Andreas Hindborg wrote: >> + >> +/// Types that can be used for module parameters. >>

Re: [PATCH v4] x86/paravirt: Disable virt spinlock on bare metal

2024-08-01 Thread Chen Yu
Hi Bibo, On 2024-08-01 at 16:00:19 +0800, maobibo wrote: > Chenyu, > > I do not know much about x86, just give some comments(probably incorrected) > from the code. > > On 2024/7/29 下午2:52, Chen Yu wrote: > > X86_FEATURE_HYPERVISOR YYY N > > CONFIG_PARAVIRT_SPINLOCKS Y

Re: [PATCH 5/8] uprobes: travers uprobe's consumer list locklessly under SRCU protection

2024-08-01 Thread Jiri Olsa
On Wed, Jul 31, 2024 at 02:42:53PM -0700, Andrii Nakryiko wrote: SNIP > static int __copy_insn(struct address_space *mapping, struct file *filp, > void *insn, int nbytes, loff_t offset) > { > @@ -924,7 +901,8 @@ static bool filter_chain(struct uprobe *uprobe, struct >

Re: [PATCH] rust: add `module_params` macro

2024-08-01 Thread Benno Lossin
On 01.08.24 15:40, Andreas Hindborg wrote: > "Benno Lossin" writes: >> On 01.08.24 13:29, Andreas Hindborg wrote: >>> "Benno Lossin" writes: On 05.07.24 13:15, Andreas Hindborg wrote: > + > +/// Types that can be used for module parameters. > +/// > +/// Note that displaying

Re: [PATCH] uprobes: Improve scalability by reducing the contention on siglock

2024-08-01 Thread Oleg Nesterov
On 08/01, Liao Chang wrote: > > @@ -2276,22 +2277,25 @@ static void handle_singlestep(struct uprobe_task > *utask, struct pt_regs *regs) > int err = 0; > > uprobe = utask->active_uprobe; > - if (utask->state == UTASK_SSTEP_ACK) > + switch (utask->state) { > + case

Re: [PATCH] rust: add `module_params` macro

2024-08-01 Thread Andreas Hindborg
"Benno Lossin" writes: > On 01.08.24 13:29, Andreas Hindborg wrote: >> >> Hi Benno, >> >> Thanks for the comments! >> >> "Benno Lossin" writes: >> >>> On 05.07.24 13:15, Andreas Hindborg wrote: >> >> [...] >> + +/// Types that can be used for module parameters. +///

Re: [PATCH v4 0/9] uprobes: misc cleanups/simplifications

2024-08-01 Thread Peter Zijlstra
On Thu, Aug 01, 2024 at 03:26:38PM +0200, Oleg Nesterov wrote: > (Andrii, I'll try to look at your new series on Weekend). OK, I dropped all your previous patches and stuffed these in. They should all be visible in queue/perf/core, and provided the robot doesn't scream, I'll push them into

[PATCH v4 9/9] uprobes: shift put_uprobe() from delete_uprobe() to uprobe_unregister()

2024-08-01 Thread Oleg Nesterov
Kill the extra get_uprobe() + put_uprobe() in uprobe_unregister() and move the possibly final put_uprobe() from delete_uprobe() to its only caller, uprobe_unregister(). Signed-off-by: Oleg Nesterov Acked-by: Andrii Nakryiko Acked-by: Masami Hiramatsu (Google) Reviewed-by: Jiri Olsa ---

  1   2   3   4   5   6   7   8   9   10   >