[PATCH] bpf: Remove duplicate judgments

2025-03-19 Thread Feng Yang
From: Feng Yang Most of the judgments also exist in bpf_base_func_deto, remove them. Signed-off-by: Feng Yang --- kernel/trace/bpf_trace.c | 72 1 file changed, 72 deletions(-) diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c index 6b07

[PATCH v10 2/2] riscv: Add runtime constant support

2025-03-19 Thread Charlie Jenkins
Implement the runtime constant infrastructure for riscv. Use this infrastructure to generate constants to be used by the d_hash() function. This is the riscv variant of commit 94a2bc0f611c ("arm64: add 'runtime constant' support") and commit e3c92e81711d ("runtime constants: add x86 architecture s

next-20250319: arm shmobile_defconfig trace.c undefined type 'struct module'

2025-03-19 Thread Naresh Kamboju
Regressions on arm the shmobile_defconfig builds failed with clang-20 and gcc-13 First seen on the next-20250312 Good: next-20250311 Bad: next-20250312 .. next-20250319 Regressions found on arm: - gcc-13-shmobile_defconfig - gcc-8-shmobile_defconfig - clang-20-shmobile_defconfig

Re: [PATCH v9 1/2] riscv: Move nop definition to insn-def.h

2025-03-19 Thread Charlie Jenkins
On Wed, Mar 19, 2025 at 04:27:39PM +0100, Andrew Jones wrote: > On Tue, Mar 18, 2025 at 05:38:45PM -0700, Charlie Jenkins wrote: > > We have duplicated the definition of the nop instruction in ftrace.h and > > in jump_label.c. Move this definition into the generic file insn-def.h > > so that they c

[PATCH] tracing: Align synth event print fmt

2025-03-19 Thread Douglas RAILLARD
From: Douglas Raillard The vast majority of ftrace event print fmt consist of a space-separated field=value pair. Synthetic event currently use a comma-separated field=value pair, which sticks out from events created via more classical means. Align the format of synth events so they look just li

[PATCH] tracing: Use hashtable.h for event_hash

2025-03-19 Thread Sasha Levin
Convert the event_hash array in trace_output.c to use the generic hashtable implementation from hashtable.h instead of the manually implemented hash table. This simplifies the code and makes it more maintainable by using the standard hashtable API defined in hashtable.h. Rename EVENT_HASHSIZE to

Re: [PATCH RFC v2 04/29] mm: asi: Add infrastructure for boot-time enablement

2025-03-19 Thread Yosry Ahmed
On Wed, Mar 19, 2025 at 06:29:35PM +0100, Borislav Petkov wrote: > On Fri, Jan 10, 2025 at 06:40:30PM +, Brendan Jackman wrote: > > Add a boot time parameter to control the newly added X86_FEATURE_ASI. > > "asi=on" or "asi=off" can be used in the kernel command line to enable > > or disable ASI

[PATCH v10 1/2] riscv: Move nop definition to insn-def.h

2025-03-19 Thread Charlie Jenkins
We have duplicated the definition of the nop instruction in ftrace.h and in jump_label.c. Move this definition into the generic file insn-def.h so that they can share the definition with each other and with future files. Signed-off-by: Charlie Jenkins Reviewed-by: Alexandre Ghiti Tested-by: Alex

[PATCH v10 0/2] riscv: Add runtime constant support

2025-03-19 Thread Charlie Jenkins
Ard brought this to my attention in this patch [1]. I benchmarked this patch on the Nezha D1 (which does not contain Zba or Zbkb so it uses the default algorithm) by navigating through a large directory structure. I created a 1000-deep directory structure and then cd and ls through it. With this p

Re: [PATCH RFC v2 04/29] mm: asi: Add infrastructure for boot-time enablement

2025-03-19 Thread Borislav Petkov
On Fri, Jan 10, 2025 at 06:40:30PM +, Brendan Jackman wrote: > Add a boot time parameter to control the newly added X86_FEATURE_ASI. > "asi=on" or "asi=off" can be used in the kernel command line to enable > or disable ASI at boot time. If not specified, ASI enablement depends > on CONFIG_ADDRE

[PATCH v2 0/2] fix gss seqno handling to be more rfc-compliant

2025-03-19 Thread Nikhil Jha via B4 Relay
When the client retransmits an operation (for example, because the server is slow to respond), a new GSS sequence number is associated with the XID. In the current kernel code the original sequence number is discarded. Subsequently, if a response to the original request is received there will be a

Re: [PATCH 6/7] uprobes: Allow the use of uprobe_warn() in arch code

2025-03-19 Thread Jeremy Linton
Hi, On 3/19/25 9:51 AM, Oleg Nesterov wrote: On 03/18, Jeremy Linton wrote: --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h @@ -185,6 +185,7 @@ struct uprobes_state { }; extern void __init uprobes_init(void); +extern void uprobe_warn(struct task_struct *t, const char *msg);

Re: [RFC PATCH] tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER

2025-03-19 Thread Gabriele Paoloni
On Wed, Mar 19, 2025 at 10:13 AM Steven Rostedt wrote: > > On Tue, 18 Mar 2025 11:07:00 +0900 > Masami Hiramatsu (Google) wrote: > > > > --- a/kernel/trace/trace_events.c > > > +++ b/kernel/trace/trace_events.c > > > @@ -790,7 +790,7 @@ static int __ftrace_event_enable_disable(struct > > > trace

Re: [PATCH 6/7] uprobes: Allow the use of uprobe_warn() in arch code

2025-03-19 Thread Oleg Nesterov
On 03/18, Jeremy Linton wrote: > > --- a/include/linux/uprobes.h > +++ b/include/linux/uprobes.h > @@ -185,6 +185,7 @@ struct uprobes_state { > }; > > extern void __init uprobes_init(void); > +extern void uprobe_warn(struct task_struct *t, const char *msg); > extern int set_swbp(struct arch_up

Re: [PATCH 3/3] tracing: Rename trace_synth() to synth_event_trace2()

2025-03-19 Thread Douglas Raillard
On 19-03-2025 13:37, Masami Hiramatsu (Google) wrote: On Tue, 18 Mar 2025 18:08:12 + Douglas RAILLARD wrote: From: Douglas Raillard Rename the frehsly exposed trace_synth() to synth_event_trace2() to comply with the existing naming convention. Since synth_event_trace() already exists (an

Re: next-20250319: arm shmobile_defconfig trace.c undefined type 'struct module'

2025-03-19 Thread Naresh Kamboju
On Wed, 19 Mar 2025 at 17:01, Naresh Kamboju wrote: > > Regressions on arm the shmobile_defconfig builds failed with clang-20 and > gcc-13 > > First seen on the next-20250312 > Good: next-20250311 > Bad: next-20250312 .. next-20250319 > > Regression

Re: [PATCH 3/3] tracing: Rename trace_synth() to synth_event_trace2()

2025-03-19 Thread Google
On Tue, 18 Mar 2025 18:08:12 + Douglas RAILLARD wrote: > From: Douglas Raillard > > Rename the frehsly exposed trace_synth() to synth_event_trace2() to > comply with the existing naming convention. Since synth_event_trace() > already exists (and operates on a "struct trace_event_file *"), u

Re: [PATCH 6/7] uprobes: Allow the use of uprobe_warn() in arch code

2025-03-19 Thread Mark Brown
On Tue, Mar 18, 2025 at 03:48:40PM -0500, Jeremy Linton wrote: > The uprobe_warn function is limited to the uprobe core, > but the functionality is useful to report arch specific errors. > > Drop the static so it can be used in those code paths. ...and also make use of it in the arm64 code. sig

Re: [PATCH] tracing: Ensure module defining synth event cannot be unloaded while tracing

2025-03-19 Thread Google
On Tue, 18 Mar 2025 18:09:05 + Douglas RAILLARD wrote: > From: Douglas Raillard > > Currently, using synth_event_delete() will fail if the event is being > used (tracing in progress), but that is normally done in the module exit > function. At that stage, failing is problematic as returning

Re: [PATCH 3/7] arm64: uaccess: Add additional userspace GCS accessors

2025-03-19 Thread Mark Brown
On Tue, Mar 18, 2025 at 03:48:37PM -0500, Jeremy Linton wrote: > +static inline u64 load_user_gcs(unsigned long __user *addr, int *err) > +{ > + unsigned long ret; > + u64 load; > + > + if (!access_ok((char __user *)addr, sizeof(load))) { > + *err = -EFAULT; > +

Re: [PATCH 1/7] arm64/gcs: task_gcs_el0_enable() should use passed task

2025-03-19 Thread Mark Brown
On Tue, Mar 18, 2025 at 03:48:35PM -0500, Jeremy Linton wrote: > Mark Rutland noticed that the task parameter is ignored and > 'current' is being used instead. Since this is usually > what its passed, it hasn't yet been causing problems but likely > will as the code gets more testing. Reviewed-by:

Re: [PATCH v2 3/3] kernel/events/uprobes: uprobe_write_opcode() rewrite

2025-03-19 Thread Oleg Nesterov
On 03/18, David Hildenbrand wrote: > > + if (unlikely(!folio_test_anon(folio))) { > + VM_WARN_ON_ONCE(is_register); > + goto out; > + } Don't we need folio_put() before "goto out" ? Other than that, for this series: Acked-by: Oleg Nesterov

Re: [PATCH] tracing: Fix synth event printk format for str fields

2025-03-19 Thread Google
Hi, On Tue, 18 Mar 2025 18:09:38 + Douglas RAILLARD wrote: > From: Douglas Raillard > > The printk format for synth event uses "%.*s" to print string fields, > but then only passes the pointer part as var arg. > > Add the missing precision var arg. I'm not sure what you want to. Would yo

Re: [PATCH v9 2/2] riscv: Add runtime constant support

2025-03-19 Thread Alexandre Ghiti
Hi Charlie, On Wed, Mar 19, 2025 at 1:39 AM Charlie Jenkins wrote: > > Implement the runtime constant infrastructure for riscv. Use this > infrastructure to generate constants to be used by the d_hash() > function. > > This is the riscv variant of commit 94a2bc0f611c ("arm64: add 'runtime > const

Re: [PATCH v9 1/2] riscv: Move nop definition to insn-def.h

2025-03-19 Thread Alexandre Ghiti
Hi Charlie, On Wed, Mar 19, 2025 at 1:39 AM Charlie Jenkins wrote: > > We have duplicated the definition of the nop instruction in ftrace.h and > in jump_label.c. Move this definition into the generic file insn-def.h > so that they can share the definition with each other and with future > files.

Re: [RFC PATCH] tracing: fix return value in __ftrace_event_enable_disable for TRACE_REG_UNREGISTER

2025-03-19 Thread Steven Rostedt
On Tue, 18 Mar 2025 11:07:00 +0900 Masami Hiramatsu (Google) wrote: > > --- a/kernel/trace/trace_events.c > > +++ b/kernel/trace/trace_events.c > > @@ -790,7 +790,7 @@ static int __ftrace_event_enable_disable(struct > > trace_event_file *file, > > clear_bit(EVENT_FILE