[no subject]

2013-11-30 Thread Google®
-- wir gratulieren Ihnen über Ihren Erfolg in der folgenden amtlichen Veröffentlichung der Ergebnisse der E -Mail- Electronic Online Gewinnspiel Organisiert von Google, in Verbindung mit der Stiftung für die Förderung von Software-Produkten , (FPS) am 26. November 2013 hier in London UK . Google

[no subject]

2013-11-30 Thread Google®
-- wir gratulieren Ihnen über Ihren Erfolg in der folgenden amtlichen Veröffentlichung der Ergebnisse der E -Mail- Electronic Online Gewinnspiel Organisiert von Google, in Verbindung mit der Stiftung für die Förderung von Software-Produkten , (FPS) am 26. November 2013 hier in London UK . Google

suspicious RCU usage warning on tracing/urgent

2023-09-10 Thread Google
without any problem. Thank you, -- Masami Hiramatsu (Google)

Re: [PATCH] ftrace/selftests: Add softlink to latest log directory

2023-09-10 Thread Google
On Fri, 8 Sep 2023 18:17:21 -0400 Steven Rostedt wrote: > From: Steven Rostedt (Google) > > When I'm debugging something with the ftrace selftests and need to look at > the logs, it becomes tedious that I need to do the following: > > ls -ltr logs > [ copy the last d

Re: [RESEND][PATCH] tracing/synthetic: Fix order of struct trace_dynamic_info

2023-09-10 Thread Google
On Fri, 8 Sep 2023 16:39:29 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > To make handling BIG and LITTLE endian better the offset/len of dynamic > fields of the synthetic events was changed into a structure of: > > struct tr

Re: [PATCH v4 4/9] fprobe: rethook: Use ftrace_regs in fprobe exit handler and rethook

2023-09-11 Thread Google
On Mon, 11 Sep 2023 09:55:09 +0200 Sven Schnelle wrote: > Masami Hiramatsu (Google) writes: > > >> > IOW, it is ftrace save regs/restore regs code issue. I need to check how > >> > the > >> > function_graph implements it. > >>

Re: [PATCH v3] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-11 Thread Google
x384b00c0 from 0x80008000 > PHYS_OFFSET: 0xcc5b8000 > CPU features: 0x88000203,3c02,1000421b > Memory Limit: none > Rebooting in 1 seconds.. > > Fixes: 5bdcd5f5331a ("eventfs: Implement removal of meta data from eventfs") > Signed-off-by

Re: [PATCH] tracing/synthetic: Print out u64 values properly

2023-09-15 Thread Google
Hi Tero, On Fri, 15 Sep 2023 13:46:45 +0300 Tero Kristo wrote: > Hi Masami, > > On 15/09/2023 09:01, Masami Hiramatsu (Google) wrote: > > Hi Tero, > > > > On Mon, 11 Sep 2023 17:17:04 +0300 > > Tero Kristo wrote: > > > >> The synth traces

Re: [PATCH v5] eventfs: Fix the NULL pointer dereference bug in eventfs_remove_rec()

2023-09-12 Thread Google
0c0 from 0xffff80008000 > PHYS_OFFSET: 0xcc5b8000 > CPU features: 0x88000203,3c02,1000421b > Memory Limit: none > Rebooting in 1 seconds.. > This looks good to me! Acked-by: Masami Hiramatsu (Google) Thanks! > Fixes: 5bdcd5f5331a ("eventfs: Implemen

Re: [PATCH 3/3] tracing/selftests: Update kprobe args char/string to match new functions

2023-09-13 Thread Google
On Tue, 12 Sep 2023 22:58:58 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The function that the kprobe_args_char and kprobes_arg_string attaches to > for its test has changed its name once again. Now we need to check for > eventfs_create_dir

Re: [PATCH v4 4/9] fprobe: rethook: Use ftrace_regs in fprobe exit handler and rethook

2023-09-09 Thread Google
Hi Sven, On Wed, 06 Sep 2023 08:49:11 +0200 Sven Schnelle wrote: > Hi Masami, > > Masami Hiramatsu (Google) writes: > > > Thus, we need to ensure that the ftrace_regs which is saved in the ftrace > > *without* FTRACE_WITH_REGS flags, can be used for hooking the fu

Re: [PATCH] tracing/user_events: align uaddr on unsigned long alignment

2023-09-14 Thread Google
else { set_bit(bit - BITS_PER_LONG + offs, LONG_ALIGNED(ptr) + 1); } #endif } And use it. Thank you, > > kunmap_local(kaddr); > unpin_user_pages_dirty_lock(, 1, true); > -- > 2.40.1 > -- Masami Hiramatsu (Google)

Re: [PATCH] tracing/synthetic: Print out u64 values properly

2023-09-15 Thread Google
space); > + trace_seq_printf(s, print_fmt, name, val->as_u64, space); > break; > } > } > -- > 2.40.1 > -- Masami Hiramatsu (Google)

Re: [PATCH v10 4/5] kprobes: freelist.h removed

2023-10-16 Thread Google
*/ > - atomic_fetch_add(-2, >refs); > - > - return head; > - } > - > - /* > - * OK, the head must have changed on us, but we still need to > decrement > - * the refcount we increased. > - */ > - refs = atomic_fetch_add(-1, >refs); > - if (refs == REFS_ON_FREELIST + 1) > - __freelist_add(prev, list); > - } > - > - return NULL; > -} > - > -#endif /* FREELIST_H */ > -- > 2.40.1 > -- Masami Hiramatsu (Google)

Re: [PATCH v10 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-16 Thread Google
Hi Wuqiang, On Mon, 16 Oct 2023 10:45:30 +0800 "wuqiang.matt" wrote: > On 2023/10/16 07:26, Masami Hiramatsu (Google) wrote: > > On Mon, 16 Oct 2023 00:06:11 +0800 > > "wuqiang.matt" wrote: > > > >> On 2023/10/15 23:43, Masami Hiramatsu (Googl

Re: [PATCH v10 3/5] kprobes: kretprobe scalability improvement with objpool

2023-10-16 Thread Google
, GFP_KERNEL, > + rp->rph, kretprobe_init_inst, kretprobe_fini_pool)) { > + kfree(rp->rph); > + rp->rph = NULL; > + return -ENOMEM; > } > - refcount_set(>rph->ref, i); > - > + rp->rph->rp = rp; > rp->nmissed = 0; > /* Establish function entry probe point */ > ret = register_kprobe(>kp); > diff --git a/kernel/trace/fprobe.c b/kernel/trace/fprobe.c > index 3b21f4063258..f5bf98e6b2ac 100644 > --- a/kernel/trace/fprobe.c > +++ b/kernel/trace/fprobe.c > @@ -187,9 +187,9 @@ static void fprobe_init(struct fprobe *fp) > > static int fprobe_init_rethook(struct fprobe *fp, int num) > { > - int i, size; > + int size; > > - if (num < 0) > + if (num <= 0) > return -EINVAL; Oops, this must be a bugfix. Let me fix it. > > if (!fp->exit_handler) { > @@ -202,29 +202,21 @@ static int fprobe_init_rethook(struct fprobe *fp, int > num) > size = fp->nr_maxactive; > else > size = num * num_possible_cpus() * 2; > - if (size < 0) > + if (size <= 0) > return -E2BIG; Here too. Except for this point, it looks good to me. Thanks! -- Masami Hiramatsu (Google)

Re: [PATCH v10 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-16 Thread Google
r_id(); > + for (i = 0; i < num_possible_cpus(); i++) { > + obj = objpool_try_get_slot(pool, cpu); > + if (obj) > + break; > + cpu = cpumask_next_wrap(cpu, cpu_possible_mask, -1, 1); > + } > + raw_l

Re: [PATCH v10 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-15 Thread Google
during pool > + * initialization in objpool_init() > + */ > + if (refcount_dec_and_test(>ref)) > + objpool_free(pool); Nit: you can call objpool_drop() instead of repeating the same thing here. Thank you, > + } while (obj); > +} > +EXPORT_SYMBOL_GPL(objpool_fini); > -- > 2.40.1 > -- Masami Hiramatsu (Google)

Re: [PATCH] riscv: ftrace: Fix to pass correct ftrace_regs to ftrace_func_t functions

2023-10-15 Thread Google
Hi, Gentry ping. I think this should be an important fix because if a fprobe handler without FTRACE_OPS_FL_SAVE_REGS tries to access any register via ftrace_regs, that will get a wrong value. Thank you, On Mon, 2 Oct 2023 21:50:34 +0900 "Masami Hiramatsu (Google)" wrote: >

Re: [PATCH] riscv: ftrace: Fix to pass correct ftrace_regs to ftrace_func_t functions

2023-10-15 Thread Google
Hi, Sorry please ignore this. I found that the arch/riscv doesn't support HAVE_DYNAMIC_FTRACE_WITH_ARGS. Thus this might add a new feature support. Let me update it. Thank you, On Sun, 15 Oct 2023 23:15:23 +0900 Masami Hiramatsu (Google) wrote: > Hi, > > Gentry ping. > > I th

Re: [PATCH] locking/atomic: sh: Use generic_cmpxchg_local for arch_cmpxchg_local()

2023-10-25 Thread Google
matsu wrote: > > > > On Tue, 24 Oct 2023 16:08:12 +0100 > > > > Mark Rutland wrote: > > > > > On Tue, Oct 24, 2023 at 11:52:54PM +0900, Masami Hiramatsu (Google) > > > > > wrote: > > > > > > From: Masami Hiramatsu (G

Re: [External] [PATCH] locking/atomic: sh: Use generic_cmpxchg_local for arch_cmpxchg_local()

2023-10-25 Thread Google
On Wed, 25 Oct 2023 19:26:37 +0800 "wuqiang.matt" wrote: > On 2023/10/24 22:52, Masami Hiramatsu (Google) wrote: > > From: Masami Hiramatsu (Google) > > > > Use generic_cmpxchg_local() for arch_cmpxchg_local() implementation > > in SH archi

Re: [PATCH] tracing/kprobes: Fix the description of variable length arguments

2023-10-27 Thread Google
* @cmd: A pointer to the dynevent_cmd struct representing the new event > > - * @args: Variable number of arg (pairs), one pair for each field > > + * @...: Variable number of arg (pairs), one pair for each field > >* > >* NOTE: Users normally won't want to call this function directly, but > >* rather use the kprobe_event_add_fields() wrapper, which -- Masami Hiramatsu (Google)

Re: [PATCH v6] scripts/link-vmlinux.sh: Add alias to duplicate symbols for kallsyms

2023-10-25 Thread Google
966e1740 T device_show_int > 966e1770 T device_show_bool > c04e10a0 t device_show [mmc_core] > c04e10a0 t device_show@drivers_mmc_core_sdio_bus_c_45 [mmc_core] > > Signed-off-by: Alessandro Carminati (Red Hat) > Thanks for update. I tested that.

Re: [PATCH] tracing/kprobes: Fix symbol counting logic by looking at modules as well

2023-10-27 Thread Google
org > > Cc: Masami Hiramatsu > > Cc: Steven Rostedt > > Fixes: b022f0c7e404 ("tracing/kprobes: Return EADDRNOTAVAIL when func > > matches several symbols") > > Signed-off-by: Andrii Nakryiko > > Acked-by: Song Liu Good catch! Thanks! -- Masami Hiramatsu (Google)

Re: [PATCH] tracing/kprobes: Fix symbol counting logic by looking at modules as well

2023-10-27 Thread Google
t; > - count = 0; > - kallsyms_on_each_match_symbol(count_symbols, func_name, ); > + module_kallsyms_on_each_symbol(NULL, count_mod_symbols, ); > > - return count; > + return ctx.count; > } > > static int __trace_kprobe_create(int argc, const char *argv[]) > -- > 2.34.1 > -- Masami Hiramatsu (Google)

Re: [PATCH] tracing/kprobes: Fix symbol counting logic by looking at modules as well

2023-10-27 Thread Google
On Sat, 28 Oct 2023 10:41:44 +0900 Masami Hiramatsu (Google) wrote: > Hi, > > On Fri, 27 Oct 2023 16:31:26 -0700 > Andrii Nakryiko wrote: > > > Recent changes to count number of matching symbols when creating > > a kprobe event failed to take

Re: [PATCH for-next] tracing/kprobes: Add symbol counting check when module loads

2023-10-31 Thread Google
continue; ... So with above change, 'if mod is not specified, search the symbols in kernel and all modules. If mod is sepecified, search the symbol on the specific module'. Thus, "if func_name is only part of the module named mod", the module_kallsyms_on_each_symbol() will count the 'func_name' in 'mod' module correctly. Thank you, Thank you, -- Masami Hiramatsu (Google)

Re: [PATCH v2] eventfs: Test for ei->is_freed when accessing ei->dentry

2023-10-28 Thread Google
On Sat, 28 Oct 2023 16:46:50 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The eventfs_inode (ei) is protected by SRCU, but the ei->dentry is not. It > is protected by the eventfs_mutex. Anytime the eventfs_mutex is released, > and access to the

Re: [PATCH v5 1/7] eventfs: Remove "is_freed" union with rcu head

2023-11-01 Thread Google
On Tue, 31 Oct 2023 18:33:27 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The eventfs_inode->is_freed was a union with the rcu_head with the > assumption that when it was on the srcu list the head would contain a > pointer whic

Re: [PATCH v5 2/7] eventfs: Have a free_ei() that just frees the eventfs_inode

2023-11-01 Thread Google
On Tue, 31 Oct 2023 18:33:28 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > As the eventfs_inode is freed in two different locations, make a helper > function free_ei() to make sure all the allocated fields of the > eventfs_inode is freed. &g

Re: [PATCH v5 4/7] eventfs: Save ownership and mode

2023-11-01 Thread Google
On Tue, 31 Oct 2023 18:33:30 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Now that inodes and dentries are created on the fly, they are also > reclaimed on memory pressure. Since the ownership and file mode are saved > in the inode, if th

Re: [PATCH v6 5/8] eventfs: Hold eventfs_mutex when calling callback functions

2023-11-01 Thread Google
On Wed, 01 Nov 2023 13:25:46 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The callback function that is used to create inodes and dentries is not > protected by anything and the data that is passed to it could become > stale. After event

Re: [PATCH] tracing: Have trace_event_file have ref counters

2023-11-01 Thread Google
On Tue, 31 Oct 2023 12:24:53 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The following can crash the kernel: > > # cd /sys/kernel/tracing > # echo 'p:sched schedule' > kprobe_events > # exec 5>>events/kprobes/sched

Re: [PATCH v6 7/8] eventfs: Remove special processing of dput() of events directory

2023-11-01 Thread Google
On Wed, 01 Nov 2023 13:25:48 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The top level events directory is no longer special with regards to how it > should be delete. Remove the extra processing for it in > eventfs_set_ei_status_free(). >

Re: [PATCH v6 8/8] eventfs: Use simple_recursive_removal() to clean up dentries

2023-11-02 Thread Google
On Wed, 01 Nov 2023 13:25:49 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Looking at how dentry is removed via the tracefs system, I found that > eventfs does not do everything that it did under tracefs. The tracefs > removal of a dentry calls

Re: [PATCH for-next] tracing/kprobes: Add symbol counting check when module loads

2023-11-02 Thread Google
; > and all modules. If mod is sepecified, search the symbol on the specific > > module'. > > > > Thus, "if func_name is only part of the module named mod", the > > module_kallsyms_on_each_symbol() will count the 'func_name' in 'mod' module > > correctly. > > Sorry, I looked to quickly and forgot about the return value of strcmp()... No problem, strcmp() always traps us :) > > From the code, everything seems OK! > If I have some time, I will test it and potentially come back with a "Tested- > by" tag but without any warranty. Thank you! > > > Thank you, > > > > > > Thank you, > > Best regards. > > -- Masami Hiramatsu (Google)

Re: [RFC PATCH 24/32] x86/ftrace: Enable HAVE_FUNCTION_GRAPH_FREGS

2023-11-06 Thread Google
On Mon, 6 Nov 2023 11:37:10 -0500 Steven Rostedt wrote: > On Mon, 6 Nov 2023 10:05:49 +0900 > Masami Hiramatsu (Google) wrote: > > > So for x86-64, > > > > - rdi, rsi, rcx, rdx, r8, r9, and rsp > > - rax and rdx > > - rbp > > > >

Re: [PATCH] tracing: fprobe-event: Fix to check tracepoint event and return

2023-11-06 Thread Google
On Mon, 6 Nov 2023 17:28:11 -0500 Steven Rostedt wrote: > On Sat, 4 Nov 2023 01:05:34 +0900 > "Masami Hiramatsu (Google)" wrote: > > > From: Masami Hiramatsu (Google) > > > > Fix to check the tracepoint event is not valid with $retval. > > The

Re: [RFC PATCH 10/32] function_graph: Have the instances use their own ftrace_ops for filtering

2023-11-06 Thread Google
On Mon, 6 Nov 2023 01:08:32 +0900 "Masami Hiramatsu (Google)" wrote: > From: Steven Rostedt (VMware) > > Allow for instances to have their own ftrace_ops part of the fgraph_ops that > makes the funtion_graph tracer filter on the set_ftrace_filter file of the >

Re: [RFC PATCH 18/32] function_graph: Fix to initalize ftrace_ops for fgraph with ftrace_graph_func

2023-11-06 Thread Google
On Mon, 6 Nov 2023 19:04:16 +0900 Masami Hiramatsu (Google) wrote: > On Mon, 6 Nov 2023 01:10:10 +0900 > "Masami Hiramatsu (Google)" wrote: > > > From: Masami Hiramatsu (Google) > > > > Fix to initialize the ftrace_ops of fgraph_ops with ftrace_

Re: [RFC PATCH 24/32] x86/ftrace: Enable HAVE_FUNCTION_GRAPH_FREGS

2023-11-06 Thread Google
On Mon, 6 Nov 2023 22:06:17 -0500 Steven Rostedt wrote: > On Tue, 7 Nov 2023 09:42:58 +0900 > Masami Hiramatsu (Google) wrote: > > > Got it. So does ftrace_regs need a placeholder for direct trampoline? > > (Or, can we use a register to pass it?) > > I t

Re: [PATCH v2 3/4] locking/atomic: openrisc: arch_cmpxchg[64]_local undefined

2023-11-07 Thread Google
good to me. Reviewed-by: Masami Hiramatsu (Google) > > Signed-off-by: wuqiang.matt > --- > arch/openrisc/include/asm/cmpxchg.h | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/openrisc/include/asm/cmpxchg.h > b/arch/openrisc/include/asm/cmpxchg.h > ind

Re: [PATCH v2 4/4] locking/atomic: hexagon: arch_cmpxchg[64]_local undefined

2023-11-07 Thread Google
ported-by: kernel test robot > Closes: > https://lore.kernel.org/oe-kbuild-all/202310272207.tlpflya4-...@intel.com/ > Looks good to me. Reviewed-by: Masami Hiramatsu (Google) But I need hexagon's maintainer's comment too. Thank you, > Signed-off-by: wuqiang.matt > ---

Re: [PATCH v2 1/4] locking/atomic: arc: data size checking in arch_cmpxchg

2023-11-07 Thread Google
ARC_HAS_LLSC is undefined, arch_cmpxchg() uses spinlock > to accomplish SMP-safety, so the BUILD_BUG_ON checking is uncecessary. > Looks good to me. Reviewed-by: Masami Hiramatsu (Google) > Signed-off-by: wuqiang.matt > --- > arch/arc/include/asm/cmpxchg.h | 12 ++-- > 1

Re: [PATCH v2 2/4] locking/atomic: arc: arch_cmpxchg[64]_local undefined

2023-11-07 Thread Google
oks good to me. Reviewed-by: Masami Hiramatsu (Google) > Signed-off-by: wuqiang.matt > --- > arch/arc/include/asm/cmpxchg.h | 28 > 1 file changed, 28 insertions(+) > > diff --git a/arch/arc/include/asm/cmpxchg.h b/arch/arc/include/asm/cmpxchg.

Re: [PATCH v1] lib: test_objpool: make global variables static

2023-11-07 Thread Google
ted-by: kernel test robot > Closes: > https://lore.kernel.org/oe-kbuild-all/202311071229.wgrwujm1-...@intel.com/ > Looks good to me. Acked-by: Masami Hiramatsu (Google) Let me pick this to probes/fixes. Thank you, > Signed-off-by: wuqiang.matt > --- > lib/test_objpool.c | 6 +

Re: [PATCH] eventfs: Fix WARN_ON() in create_file_dentry()

2023-10-26 Thread Google
On Tue, 24 Oct 2023 12:36:28 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > As the comment right above a WARN_ON() in create_file_dentry() states: > > * Note, with the mutex held, the e_dentry cannot have content > * and the ei->is

Re: [PATCH] locking/atomic: sh: Use generic_cmpxchg_local for arch_cmpxchg_local()

2023-10-24 Thread Google
On Tue, 24 Oct 2023 16:08:12 +0100 Mark Rutland wrote: > On Tue, Oct 24, 2023 at 11:52:54PM +0900, Masami Hiramatsu (Google) wrote: > > From: Masami Hiramatsu (Google) > > > > Use generic_cmpxchg_local() for arch_cmpxchg_local() implementation > > in SH a

Re: [RFC PATCH 24/32] x86/ftrace: Enable HAVE_FUNCTION_GRAPH_FREGS

2023-11-05 Thread Google
t can handle the return value too. :) Thanks, > > -- Steve -- Masami Hiramatsu (Google)

Re: [RFC PATCH 24/32] x86/ftrace: Enable HAVE_FUNCTION_GRAPH_FREGS

2023-11-05 Thread Google
ce address, it uses ftrace instead of breakpoint). Thank you, -- Masami Hiramatsu (Google)

Re: [RFC PATCH 18/32] function_graph: Fix to initalize ftrace_ops for fgraph with ftrace_graph_func

2023-11-06 Thread Google
On Mon, 6 Nov 2023 01:10:10 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Fix to initialize the ftrace_ops of fgraph_ops with ftrace_graph_func > instead of ftrace_stub. I've changed this, because fprobe entry handler is not cal

Re: [RFC PATCH 24/32] x86/ftrace: Enable HAVE_FUNCTION_GRAPH_FREGS

2023-11-06 Thread Google
0 @@ static inline unsigned long ftrace_call_adjust(unsigned > long addr) > > #ifdef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS > struct ftrace_regs { > + /* > + * Partial, filled with: > + * rax, rcx, rdx, rdi, rsi, r8, r9, rsp Don't we need rbp too? (for frame pointer) > + */ > struct pt_regs regs; > }; -- Masami Hiramatsu (Google)

Re: [PATCH 3/3] locking/atomic: openrisc: use generic_cmpxchg[64]_local for arch_cmpxchg[64]_local

2023-10-28 Thread Google
blems if you end up doing operations on both > > the entire word and a sub-unit of the same thing. > > Thank you for pointing out this. I'll do some research on these > implementations. arc also has the LL-SC instruction but depends on the core feature, so I think we can use it. Thank you, > > > Arnd > > Regards, > wuqiang > -- Masami Hiramatsu (Google)

Re: [PATCH 1/2 v3] eventfs: Remove eventfs_file and just use eventfs_inode

2023-09-19 Thread Google
gt; > > static int e_show(struct seq_file *m, void *v) > > > { > > > - struct eventfs_file *ef = v; > > > + struct eventfs_inode *ei = v; > > > + int i; > > > > > > - seq_printf(m, "%s", ef->name); > > > - if (ef->ei) > > > - seq_putc(m, '/'); > > > + seq_printf(m, "%s", ei->name); > > > > > > - if (ef->dentry) > > > - seq_printf(m, " dentry: (%d)", d_count(ef->dentry)); > > > + if (ei->dentry) > > > + seq_printf(m, " dentry: (%d)", d_count(ei->dentry)); > > > seq_putc(m, '\n'); > > > > > > + for (i = 0; i < ei->nr_entries; i++) { > > > + struct dentry *dentry = ei->d_children[i]; > > > + if (dentry) { > > > + seq_printf(m, " %s dentry: %px (%d)\n", > > > +ei->entries[i].name, dentry, > > > d_count(dentry)); > > > + } > > > + } > > > return 0; > > > } > > > > > > @@ -111,30 +117,25 @@ eventfs_show_dentry_open(struct inode *inode, > > > struct file *file) > > > { > > > const struct seq_operations *seq_ops = _show_dentry_seq_ops; > > > struct event_list *elist; > > > - struct tracefs_inode *ti; > > > struct eventfs_inode *ei; > > > - struct dentry *dentry; > > > > > > - /* The inode private should have the dentry of the "events" directory */ > > > - dentry = inode->i_private; > > > - if (!dentry) > > > + /* The inode private should have the eventfs_inode of the "events" > > > directory */ > > > + ei = inode->i_private; > > > + if (!ei) > > > return -EINVAL; > > > > > > elist = __seq_open_private(file, seq_ops, sizeof(*elist)); > > > if (!elist) > > > return -ENOMEM; > > > > > > - ti = get_tracefs(dentry->d_inode); > > > - ei = ti->private; > > > - > > > /* > > >* Start off at level 0 (/sys/kernel/tracing/events) > > >* Initialize head to the events files and next to the > > >* first file. > > >*/ > > > elist->level = 0; > > > - elist->head[0] = >e_top_files; > > > - elist->next[0] = ei->e_top_files.next; > > > + elist->head[0] = >children; > > > + elist->next[0] = ei->children.next; > > > > > > return 0; > > > } > > > diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c > > > index 891653ba9cf3..34ffb2f8114e 100644 > > > --- a/fs/tracefs/inode.c > > > +++ b/fs/tracefs/inode.c > > > @@ -385,7 +385,7 @@ static void tracefs_dentry_iput(struct dentry > > > *dentry, struct inode *inode) > > > > > > ti = get_tracefs(inode); > > > if (ti && ti->flags & TRACEFS_EVENT_INODE) > > > - eventfs_set_ef_status_free(ti, dentry); > > > + eventfs_set_ei_status_free(ti, dentry); > > > iput(inode); > > > } > > > > > > diff --git a/fs/tracefs/internal.h b/fs/tracefs/internal.h > > > index 461920f0133f..ea3b01c0971a 100644 > > > --- a/fs/tracefs/internal.h > > > +++ b/fs/tracefs/internal.h > > > @@ -9,35 +9,36 @@ enum { > > > TRACEFS_EVENT_TOP_INODE = BIT(2), > > > }; > > > > > > -struct eventfs_inode { > > > - struct list_heade_top_files; > > > +struct tracefs_inode { > > > + unsigned long flags; > > > + void*private; > > > + struct inodevfs_inode; > > > }; > > > > > > /* > > > - * struct eventfs_file - hold the properties of the eventfs files and > > > - * directories. > > > - * @name:the name of the file or directory to create > > > - * @d_parent: holds parent's dentry > > > - * @dentry: once accessed holds dentry > > > - * @list:file or directory to be added to parent directory > > > - * @ei: list of files and directories within directory > > > - * @fop: file_operations for file or directory > > > - * @iop: inode_operations for file or directory > > > - * @data:something that the caller will want to get to later on > > > - * @mode:the permission that the file or directory should have > > > + * struct eventfs_inode - hold the properties of the eventfs directories. > > > + * @list:link list into the parent directory > > > + * @entries: the array of entries representing the files in the > > > directory > > > + * @name:the name of the directory to create > > > > @children: link list into the child eventfs_inode > > Thanks! This got chopped a few times during rebasing. > > > > > > + * @dentry: the dentry of the directory > > > + * @d_parent: pointer to the parent's dentry > > > + * @d_children: The array of dentries to represent the files when created > > > + * @data:The private data to pass to the callbacks > > > + * @nr_entries: The number of items in @entries > > > */ > > > -struct eventfs_file { > > > +struct eventfs_inode { > > > + struct list_headlist; > > > + const struct eventfs_entry *entries; > > > const char *name; > > > - struct dentry *d_parent; > > > + struct list_headchildren; > > > struct dentry *dentry; > > > - struct list_headlist; > > > - struct eventfs_inode*ei; > > > - const struct file_operations*fop; > > > - const struct inode_operations *iop; > > > + struct dentry *d_parent; > > > + struct dentry **d_children; > > > + void*data; > > > /* > > >* Union - used for deletion > > > - * @del_list: list of eventfs_file to delete > > > - * @rcu:eventfs_file to delete in RCU > > > + * @del_list: list of eventfs_inode to delete > > > + * @rcu:eventfs_indoe to delete in RCU > > >* @is_freed: node is freed if one of the above is set > > >*/ > > > union { > > > > Thank you, > > > > Thank you for reviewing! > > I'll need to send a v2. > > I'll have to do that anyway, as Linus nacked the show_eventfs_dentries file > :-( Thank you, -- Masami Hiramatsu (Google)

Re: [PATCH v4] scripts/link-vmlinux.sh: Add alias to duplicate symbols for kallsyms

2023-09-19 Thread Google
xcept Exception as e: > +print(f"An error occurred: {str(e)}") > +raise SystemExit("Script terminated due to an error") > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > index a432b171be82..7cc24fd5f6b4 100755 > --- a/scripts/link-vmlinux.sh > +++ b/scripts/link-vmlinux.sh > @@ -91,7 +91,12 @@ vmlinux_link() > > # The kallsyms linking does not need debug symbols included. > if [ "$output" != "${output#.tmp_vmlinux.kallsyms}" ] ; then > - ldflags="${ldflags} ${wl}--strip-debug" > + # The kallsyms linking does not need debug symbols included, > + # unless the KALLSYMS_ALIAS_SRCLINE. > + if ! is_enabled CONFIG_KALLSYMS_ALIAS_SRCLINE && \ > +[ "$output" != "${output#.tmp_vmlinux.kallsyms}" ] ; then > + ldflags="${ldflags} ${wl}--strip-debug" > + fi > fi > > if is_enabled CONFIG_VMLINUX_MAP; then > @@ -161,7 +166,18 @@ kallsyms() > fi > > info KSYMS ${2} > - scripts/kallsyms ${kallsymopt} ${1} > ${2} > + ALIAS="" > + KAS_DATA="" > + if is_enabled CONFIG_KALLSYMS_ALIAS_SRCLINE_DATA; then > + KAS_DATA="-d" > + fi > + if is_enabled CONFIG_KALLSYMS_ALIAS_SRCLINE; then > + ALIAS=".alias" > + scripts/kas_alias.py \ > + -a ${ADDR2LINE} -v ${kallsyms_vmlinux} -n ${1} \ > + -o ${1}${ALIAS} -s @ ${KAS_DATA} > + fi > + scripts/kallsyms ${kallsymopt} ${1}${ALIAS} > ${2} > } > > # Perform one step in kallsyms generation, including temporary linking of > -- > 2.34.1 > -- Masami Hiramatsu (Google)

Re: [PATCH v9 1/5] lib: objpool added: ring-array based lockless MPMC

2023-09-23 Thread Google
ged, so it's very likely there's an > + * ongoing push() on other cpu nodes but yet not update > + * ages[] to mark it's completion > + */ > + if (head == prev) > + break; This is OK. If we always push() on the current CPU slot, and pop() from any cpus, we can try again here if this slot is not current CPU. But that maybe to much :P Thank you, > + } > + > + return NULL; > +} > + > +/* allocate an object from object pool */ > +void *objpool_pop(struct objpool_head *head) > +{ > + unsigned long flags; > + int i, cpu; > + void *obj = NULL; > + > + /* disable local irq to avoid preemption & interruption */ > + raw_local_irq_save(flags); > + > + cpu = raw_smp_processor_id(); > + for (i = 0; i < num_possible_cpus(); i++) { > + obj = objpool_try_get_slot(head->cpu_slots[cpu]); > + if (obj) > + break; > + cpu = cpumask_next_wrap(cpu, cpu_possible_mask, -1, 1); > + } > + raw_local_irq_restore(flags); > + > + return obj; > +} > +EXPORT_SYMBOL_GPL(objpool_pop); > + > +/* release whole objpool forcely */ > +void objpool_free(struct objpool_head *head) > +{ > + if (!head->cpu_slots) > + return; > + > + /* release percpu slots */ > + objpool_fini_percpu_slots(head); > + > + /* call user's cleanup callback if provided */ > + if (head->release) > + head->release(head, head->context); > +} > +EXPORT_SYMBOL_GPL(objpool_free); > + > +/* drop unused objects and defref objpool for releasing */ > +void objpool_fini(struct objpool_head *head) > +{ > + void *nod; > + > + do { > + /* grab object from objpool and drop it */ > + nod = objpool_pop(head); > + > + /* drop the extra ref of objpool */ > + if (refcount_dec_and_test(>ref)) > + objpool_free(head); > + } while (nod); > +} > +EXPORT_SYMBOL_GPL(objpool_fini); > -- > 2.40.1 > -- Masami Hiramatsu (Google)

Re: [PATCH v9 0/5] lib,kprobes: kretprobe scalability improvement

2023-09-23 Thread Google
+++ > 12 files changed, 1320 insertions(+), 274 deletions(-) > delete mode 100644 include/linux/freelist.h > create mode 100644 include/linux/objpool.h > create mode 100644 lib/objpool.c > create mode 100644 lib/test_objpool.c > > -- > 2.40.1 > -- Masami Hiramatsu (Google)

Re: [PATCH v9 1/5] lib: objpool added: ring-array based lockless MPMC

2023-09-24 Thread Google
t; + > + return -EAGAIN; > +} > +EXPORT_SYMBOL_GPL(objpool_drop); To make this work correctly, you need to disable the objpool (no more pop the object from it) and ensure the objpool is disabled. Also, when disabling the objpool, its refcount must be set to the "active" number of objects. Thank you, -- Masami Hiramatsu (Google)

Re: [PATCH] eventfs: Remember what dentries were created on dir open

2023-09-24 Thread Google
On Wed, 20 Sep 2023 22:15:37 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Using the following code with libtracefs: > > int dfd; > > // create the directory events/kprobes/kp1 > tracefs_kprobe_raw(NULL, &quo

Re: [PATCH 1/2 v3] eventfs: Remove eventfs_file and just use eventfs_inode

2023-09-18 Thread Google
Hi Steve, On Thu, 14 Sep 2023 12:35:05 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Instead of having a descriptor for every file represented in the eventfs > directory, only have the directory itself represented. Change the API to >

Re: [PATCH v5 04/12] fprobe: Use ftrace_regs in fprobe entry handler

2023-09-25 Thread Google
On Tue, 26 Sep 2023 00:14:33 +0200 Jiri Olsa wrote: > On Mon, Sep 25, 2023 at 09:15:15PM +0900, Masami Hiramatsu wrote: > > Hi Jiri, > > > > On Mon, 25 Sep 2023 12:41:59 +0200 > > Jiri Olsa wrote: > > > > > On Sun, Sep 24, 2023 at 10:36:3

Re: [PATCH v5 00/12] tracing: fprobe: rethook: Use ftrace_regs instead of pt_regs

2023-09-28 Thread Google
erf pt_regs. > - Update fprobe-events to use ftrace_regs natively. > - Update bpf multi-kprobe handler use ftrace_partial_regs(). And need to add patches - Introduce a generized function exit hook interface for ftrace. - Replace rethook in fprobe with the function exit hook interface.

Re: [PATCH v5] scripts/link-vmlinux.sh: Add alias to duplicate symbols for kallsyms

2023-09-29 Thread Google
d: {str(e)}") > +raise SystemExit("Script terminated due to an error") > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh > index a432b171be82..c110b0f58a19 100755 > --- a/scripts/link-vmlinux.sh > +++ b/scripts/link-vmlinux.sh > @@ -91,7 +91,12 @@ vmlinux_link() > > # The kallsyms linking does not need debug symbols included. > if [ "$output" != "${output#.tmp_vmlinux.kallsyms}" ] ; then > - ldflags="${ldflags} ${wl}--strip-debug" > + # The kallsyms linking does not need debug symbols included, > + # unless the KALLSYMS_ALIAS_SRCLINE. > + if ! is_enabled CONFIG_KALLSYMS_ALIAS_SRCLINE && \ > +[ "$output" != "${output#.tmp_vmlinux.kallsyms}" ] ; then > + ldflags="${ldflags} ${wl}--strip-debug" > + fi > fi > > if is_enabled CONFIG_VMLINUX_MAP; then > @@ -161,7 +166,19 @@ kallsyms() > fi > > info KSYMS ${2} > - scripts/kallsyms ${kallsymopt} ${1} > ${2} > + ALIAS="" > + KAS_DATA="" > + if is_enabled CONFIG_KALLSYMS_ALIAS_SRCLINE_DATA; then > + KAS_DATA="--data" > + fi > + if is_enabled CONFIG_KALLSYMS_ALIAS_SRCLINE; then > + ALIAS=".alias" > + ${srctree}/scripts/kas_alias.py \ > + --addr2line ${ADDR2LINE} --vmlinux ${kallsyms_vmlinux} \ > + --nmdata ${1} --outfile ${1}${ALIAS} \ > + --basedir ${srctree} --separator @ ${KAS_DATA} > + fi > + scripts/kallsyms ${kallsymopt} ${1}${ALIAS} > ${2} > } > > # Perform one step in kallsyms generation, including temporary linking of > -- > 2.34.1 > -- Masami Hiramatsu (Google)

Re: [PATCH] tracing/eprobe: drop unneeded breaks

2023-09-29 Thread Google
On Thu, 28 Sep 2023 12:43:34 +0200 Julia Lawall wrote: > Drop break after return. > Good catch! This looks good to me. Acked-by: Masami Hiramatsu (Google) And Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events") > Signed-off-by: Julia Lawall >

Re: [PATCH] tracing/eprobe: drop unneeded breaks

2023-09-30 Thread Google
Good catch! This looks good to me. > > > > Acked-by: Masami Hiramatsu (Google) > > > > And > > > > Fixes: 7491e2c44278 ("tracing: Add a probe that attaches to trace events") > > Thanks. I didn't include that because it's not a bug. But it does

Re: [PATCH] eventfs: Test for dentries array allocated in eventfs_release()

2023-09-30 Thread Google
On Sat, 30 Sep 2023 09:01:06 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > The dcache_dir_open_wrapper() could be called when a dynamic event is > being deleted leaving a dentry with no children. In this case the > dlist->dentries array will ne

Re: [PATCH v5 00/12] tracing: fprobe: rethook: Use ftrace_regs instead of pt_regs

2023-09-30 Thread Google
*) https://lore.kernel.org/all/20230905015255.81545-1-wuqiang.m...@bytedance.com/ Thank you, -- Masami Hiramatsu (Google)

Re: [PATCH -fixes] riscv: Fix ftrace syscall handling which are now prefixed with __riscv_

2023-10-03 Thread Google
fix this by implementing arch_syscall_match_sym_name() which allows us > to ignore this prefix. > > And also ignore compat syscalls like x86/arm64 by implementing > arch_trace_is_compat_syscall(). > Looks good to me, Acked-by: Masami Hiramatsu (Google) Thank you, > Fixes: 08d0ce30e0e4 (&q

Re: [PATCH] kprobes: Remove unnecessary initial values of variables

2023-09-18 Thread Google
On Tue, 19 Sep 2023 09:28:23 +0800 Li zeming wrote: > ri and sym is assigned first, so it does not need to initialize the > assignment. > Yes, thanks for fixing! Acked-by: Masami Hiramatsu (Google) > Signed-off-by: Li zeming > --- > kernel/kprobes.c | 4 ++-- &g

Re: [PATCH v9 1/5] lib: objpool added: ring-array based lockless MPMC

2023-09-25 Thread Google
248miss: 0async & hrtimer: percpu objpool from vmalloc Can you test it too? Thanks, >From f1f442ff653e329839e5452b8b88463a80a12ff3 Mon Sep 17 00:00:00 2001 From: "Masami Hiramatsu (Google)" Date: Mon, 25 Sep 2023 16:07:12 +0900 Subject: [PATCH] objpool: S

Re: [PATCH v5 04/12] fprobe: Use ftrace_regs in fprobe entry handler

2023-09-25 Thread Google
Hi Jiri, On Mon, 25 Sep 2023 12:41:59 +0200 Jiri Olsa wrote: > On Sun, Sep 24, 2023 at 10:36:36PM +0900, Masami Hiramatsu (Google) wrote: > > From: Masami Hiramatsu (Google) > > > > This allows fprobes to be available with CONFIG_DYNAMIC_FTRACE_

Re: [PATCH v5 00/12] tracing: fprobe: rethook: Use ftrace_regs instead of pt_regs

2023-10-02 Thread Google
On Sat, 30 Sep 2023 18:14:35 +0900 Masami Hiramatsu (Google) wrote: > On Fri, 29 Sep 2023 17:12:07 -0700 > Alexei Starovoitov wrote: > > > On Thu, Sep 28, 2023 at 6:21 PM Masami Hiramatsu > > wrote: > > > > > > > > > Thus, what I need is to m

Re: [PATCH v9 0/5] lib,kprobes: kretprobe scalability improvement

2023-10-08 Thread Google
On Mon, 9 Oct 2023 02:33:09 +0800 wuqiang wrote: > On 2023/9/23 16:57, Masami Hiramatsu (Google) wrote: > > Hi Wuqiang, > > > > I dug my mail box and found this. Sorry for replying late. > > > > On Tue, 5 Sep 2023 09:52:50 +0800 > > "wuqia

Re: [PATCH v9 3/5] kprobes: kretprobe scalability improvement with objpool

2023-10-08 Thread Google
On Mon, 9 Oct 2023 02:31:34 +0800 wuqiang wrote: > On 2023/10/7 10:02, Masami Hiramatsu (Google) wrote: > > On Tue, 5 Sep 2023 09:52:53 +0800 > > "wuqiang.matt" wrote: > > > >> kretprobe is using freelist to manage return-instances, but freelist, > &

Re: [PATCH v9 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-09 Thread Google
_ONCE(slot->entries[tail & slot->mask], obj) > return slot->entries[head & slot->mask] > > > Regards, > wuqiang > > On 2023/9/25 17:42, Masami Hiramatsu (Google) wrote: > > Hi Wuqiang, > > > > On Tue, 5 S

Re: [PATCH v9 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-12 Thread Google
try_cmpxchg_acquire(>tail, , next) >WRITE_ONCE(slot->entries[tail & slot->mask], obj) > return slot->entries[head & slot->mask] > > > Regards, > wuqiang > > On 2023/9/25 17:42, Masami Hiramatsu (Google) wrote: > &

Re: [PATCH v9 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-12 Thread Google
On Fri, 13 Oct 2023 01:36:05 +0800 "wuqiang.matt" wrote: > On 2023/10/12 22:02, Masami Hiramatsu (Google) wrote: > > Hi Wuqiang, > > > > On Mon, 9 Oct 2023 17:23:34 +0800 > > wuqiang wrote: > > > >> Hello Masami, > >> > >>

Re: [PATCH v9 3/5] kprobes: kretprobe scalability improvement with objpool

2023-10-06 Thread Google
gt; objpool: 334605663 448310646 675018951 903449904 1339693418 > This looks good to me (and I have tested with updated objpool) Acked-by: Masami Hiramatsu (Google) Wuqiang, can you update the above number with the simplified objpool? I got better number (always 80% of the native

Re: [PATCH v4] eventfs: Remove eventfs_file and just use eventfs_inode

2023-10-07 Thread Google
On Tue, 3 Oct 2023 18:40:59 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Instead of having a descriptor for every file represented in the eventfs > directory, only have the directory itself represented. Change the API to > send in a list of e

Re: [PATCH v3 1/1] tracing/kprobes: Return EADDRNOTAVAIL when func matches several symbols

2023-10-18 Thread Google
Hi Francis, On Thu, 31 Aug 2023 09:14:55 +0200 Francis Laniel wrote: > Hi. > > Le mercredi 30 août 2023, 01:57:19 CEST Steven Rostedt a écrit : > > On Fri, 25 Aug 2023 22:13:21 +0900 > > > > Masami Hiramatsu (Google) wrote: > > > > Excellent catch! Than

Re: [PATCH v10 4/5] kprobes: freelist.h removed

2023-10-18 Thread Google
Hi, On Mon, 16 Oct 2023 22:23:14 +0900 Masami Hiramatsu (Google) wrote: > Hi Peter, > > This freelist has been introduced by you, is it OK to remove this because no > other user exists? I'll pick this on my probes/for-next branch. If there is any issue reported, I'll revert it

Re: [PATCH v11 0/5] lib,kprobes: kretprobe scalability improvement

2023-10-18 Thread Google
alability improvement with objpool > kprobes: freelist.h removed > MAINTAINERS: objpool added OK, this version looks good to me. Acked-by: Masami Hiramatsu (Google) I'll pick this series on for-next branch. Thank you, > > MAINTAINERS | 7 + > include/linu

Re: [PATCH v5 0/2] Return EADDRNOTAVAIL when func matches several symbols during kprobe creation

2023-10-19 Thread Google
address may NOT be the instruction boundary. To avoid this issue, it should check the given symbol is unique. Thank you, > > -- Steve -- Masami Hiramatsu (Google)

Re: [PATCH v5 0/2] Return EADDRNOTAVAIL when func matches several symbols during kprobe creation

2023-10-19 Thread Google
On Thu, 19 Oct 2023 09:51:04 -0400 Steven Rostedt wrote: > On Thu, 19 Oct 2023 21:18:43 +0900 > Masami Hiramatsu (Google) wrote: > > > > So why is this adding stable? (and as Greg's form letter states, that's > > > not > > > how you do that) > > &g

Re: [PATCH v9 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-09 Thread Google
Hi, On Mon, 9 Oct 2023 02:40:53 +0800 wuqiang wrote: > On 2023/9/23 17:48, Masami Hiramatsu (Google) wrote: > > Hi Wuqiang, > > > > Sorry for replying later. > > > > On Tue, 5 Sep 2023 09:52:51 +0800 > > "wuqiang.matt" wrote: > > &

Re: [PATCH v1] samples: kprobes: Fixes a typo

2023-10-09 Thread Google
> > > > > Hi all, can someone provide comments on this change. > > > > Hi all, can someone please review this change. It has > > been not > > reviewed for quite some time. > > That's because trivial typos in comments are considered very low priority, > and are usually only added (if they are ever added) if the maintainer has > extra time, which may not be for a while. Anyway, let me pick this. I found this in my inbox now. :) Thank you, > > -- Steve -- Masami Hiramatsu (Google)

Re: [PATCH v6 0/2] Return EADDRNOTAVAIL when func matches several symbols during kprobe creation

2023-10-20 Thread Google
when func matches several > symbols > selftests/ftrace: Add new test case which checks non unique symbol > > kernel/trace/trace_kprobe.c | 63 +++ > kernel/trace/trace_probe.h| 1 + > .../test.d/kprobe/kprobe_non_uniq_symbol.tc | 13 > 3 files changed, 77 insertions(+) > create mode 100644 > tools/testing/selftests/ftrace/test.d/kprobe/kprobe_non_uniq_symbol.tc > > Best regards and thank you in advance. > --- > [1]: > https://lore.kernel.org/lkml/20230816163517.112518-1-flan...@linux.microsoft.com/ > [2]: > https://lore.kernel.org/lkml/20230819101105.b0c104ae4494a7d1f2eea...@kernel.org/ > -- > 2.34.1 > -- Masami Hiramatsu (Google)

Re: [PATCH v10 1/5] lib: objpool added: ring-array based lockless MPMC

2023-10-15 Thread Google
On Mon, 16 Oct 2023 00:06:11 +0800 "wuqiang.matt" wrote: > On 2023/10/15 23:43, Masami Hiramatsu (Google) wrote: > > On Sun, 15 Oct 2023 13:32:47 +0800 > > "wuqiang.matt" wrote: > > > >> objpool is a scalable implementation of high performanc

Re: [PATCH v1] kprobes: unused header files removed

2023-10-23 Thread Google
ll of them > should be removed. > > Reported-by: kernel test robot > Closes: > https://lore.kernel.org/oe-kbuild-all/202310191512.vvypku5z-...@intel.com/ Looks good to me. Acked-by: Masami Hiramatsu (Google) Thanks, > > Signed-off-by: wuqiang.matt > --- > kerne

Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-24 Thread Google
On Tue, 24 Oct 2023 09:57:17 +0800 "wuqiang.matt" wrote: > On 2023/10/24 09:01, Masami Hiramatsu (Google) wrote: > > On Mon, 23 Oct 2023 11:43:04 -0400 > > Steven Rostedt wrote: > > > >> On Mon, 23 Oct 2023 19:24:52 +0800 > >> "wuqiang.mat

Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-23 Thread Google
32T48T64T96T 128T > lock: 957553042 1435814086 1680872925 2043126796 2165424198 > local: 968526317 1454991286 1861053557 2059530343 2171732306 > Yeah, slot->tail is only used on the local CPU. This looks good to me. Acked-by: Masa

Re: [PATCH v1] lib,kprobes: using try_cmpxchg_local in objpool_push

2023-10-23 Thread Google
uot; as a parameter to objpool_try_add_slot() and adding: > > int cpu = raw_smp_processor_id(); > > Which now shows that this function *only* deals with the current CPU. Oh indeed. It used to search all CPUs to push the object, but I asked him to stop that because there should be enough space to push it in the local ring. This is a remnant of that time. Wuqiang, can you make another patch to fix it? Thank you, > > -- Steve -- Masami Hiramatsu (Google)

Re: [RFC PATCH v2 26/31] fprobe: Rewrite fprobe on function-graph tracer

2023-11-09 Thread Google
Hi, On Wed, 8 Nov 2023 23:29:22 +0900 "Masami Hiramatsu (Google)" wrote: > + */ > +static inline int __fprobe_handler(unsigned long ip, unsigned long parent_ip, > +struct fprobe *fp, struct ftrace_regs *fregs, > +

Re: [RFC PATCH v2 12/31] function_graph: Have the instances use their own ftrace_ops for filtering

2023-11-09 Thread Google
On Thu, 9 Nov 2023 21:18:48 -0500 Steven Rostedt wrote: > On Fri, 10 Nov 2023 10:51:54 +0900 > Masami Hiramatsu (Google) wrote: > > > So this patch registers ftrace_ops for each fgraph_ops to ftrace. > > This means that the ftrace_graph_func() will be called twice or

Re: [RFC PATCH v2 20/31] function_graph: Add a new exit handler with parent_ip and ftrace_regs

2023-11-08 Thread Google
On Wed, 8 Nov 2023 23:28:11 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Add a new return handler to fgraph_ops as 'retregfunc' which takes > parent_ip and ftrace_regs instead of ftrace_graph_ret. This handler > is available

Re: [RFC PATCH v2 01/31] tracing: Add a comment about ftrace_regs definition

2023-11-08 Thread Google
On Wed, 8 Nov 2023 23:24:32 +0900 "Masami Hiramatsu (Google)" wrote: > 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-

Re: [PATCH] tracing/kprobes: Fix the order of argument descriptions

2023-11-10 Thread Google
e event > >* @loc: The location of the kprobe event > > - * @kretprobe: Is this a return probe? > >* @...: Variable number of arg (pairs), one pair for each field > >* > >* NOTE: Users normally won't want to call this function directly, but -- Masami Hiramatsu (Google)

Re: [RFC PATCH v2 01/31] tracing: Add a comment about ftrace_regs definition

2023-11-10 Thread Google
On Fri, 10 Nov 2023 11:11:31 + Mark Rutland wrote: > On Thu, Nov 09, 2023 at 08:14:52AM +0900, Masami Hiramatsu wrote: > > On Wed, 8 Nov 2023 23:24:32 +0900 > > "Masami Hiramatsu (Google)" wrote: > > > > > From: Masami Hiramatsu (Google) >

Re: [RFC PATCH v2 12/31] function_graph: Have the instances use their own ftrace_ops for filtering

2023-11-09 Thread Google
Hi, I found strange behavior that if we set two or more probes on the same function, its callback called twice or more. Also, the stacktrace failed. And I found the root cause is here; On Wed, 8 Nov 2023 23:26:42 +0900 "Masami Hiramatsu (Google)" wrote: > @@ -910,9 +

  1   2   3   4   5   6   7   8   9   10   >