Re: [PATCH v2 1/2] hugetlbfs: support tracepoint

2024-07-03 Thread Matthew Wilcox
On Thu, Jul 04, 2024 at 11:07:03AM +0800, Hongbo Li wrote: > + TP_printk("dev = (%d,%d), ino = %lu, dir = %lu, mode = 0%o", > + MAJOR(__entry->dev), MINOR(__entry->dev), > + (unsigned long) __entry->ino, > + (unsigned long) __entry->dir, __entry->mode)

[PATCH v2 2/2] hugetlbfs: use tracepoints in hugetlbfs functions.

2024-07-03 Thread Hongbo Li
Here we use the hugetlbfs tracepoint to track the call stack. And the output in trace is as follows: ``` touch-5250[002] . 123.557640: hugetlbfs_alloc_inode: dev = (0,49), ino = 29897, dir = 24079, mode = 0100644 touch-5250[002] . 123.557650: hugetlbfs_setattr: dev = (0,49),

[PATCH v2 0/2] Introduce tracepoint for hugetlbfs

2024-07-03 Thread Hongbo Li
Here we add some basic tracepoints for debugging hugetlbfs: {alloc, free, evict}_inode, setattr and fallocate. v1 can be found at: https://lore.kernel.org/linux-mm/20240701194906.3a9b6...@gandalf.local.home/T/ Changes since v1: - Decrease the parameters for setattr tracer suggested by Steve

[PATCH v2 1/2] hugetlbfs: support tracepoint

2024-07-03 Thread Hongbo Li
Add basic tracepoints for {alloc, evict, free}_inode, setattr and fallocate. These can help users to debug hugetlbfs more conveniently. Signed-off-by: Hongbo Li --- MAINTAINERS | 1 + include/trace/events/hugetlbfs.h | 160 +++ 2 files changed,

Re: [PATCH] tracing/net_sched: NULL pointer dereference in perf_trace_qdisc_reset()

2024-07-03 Thread Jakub Kicinski
On Wed, 3 Jul 2024 03:01:47 +0900 Yunseong Kim wrote: > Support backports for stable version. There are two places where null > deref could happen before > commit 2c92ca849fcc ("tracing/treewide: Remove second parameter of > __assign_str()") > Link: >

Re: [PATCH v2 3/6] tools: Make pkg-config dependency checks usable by other tools

2024-07-03 Thread Namhyung Kim
On Wed, Jul 3, 2024 at 4:05 PM Steven Rostedt wrote: > > On Wed, 3 Jul 2024 14:33:21 -0700 > Namhyung Kim wrote: > > > On Wed, Jul 03, 2024 at 03:36:17PM -0400, Steven Rostedt wrote: > > > On Tue, 2 Jul 2024 16:40:46 -0700 > > > Namhyung Kim wrote: > > > > > > > +CC Steve and linux-trace-kernel

Re: [PATCH 0/2] Support userspace hypercalls for TDX

2024-07-03 Thread Dave Hansen
On 7/3/24 16:35, Tim Merrifield wrote: > VMCALL and VMMCALL instructions are used by x86 guests to request services > from the host VMM. Both VMCALL and VMMCALL are not restricted to CPL 0. > This allows userspace software like open-vm-tools to communicate directly > with the VMM. Could we please

[PATCH 2/2] x86/vmware: VMware support for TDX userspace hypercalls

2024-07-03 Thread Tim Merrifield
This change adds a handler for tdx_hcall in the x86_hyper_runtime type for VMware hypervisors which will ultimately invoke __tdx_hypercall. The handler (vmware_tdx_user_hcall) does not reuse the existing vmware_tdx_hypercall for a couple of reasons. First, while the few hypercalls that are

[PATCH 1/2] x86/tdx: Add prctl to allow userlevel TDX hypercalls

2024-07-03 Thread Tim Merrifield
Add a new 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 handler. Signed-off-by: Tim Merrifield --- arch/x86/coco/tdx/tdx.c| 18

[PATCH 0/2] Support userspace hypercalls for TDX

2024-07-03 Thread Tim Merrifield
VMCALL and VMMCALL instructions are used by x86 guests to request services from the host VMM. Both VMCALL and VMMCALL are not restricted to CPL 0. This allows userspace software like open-vm-tools to communicate directly with the VMM. In the context of confidential VMs, direct communication with

Re: [PATCH v3] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 3:39 PM Josh Poimboeuf wrote: > > On Tue, Jul 02, 2024 at 09:02:03PM -0700, Andrii Nakryiko wrote: > > @@ -2833,6 +2858,18 @@ perf_callchain_user32(struct pt_regs *regs, struct > > perf_callchain_entry_ctx *ent > > > > fp = compat_ptr(ss_base + regs->bp); > >

Re: [PATCH v2 3/6] tools: Make pkg-config dependency checks usable by other tools

2024-07-03 Thread Steven Rostedt
On Wed, 3 Jul 2024 14:33:21 -0700 Namhyung Kim wrote: > On Wed, Jul 03, 2024 at 03:36:17PM -0400, Steven Rostedt wrote: > > On Tue, 2 Jul 2024 16:40:46 -0700 > > Namhyung Kim wrote: > > > > > +CC Steve and linux-trace-kernel list. > > > > There doesn't seem to be a cover page, and it

Re: [PATCH v2] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 3:41 PM Josh Poimboeuf wrote: > > On Wed, Jul 03, 2024 at 01:23:39PM -0700, Andrii Nakryiko wrote: > > > > [0] > > > > https://docs.google.com/presentation/d/1k10-HtK7pP5CMMa86dDCdLW55fHOut4co3Zs5akk0t4 > > > > > > I don't seem to have permission to open it. > > > > > > >

Re: [PATCH v2] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-03 Thread Josh Poimboeuf
On Wed, Jul 03, 2024 at 01:23:39PM -0700, Andrii Nakryiko wrote: > > > [0] > > > https://docs.google.com/presentation/d/1k10-HtK7pP5CMMa86dDCdLW55fHOut4co3Zs5akk0t4 > > > > I don't seem to have permission to open it. > > > > Argh, sorry, it's under my corporate account which doesn't allow >

Re: [PATCH v3] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-03 Thread Josh Poimboeuf
On Tue, Jul 02, 2024 at 09:02:03PM -0700, Andrii Nakryiko wrote: > @@ -2833,6 +2858,18 @@ perf_callchain_user32(struct pt_regs *regs, struct > perf_callchain_entry_ctx *ent > > fp = compat_ptr(ss_base + regs->bp); > pagefault_disable(); > + > +#ifdef CONFIG_UPROBES > + /* see

Re: [PATCH v23 3/5] tracing: Allow user-space mapping of the ring-buffer

2024-07-03 Thread Beau Belgrave
On Tue, Jul 02, 2024 at 12:51:26PM -0400, Steven Rostedt wrote: > On Tue, 2 Jul 2024 11:32:53 -0400 > Mathieu Desnoyers wrote: > > > If we use '*' for user events already, perhaps we'd want to consider > > using the same range for the ring buffer ioctls ? Arguably one is > > about

Re: [PATCH v2 00/12] uprobes: add batched register/unregister APIs and per-CPU RW semaphore

2024-07-03 Thread Paul E. McKenney
On Wed, Jul 03, 2024 at 05:57:54PM -0400, Steven Rostedt wrote: > On Wed, 3 Jul 2024 09:50:57 +0200 > Peter Zijlstra wrote: > > > > However, in the past, the memory-barrier and array-indexing overhead > > > of SRCU has made it a no-go for lightweight probes into fastpath code. > > > And these

Re: [PATCH v2 00/12] uprobes: add batched register/unregister APIs and per-CPU RW semaphore

2024-07-03 Thread Steven Rostedt
On Wed, 3 Jul 2024 09:50:57 +0200 Peter Zijlstra wrote: > > However, in the past, the memory-barrier and array-indexing overhead > > of SRCU has made it a no-go for lightweight probes into fastpath code. > > And these cases were what motivated RCU Tasks Trace (as opposed to RCU > > Tasks Rude).

Re: [PATCH v2 01/12] uprobes: update outdated comment

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 4:40 AM Oleg Nesterov wrote: > > Sorry for the late reply. I'll try to read this version/discussion > when I have time... yes, I have already promised this before, sorry :/ > No worries, there will be v3 next week (I'm going on short PTO starting tomorrow). So you still

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 10:13 AM Jiri Olsa wrote: > > On Tue, Jul 02, 2024 at 01:51:28PM -0700, Andrii Nakryiko wrote: > > SNIP > > > > #ifdef CONFIG_UPROBES > > > @@ -80,6 +83,12 @@ struct uprobe_task { > > > unsigned intdepth; > > > }; > > > > > > +struct

Re: [PATCH v2 02/12] uprobes: correct mmap_sem locking assumptions in uprobe_write_opcode()

2024-07-03 Thread Google
On Wed, 3 Jul 2024 11:25:35 -0700 Andrii Nakryiko wrote: > On Wed, Jul 3, 2024 at 6:15 AM Masami Hiramatsu wrote: > > > > On Mon, 1 Jul 2024 15:39:25 -0700 > > Andrii Nakryiko wrote: > > > > > It seems like uprobe_write_opcode() doesn't require writer locked > > > mmap_sem, any lock (reader

Re: [PATCH v2] ring-buffer: Limit time with disabled interrupts in rb_check_pages()

2024-07-03 Thread Steven Rostedt
On Wed, 3 Jul 2024 09:53:14 +0200 Petr Pavlu wrote: > The function rb_check_pages() validates the integrity of a specified > per-CPU tracing ring buffer. It does so by traversing the underlying > linked list and checking its next and prev links. > > To guarantee that the list isn't modified

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 9:09 AM Jiri Olsa wrote: > > On Tue, Jul 02, 2024 at 05:13:38PM -0700, Andrii Nakryiko wrote: > > On Tue, Jul 2, 2024 at 4:55 PM Masami Hiramatsu wrote: > > > > > > Hi Jiri, > > > > > > On Mon, 1 Jul 2024 18:41:07 +0200 > > > Jiri Olsa wrote: > > > > > > > Adding support

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 8:31 AM Jiri Olsa wrote: > > On Tue, Jul 02, 2024 at 01:52:38PM -0700, Andrii Nakryiko wrote: > > On Tue, Jul 2, 2024 at 9:11 AM Jiri Olsa wrote: > > > > > > On Tue, Jul 02, 2024 at 03:04:08PM +0200, Peter Zijlstra wrote: > > > > On Mon, Jul 01, 2024 at 06:41:07PM +0200,

Re: [PATCH v2 3/6] tools: Make pkg-config dependency checks usable by other tools

2024-07-03 Thread Namhyung Kim
On Wed, Jul 03, 2024 at 03:36:17PM -0400, Steven Rostedt wrote: > On Tue, 2 Jul 2024 16:40:46 -0700 > Namhyung Kim wrote: > > > +CC Steve and linux-trace-kernel list. > > There doesn't seem to be a cover page, and it doesn't apply on > v6.10-rc6 nor on tip. Oh, sorry. You can find the whole

Re: [PATCH v2 00/12] uprobes: add batched register/unregister APIs and per-CPU RW semaphore

2024-07-03 Thread Andrii Nakryiko
On Mon, Jul 1, 2024 at 3:39 PM Andrii Nakryiko wrote: > > This patch set, ultimately, switches global uprobes_treelock from RW spinlock > to per-CPU RW semaphore, which has better performance and scales better under > contention and multiple parallel threads triggering lots of uprobes. > > To

Re: [PATCH v2 00/12] uprobes: add batched register/unregister APIs and per-CPU RW semaphore

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 1:07 AM Peter Zijlstra wrote: > > On Tue, Jul 02, 2024 at 09:47:41PM -0700, Andrii Nakryiko wrote: > > > > As you noted, that percpu-rwsem write side is quite insane. And you're > > > creating this batch complexity to mitigate that. > > > > > > Note that batch API is needed

Re: [PATCH v2 04/12] uprobes: revamp uprobe refcounting and lifetime management

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 6:36 AM Peter Zijlstra wrote: > > On Mon, Jul 01, 2024 at 03:39:27PM -0700, Andrii Nakryiko wrote: > > > One, attempted initially, way to solve this is through using > > atomic_inc_not_zero() approach, turning get_uprobe() into > > try_get_uprobe(), > > This is the

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-03 Thread Kees Cook
On Wed, Jul 03, 2024 at 11:31:11AM -0700, Andrii Nakryiko wrote: > On Wed, Jul 3, 2024 at 1:10 AM Peter Zijlstra wrote: > > > > On Tue, Jul 02, 2024 at 01:51:28PM -0700, Andrii Nakryiko wrote: > > > > +static size_t ri_size(int sessions_cnt) > > > > +{ > > > > + struct return_instance *ri

Re: [PATCH v2] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-03 Thread Andrii Nakryiko
On Tue, Jul 2, 2024 at 11:11 PM Josh Poimboeuf wrote: > > On Tue, Jul 02, 2024 at 08:35:08PM -0700, Andrii Nakryiko wrote: > > On Tue, Jul 2, 2024 at 6:11 PM Josh Poimboeuf wrote: > > > On Tue, Jul 02, 2024 at 05:06:14PM -0700, Andrii Nakryiko wrote: > > > > In general, even with false

Re: [PATCH v2 3/6] tools: Make pkg-config dependency checks usable by other tools

2024-07-03 Thread Steven Rostedt
On Tue, 2 Jul 2024 16:40:46 -0700 Namhyung Kim wrote: > +CC Steve and linux-trace-kernel list. There doesn't seem to be a cover page, and it doesn't apply on v6.10-rc6 nor on tip. -- Steve

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 1:10 AM Peter Zijlstra wrote: > > On Tue, Jul 02, 2024 at 01:51:28PM -0700, Andrii Nakryiko wrote: > > > +static size_t ri_size(int sessions_cnt) > > > +{ > > > + struct return_instance *ri __maybe_unused; > > > + > > > + return sizeof(*ri) + sessions_cnt *

Re: [PATCH v2 02/12] uprobes: correct mmap_sem locking assumptions in uprobe_write_opcode()

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 6:15 AM Masami Hiramatsu wrote: > > On Mon, 1 Jul 2024 15:39:25 -0700 > Andrii Nakryiko wrote: > > > It seems like uprobe_write_opcode() doesn't require writer locked > > mmap_sem, any lock (reader or writer) should be sufficient. This was > > established in a discussion

Re: [PATCH v2 01/12] uprobes: update outdated comment

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 4:40 AM Oleg Nesterov wrote: > > Sorry for the late reply. I'll try to read this version/discussion > when I have time... yes, I have already promised this before, sorry :/ > > On 07/01, Andrii Nakryiko wrote: > > > > There is no task_struct passed into

Re: [PATCH v2 05/12] uprobes: move offset and ref_ctr_offset into uprobe_consumer

2024-07-03 Thread Andrii Nakryiko
On Wed, Jul 3, 2024 at 3:13 AM Masami Hiramatsu wrote: > > On Wed, 3 Jul 2024 10:13:15 +0200 > Peter Zijlstra wrote: > > > On Mon, Jul 01, 2024 at 03:39:28PM -0700, Andrii Nakryiko wrote: > > > Simplify uprobe registration/unregistration interfaces by making offset > > > and ref_ctr_offset part

Re: [PATCHv2 bpf-next 9/9] selftests/bpf: Add uprobe session consumers test

2024-07-03 Thread Jiri Olsa
On Tue, Jul 02, 2024 at 03:10:55PM -0700, Andrii Nakryiko wrote: > On Mon, Jul 1, 2024 at 9:44 AM Jiri Olsa wrote: > > > > Adding test that attached/detaches multiple consumers on > > single uprobe and verifies all were hit as expected. > > > > Signed-off-by: Jiri Olsa > > --- > >

Re: [PATCHv2 bpf-next 8/9] selftests/bpf: Add uprobe session recursive test

2024-07-03 Thread Jiri Olsa
On Tue, Jul 02, 2024 at 03:01:35PM -0700, Andrii Nakryiko wrote: > On Mon, Jul 1, 2024 at 9:43 AM Jiri Olsa wrote: > > > > Adding uprobe session test that verifies the cookie value is stored > > properly when single uprobe-ed function is executed recursively. > > > > Signed-off-by: Jiri Olsa > >

Re: [PATCHv2 bpf-next 5/9] libbpf: Add uprobe session attach type names to attach_type_name

2024-07-03 Thread Jiri Olsa
On Tue, Jul 02, 2024 at 02:56:34PM -0700, Andrii Nakryiko wrote: > On Mon, Jul 1, 2024 at 9:43 AM Jiri Olsa wrote: > > > > Adding uprobe session attach type name to attach_type_name, > > so libbpf_bpf_attach_type_str returns proper string name for > > BPF_TRACE_UPROBE_SESSION attach type. > > > >

Re: [PATCH v2] remoteproc: k3-dsp: Fix log levels where appropriate

2024-07-03 Thread Andrew Davis
On 6/26/24 2:14 PM, Garrett Giordano wrote: Driver was logging information as errors. Changed dev_err to dev_dbg where appropriate. Signed-off-by: Garrett Giordano --- Acked-by: Andrew Davis -v2 - Change from dev_info to dev_dbg - Drop k3-r5 PATCH ---

Re: [PATCHv2 bpf-next 4/9] libbpf: Add support for uprobe multi session attach

2024-07-03 Thread Jiri Olsa
On Tue, Jul 02, 2024 at 02:34:34PM -0700, Andrii Nakryiko wrote: > On Mon, Jul 1, 2024 at 9:42 AM Jiri Olsa wrote: > > > > Adding support to attach program in uprobe session mode > > with bpf_program__attach_uprobe_multi function. > > > > Adding session bool to bpf_uprobe_multi_opts struct that

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-03 Thread Jiri Olsa
On Tue, Jul 02, 2024 at 01:51:28PM -0700, Andrii Nakryiko wrote: SNIP > > #ifdef CONFIG_UPROBES > > @@ -80,6 +83,12 @@ struct uprobe_task { > > unsigned intdepth; > > }; > > > > +struct session_consumer { > > + __u64 cookie; > > + unsigned int

Re: [PATCH v2] net: missing check virtio

2024-07-03 Thread Michael S. Tsirkin
On Thu, Jun 13, 2024 at 12:54:48PM +0300, Denis Arefev wrote: > Two missing check in virtio_net_hdr_to_skb() allowed syzbot > to crash kernels again > > 1. After the skb_segment function the buffer may become non-linear > (nr_frags != 0), but since the SKBTX_SHARED_FRAG flag is not set anywhere >

Re: [PATCH vhost v2 19/24] vdpa/mlx5: Forward error in suspend/resume device

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 12:28 PM Dragos Tatulea wrote: > > Start using the suspend/resume_vq() error return codes previously added. > > Reviewed-by: Cosmin Ratiu > Reviewed-by: Zhu Yanjun > Signed-off-by: Dragos Tatulea Reviewed-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c |

Re: [PATCH vhost v2 16/24] vdpa/mlx5: Accept Init -> Ready VQ transition in resume_vq()

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 12:28 PM Dragos Tatulea wrote: > > Until now resume_vq() was used only for the suspend/resume scenario. > This change also allows calling resume_vq() to bring it from Init to > Ready state (VQ initialization). > > Signed-off-by: Dragos Tatulea > Reviewed-by: Cosmin Ratiu

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-03 Thread Jiri Olsa
On Wed, Jul 03, 2024 at 05:31:32PM +0200, Jiri Olsa wrote: > On Tue, Jul 02, 2024 at 01:52:38PM -0700, Andrii Nakryiko wrote: > > On Tue, Jul 2, 2024 at 9:11 AM Jiri Olsa wrote: > > > > > > On Tue, Jul 02, 2024 at 03:04:08PM +0200, Peter Zijlstra wrote: > > > > On Mon, Jul 01, 2024 at 06:41:07PM

Re: [PATCH vhost v2 15/24] vdpa/mlx5: Allow creation of blank VQs

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 12:28 PM Dragos Tatulea wrote: > > Based on the filled flag, create VQs that are filled or blank. > Blank VQs will be filled in later through VQ modify. > > Downstream patches will make use of this to pre-create blank VQs at > vdpa device creation. > s/Downstream/Later/ ?

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-03 Thread Jiri Olsa
On Tue, Jul 02, 2024 at 05:13:38PM -0700, Andrii Nakryiko wrote: > On Tue, Jul 2, 2024 at 4:55 PM Masami Hiramatsu wrote: > > > > Hi Jiri, > > > > On Mon, 1 Jul 2024 18:41:07 +0200 > > Jiri Olsa wrote: > > > > > Adding support for uprobe consumer to be defined as session and have > > > new

Re: [PATCH vhost 20/23] vdpa/mlx5: Pre-create hardware VQs at vdpa .dev_add time

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 11:27 AM Dragos Tatulea wrote: > > On Wed, 2024-06-19 at 17:54 +0200, Eugenio Perez Martin wrote: > > On Mon, Jun 17, 2024 at 5:09 PM Dragos Tatulea wrote: > > > > > > Currently, hardware VQs are created right when the vdpa device gets into > > > DRIVER_OK state. That is

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-03 Thread Jiri Olsa
On Tue, Jul 02, 2024 at 01:52:38PM -0700, Andrii Nakryiko wrote: > On Tue, Jul 2, 2024 at 9:11 AM Jiri Olsa wrote: > > > > On Tue, Jul 02, 2024 at 03:04:08PM +0200, Peter Zijlstra wrote: > > > On Mon, Jul 01, 2024 at 06:41:07PM +0200, Jiri Olsa wrote: > > > > > > > +static void > > > >

Re: [PATCH] kallsyms, livepatch: Fix livepatch with CONFIG_LTO_CLANG

2024-07-03 Thread Luis Chamberlain
On Tue, Jul 02, 2024 at 10:56:41PM -0700, Josh Poimboeuf wrote: > On Mon, Jul 01, 2024 at 03:13:23PM +0200, Petr Mladek wrote: > > So, you suggest to search the symbols by a hash. Do I get it correctly? I meant, that in the Rust world the symbols go over the allowed limit, and so an alternative

Re: [PATCH v8 2/5] remoteproc: Add TEE support

2024-07-03 Thread Mathieu Poirier
On Fri, Jun 21, 2024 at 04:37:56PM +0200, Arnaud Pouliquen wrote: > 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

Re: [PATCH v8 2/5] remoteproc: Add TEE support

2024-07-03 Thread Mathieu Poirier
On Wed, Jul 03, 2024 at 09:19:44AM +0200, Arnaud POULIQUEN wrote: > Hello Mathieu > > On 7/2/24 18:44, Mathieu Poirier wrote: > > Good morning, > > > > On Fri, Jun 21, 2024 at 04:37:56PM +0200, Arnaud Pouliquen wrote: > >> Add a remoteproc TEE (Trusted Execution Environment) driver > >> that

Re: [PATCH] dt-bindings: hwlock: sprd-hwspinlock: convert to YAML

2024-07-03 Thread Conor Dooley
On Wed, Jul 03, 2024 at 02:26:32PM +0200, Stanislav Jakubek wrote: > +examples: > + - | > +#include > + > +soc { > + #address-cells = <2>; > + #size-cells = <2>; > + > + hwlock@4050 { > +compatible = "sprd,hwspinlock-r3p0"; nit: double space here before the =

Re: [PATCH vhost v2 09/24] vdpa/mlx5: Rename init_mvqs

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 12:27 PM Dragos Tatulea wrote: > > Function is used to set default values, so name it accordingly. > > Signed-off-by: Dragos Tatulea Reviewed-by: Eugenio Pérez > --- > drivers/vdpa/mlx5/net/mlx5_vnet.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-)

Re: [PATCH vhost v2 07/24] vdpa/mlx5: Initialize and reset device with one queue pair

2024-07-03 Thread Eugenio Perez Martin
On Wed, Jun 26, 2024 at 12:27 PM Dragos Tatulea wrote: > > The virtio spec says that a vdpa device should start off with one queue > pair. The driver is already compliant. > > This patch moves the initialization to device add and reset times. This > is done in preparation for the pre-creation of

Re: [PATCH v2 00/12] uprobes: add batched register/unregister APIs and per-CPU RW semaphore

2024-07-03 Thread Paul E. McKenney
On Wed, Jul 03, 2024 at 09:50:57AM +0200, Peter Zijlstra wrote: > On Tue, Jul 02, 2024 at 04:56:53PM -0700, Paul E. McKenney wrote: > > > > Paul, isn't this the RCU flavour you created to deal with > > > !rcu_is_watching()? The flavour that never should have been created in > > > favour of just

Re: [PATCH v2 04/12] uprobes: revamp uprobe refcounting and lifetime management

2024-07-03 Thread Peter Zijlstra
On Mon, Jul 01, 2024 at 03:39:27PM -0700, Andrii Nakryiko wrote: > One, attempted initially, way to solve this is through using > atomic_inc_not_zero() approach, turning get_uprobe() into > try_get_uprobe(), This is the canonical thing to do. Everybody does this. > which can fail to bump

Re: [PATCH v2 02/12] uprobes: correct mmap_sem locking assumptions in uprobe_write_opcode()

2024-07-03 Thread Google
On Mon, 1 Jul 2024 15:39:25 -0700 Andrii Nakryiko wrote: > It seems like uprobe_write_opcode() doesn't require writer locked > mmap_sem, any lock (reader or writer) should be sufficient. This was > established in a discussion in [0] and looking through existing code > seems to confirm that

[PATCH] dt-bindings: hwlock: sprd-hwspinlock: convert to YAML

2024-07-03 Thread Stanislav Jakubek
Convert the Spreadtrum hardware spinlock bindings to DT schema. Signed-off-by: Stanislav Jakubek --- .../bindings/hwlock/sprd,hwspinlock-r3p0.yaml | 55 +++ .../bindings/hwlock/sprd-hwspinlock.txt | 23 2 files changed, 55 insertions(+), 23 deletions(-) create

[PATCH 0/1] Support multiple reserved memory regions

2024-07-03 Thread Shun-yi Wang
From: "shun-yi.wang" Besides the reserved memory region for SCP, there are additional reserved memory regions for specific hardware use. Currently, only a single memory region is supported. Modifications are made to support multiple memory regions. shun-yi.wang (1): remoteproc: mediatek:

[PATCH 1/1] remoteproc: mediatek: Support multiple reserved memory regions

2024-07-03 Thread Shun-yi Wang
From: "shun-yi.wang" SCP supports multiple reserved memory regions, intended for specific hardwards. Signed-off-by: shun-yi.wang --- drivers/remoteproc/mtk_scp.c | 25 + 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/drivers/remoteproc/mtk_scp.c

Re: [PATCH v2 02/12] uprobes: correct mmap_sem locking assumptions in uprobe_write_opcode()

2024-07-03 Thread Oleg Nesterov
On 07/01, Andrii Nakryiko wrote: > > --- a/kernel/events/uprobes.c > +++ b/kernel/events/uprobes.c > @@ -453,7 +453,7 @@ static int update_ref_ctr(struct uprobe *uprobe, struct > mm_struct *mm, > * @vaddr: the virtual address to store the opcode. > * @opcode: opcode to be written at @vaddr. >

Re: [PATCH v2 01/12] uprobes: update outdated comment

2024-07-03 Thread Oleg Nesterov
Sorry for the late reply. I'll try to read this version/discussion when I have time... yes, I have already promised this before, sorry :/ On 07/01, Andrii Nakryiko wrote: > > There is no task_struct passed into get_user_pages_remote() anymore, > drop the parts of comment mentioning NULL tsk, it's

Re: [PATCH] arm64: dts: qcom: sm6350: Add missing qcom,non-secure-domain property

2024-07-03 Thread Dmitry Baryshkov
On Wed, Jul 03, 2024 at 09:03:01AM GMT, Luca Weiss wrote: > By default the DSP domains are non secure, add the missing nit: secure With that fixed: Reviewed-by: Dmitry Baryshkov > qcom,non-secure-domain property to mark them as non-secure. > > Fixes: efc33c969f23 ("arm64: dts: qcom: sm6350:

Re: [RFC PATCH v2] ptp: Add vDSO-style vmclock support

2024-07-03 Thread David Woodhouse
On Wed, 2024-07-03 at 11:56 +0200, Peter Hilber wrote: > On 02.07.24 20:40, David Woodhouse wrote: > > On 2 July 2024 19:12:00 BST, Peter Hilber > > wrote: > > > On 02.07.24 18:39, David Woodhouse wrote: > > > > To clarify then, the main types are > > > > > > > >  VIRTIO_RTC_CLOCK_UTC == 0 > >

Re: [PATCH] soc: qcom: socinfo: Add PM6350 PMIC

2024-07-03 Thread Dmitry Baryshkov
On Wed, Jul 03, 2024 at 09:01:03AM GMT, Luca Weiss wrote: > Add the ID for the PM6350 PMIC found on e.g. SM7225 Fairphone 4. > > Signed-off-by: Luca Weiss > --- > drivers/soc/qcom/socinfo.c | 1 + > 1 file changed, 1 insertion(+) > Reviewed-by: Dmitry Baryshkov -- With best wishes Dmitry

Re: [PATCH v2 05/12] uprobes: move offset and ref_ctr_offset into uprobe_consumer

2024-07-03 Thread Masami Hiramatsu
On Wed, 3 Jul 2024 10:13:15 +0200 Peter Zijlstra wrote: > On Mon, Jul 01, 2024 at 03:39:28PM -0700, Andrii Nakryiko wrote: > > Simplify uprobe registration/unregistration interfaces by making offset > > and ref_ctr_offset part of uprobe_consumer "interface". In practice, all > > existing users

[PATCH v12 19/19] fgraph: Skip push operation if no retfunc is registered

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Skip push operation only when there is no fgraph_ops which sets retfunc. This is for optimizing performance of fprobe on fgraph. Since the major use case of fprobe is putting a probe on function entry and another probe on exit. Since these probes are independent,

[PATCH v12 18/19] fgraph: Skip recording calltime/rettime if it is not nneeded

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Skip recording calltime and rettime if the fgraph_ops does not need it. This is a kind of performance optimization for fprobe. Since the fprobe user does not use these entries, recording timestamp in fgraph is just a overhead (e.g. eBPF, ftrace). So introduce the

[PATCH v12 17/19] Documentation: probes: Update fprobe on function-graph tracer

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Update fprobe documentation for the new fprobe on function-graph tracer. This includes some bahvior changes and pt_regs to ftrace_regs interface change. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v2: - Update @fregs parameter explanation. ---

[PATCH v12 16/19] selftests/ftrace: Add a test case for repeating register/unregister fprobe

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) This test case repeats define and undefine the fprobe dynamic event to ensure that the fprobe does not cause any issue with such operations. Signed-off-by: Masami Hiramatsu (Google) --- .../test.d/dynevent/add_remove_fprobe_repeat.tc| 19

[PATCH v12 15/19] selftests: ftrace: Remove obsolate maxactive syntax check

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Since the fprobe event does not support maxactive anymore, stop testing the maxactive syntax error checking. Signed-off-by: Masami Hiramatsu (Google) --- .../ftrace/test.d/dynevent/fprobe_syntax_errors.tc |4 +--- 1 file changed, 1 insertion(+), 3

[PATCH v12 14/19] tracing/fprobe: Remove nr_maxactive from fprobe

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Remove depercated fprobe::nr_maxactive. This involves fprobe events to rejects the maxactive number. Signed-off-by: Masami Hiramatsu (Google) --- Changes in v2: - Newly added. --- include/linux/fprobe.h |2 -- kernel/trace/trace_fprobe.c | 44

[PATCH v12 13/19] fprobe: Rewrite fprobe on function-graph tracer

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Rewrite fprobe implementation on function-graph tracer. Major API changes are: - 'nr_maxactive' field is deprecated. - This depends on CONFIG_DYNAMIC_FTRACE_WITH_ARGS or !CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS, and CONFIG_HAVE_FUNCTION_GRAPH_FREGS. So

[PATCH v12 12/19] ftrace: Add CONFIG_HAVE_FTRACE_GRAPH_FUNC

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Add CONFIG_HAVE_FTRACE_GRAPH_FUNC kconfig in addition to ftrace_graph_func macro check. This is for the other feature (e.g. FPROBE) which requires to access ftrace_regs from fgraph_ops::entryfunc() can avoid compiling if the fgraph can not pass the valid

[PATCH v12 11/19] bpf: Enable kprobe_multi feature if CONFIG_FPROBE is enabled

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Enable kprobe_multi feature if CONFIG_FPROBE is enabled. The pt_regs is converted from ftrace_regs by ftrace_partial_regs(), thus some registers may always returns 0. But it should be enough for function entry (access arguments) and exit (access return value).

[PATCH v12 10/19] tracing/fprobe: Enable fprobe events with CONFIG_DYNAMIC_FTRACE_WITH_ARGS

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Allow fprobe events to be enabled with CONFIG_DYNAMIC_FTRACE_WITH_ARGS. With this change, fprobe events mostly use ftrace_regs instead of pt_regs. Note that if the arch doesn't enable HAVE_PT_REGS_COMPAT_FTRACE_REGS, fprobe events will not be able to be used from

[PATCH v12 09/19] tracing: Add ftrace_fill_perf_regs() for perf event

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Add ftrace_fill_perf_regs() which should be compatible with the perf_fetch_caller_regs(). In other words, the pt_regs returned from the ftrace_fill_perf_regs() must satisfy 'user_mode(regs) == false' and can be used for stack tracing. Signed-off-by: Masami

[PATCH v12 08/19] tracing: Add ftrace_partial_regs() for converting ftrace_regs to pt_regs

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Add ftrace_partial_regs() which converts the ftrace_regs to pt_regs. This is for the eBPF which needs this to keep the same pt_regs interface to access registers. Thus when replacing the pt_regs with ftrace_regs in fprobes (which is used by kprobe_multi eBPF

[PATCH v12 07/19] fprobe: Use ftrace_regs in fprobe exit handler

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Change the fprobe exit handler to use ftrace_regs structure instead of pt_regs. This also introduce HAVE_PT_REGS_TO_FTRACE_REGS_CAST which means the ftrace_regs's memory layout is equal to the pt_regs so that those are able to cast. Fprobe introduces a new

[PATCH v12 06/19] fprobe: Use ftrace_regs in fprobe entry handler

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) This allows fprobes to be available with CONFIG_DYNAMIC_FTRACE_WITH_ARGS instead of CONFIG_DYNAMIC_FTRACE_WITH_REGS, then we can enable fprobe on arm64. Signed-off-by: Masami Hiramatsu (Google) Acked-by: Florent Revest --- Changes in v6: - Keep using

[PATCH v12 05/19] function_graph: Pass ftrace_regs to retfunc

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Pass ftrace_regs to the fgraph_ops::retfunc(). If ftrace_regs is not available, it passes a NULL instead. User callback function can access some registers (including return address) via this ftrace_regs. Signed-off-by: Masami Hiramatsu (Google) --- Changes in

[PATCH v12 04/19] function_graph: Replace fgraph_ret_regs with ftrace_regs

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Use ftrace_regs instead of fgraph_ret_regs for tracing return value on function_graph tracer because of simplifying the callback interface. The CONFIG_HAVE_FUNCTION_GRAPH_RETVAL is also replaced by CONFIG_HAVE_FUNCTION_GRAPH_FREGS. Signed-off-by: Masami

[PATCH v12 03/19] function_graph: Pass ftrace_regs to entryfunc

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Pass ftrace_regs to the fgraph_ops::entryfunc(). If ftrace_regs is not available, it passes a NULL instead. User callback function can access some registers (including return address) via this ftrace_regs. Signed-off-by: Masami Hiramatsu (Google) --- Changes in

[PATCH v12 02/19] tracing: Rename ftrace_regs_return_value to ftrace_regs_get_return_value

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) Rename ftrace_regs_return_value to ftrace_regs_get_return_value as same as other ftrace_regs_get/set_* APIs. Signed-off-by: Masami Hiramatsu (Google) Acked-by: Mark Rutland --- Changes in v6: - Moved to top of the series. Changes in v3: - Newly added. ---

[PATCH v12 01/19] tracing: Add a comment about ftrace_regs definition

2024-07-03 Thread Masami Hiramatsu (Google)
From: Masami Hiramatsu (Google) To clarify what will be expected on ftrace_regs, add a comment to the architecture independent definition of the ftrace_regs. Signed-off-by: Masami Hiramatsu (Google) Acked-by: Mark Rutland --- Changes in v8: - Update that the saved registers depends on the

[PATCH v12 00/19] tracing: fprobe: function_graph: Multi-function graph and fprobe on fgraph

2024-07-03 Thread Masami Hiramatsu (Google)
Hi, Here is the 12th version of the series to re-implement the fprobe on function-graph tracer. The previous version is; https://lore.kernel.org/all/171858878797.288820.237119113242007537.stgit@devnote2/ In this version, I added a new performance improvement patch[19/19] and add some

Re: [RFC PATCH v2] ptp: Add vDSO-style vmclock support

2024-07-03 Thread Peter Hilber
On 02.07.24 20:40, David Woodhouse wrote: > On 2 July 2024 19:12:00 BST, Peter Hilber > wrote: >> On 02.07.24 18:39, David Woodhouse wrote: >>> To clarify then, the main types are >>> >>> VIRTIO_RTC_CLOCK_UTC == 0 >>> VIRTIO_RTC_CLOCK_TAI == 1 >>> VIRTIO_RTC_CLOCK_MONOTONIC == 2 >>>

Re: [PATCH] remoteproc: mediatek: Increase MT8188/MT8195 SCP core0 DRAM size

2024-07-03 Thread AngeloGioacchino Del Regno
Il 03/07/24 05:44, Jason Chen ha scritto: The current DRAM size is insufficient for the HEVC feature, which requires more memory for proper functionality. This change ensures the feature has the necessary resources. Signed-off-by: Jason Chen Reviewed-by: AngeloGioacchino Del Regno

Re: [PATCH v2 05/12] uprobes: move offset and ref_ctr_offset into uprobe_consumer

2024-07-03 Thread Peter Zijlstra
On Mon, Jul 01, 2024 at 03:39:28PM -0700, Andrii Nakryiko wrote: > Simplify uprobe registration/unregistration interfaces by making offset > and ref_ctr_offset part of uprobe_consumer "interface". In practice, all > existing users already store these fields somewhere in uprobe_consumer's >

Re: [PATCHv2 bpf-next 1/9] uprobe: Add support for session consumer

2024-07-03 Thread Peter Zijlstra
On Tue, Jul 02, 2024 at 01:51:28PM -0700, Andrii Nakryiko wrote: > > +static size_t ri_size(int sessions_cnt) > > +{ > > + struct return_instance *ri __maybe_unused; > > + > > + return sizeof(*ri) + sessions_cnt * sizeof(ri->sessions[0]); > > just use struct_size()? Yeah, lets not.

Re: [PATCH v2 00/12] uprobes: add batched register/unregister APIs and per-CPU RW semaphore

2024-07-03 Thread Peter Zijlstra
On Tue, Jul 02, 2024 at 09:47:41PM -0700, Andrii Nakryiko wrote: > > As you noted, that percpu-rwsem write side is quite insane. And you're > > creating this batch complexity to mitigate that. > > > Note that batch API is needed regardless of percpu RW semaphore or > not. As I mentioned, once

Re: [PATCH v2 00/12] uprobes: add batched register/unregister APIs and per-CPU RW semaphore

2024-07-03 Thread Peter Zijlstra
On Tue, Jul 02, 2024 at 04:56:53PM -0700, Paul E. McKenney wrote: > > Paul, isn't this the RCU flavour you created to deal with > > !rcu_is_watching()? The flavour that never should have been created in > > favour of just cleaning up the mess instead of making more. > > My guess is that you are

[PATCH v2] ring-buffer: Limit time with disabled interrupts in rb_check_pages()

2024-07-03 Thread Petr Pavlu
The function rb_check_pages() validates the integrity of a specified per-CPU tracing ring buffer. It does so by traversing the underlying linked list and checking its next and prev links. To guarantee that the list isn't modified during the check, a caller typically needs to take

Re: [PATCH v8 2/5] remoteproc: Add TEE support

2024-07-03 Thread Arnaud POULIQUEN
Hello Mathieu On 7/2/24 18:44, Mathieu Poirier wrote: > Good morning, > > On Fri, Jun 21, 2024 at 04:37:56PM +0200, Arnaud Pouliquen wrote: >> Add a remoteproc TEE (Trusted Execution Environment) driver >> that will be probed by the TEE bus. If the associated Trusted >> application is supported

[PATCH] arm64: dts: qcom: sm6350: Add missing qcom,non-secure-domain property

2024-07-03 Thread Luca Weiss
#size-cells = <0>; --- base-commit: 0b58e108042b0ed28a71cd7edf517555b233 change-id: 20240703-sm6350-fastrpc-fix-760d2841d0b6 Best regards, -- Luca Weiss

[PATCH] soc: qcom: socinfo: Add PM6350 PMIC

2024-07-03 Thread Luca Weiss
quot;PM8450", [65] = "PM8010", --- base-commit: 0b58e108042b0ed28a71cd7edf517555b233 change-id: 20240703-socinfo-pm6350-c27cfd02cb66 Best regards, -- Luca Weiss

Re: [PATCH v2] perf,x86: avoid missing caller address in stack traces captured in uprobe

2024-07-03 Thread Josh Poimboeuf
On Tue, Jul 02, 2024 at 08:35:08PM -0700, Andrii Nakryiko wrote: > On Tue, Jul 2, 2024 at 6:11 PM Josh Poimboeuf wrote: > > On Tue, Jul 02, 2024 at 05:06:14PM -0700, Andrii Nakryiko wrote: > > > In general, even with false positives, I think it's overwhelmingly > > > better to get correct entry