> From: Avadhut Naik
> [...]
> diff --git a/arch/x86/include/asm/mce.h b/arch/x86/include/asm/mce.h index
> 3b9970117a0f..3c86b838b541 100644
> --- a/arch/x86/include/asm/mce.h
> +++ b/arch/x86/include/asm/mce.h
> @@ -187,6 +187,14 @@ enum mce_notifier_prios {
> MCE_PRIO_HIGHEST = MCE_PRIO_C
From: Qiao Ma
Uprobe needs to fetch args into a percpu buffer, and then copy to ring
buffer to avoid non-atomic context problem.
Sometimes user-space strings, arrays can be very large, but the size of
percpu buffer is only page size. And store_trace_args() won't check
whether these data exceeds
On Mon, Oct 14, 2024 at 09:09:49PM -0700, Luis Chamberlain wrote:
> Mike, please run this with kmemleak enabled and running, and also try to get
> tools/testing/selftests/kmod/kmod.sh to pass.
There was an issue with kmemleak, I fixed it here:
https://lore.kernel.org/linux-mm/20241009180816.83591
> 2024年10月14日 下午10:40,Masami Hiramatsu (Google) 写道:
>
> On Mon, 14 Oct 2024 14:14:05 +0800
> Ma Qiao wrote:
>
>> From: Qiao Ma
>>
>> Uprobe needs to fetch args into a percpu buffer, and then copy to ring
>> buffer to avoid non-atomic context problem.
>>
>> Sometimes user-space strings, ar
Mike, please run this with kmemleak enabled and running, and also try to get
tools/testing/selftests/kmod/kmod.sh to pass. I run into silly boot issues
with just a guest.
Luis
> 2024年10月14日 下午10:58,Oleg Nesterov 写道:
>
> Sorry, currently I don't have time to even try to read this patch, just
> one note below...
>
> On 10/14, Ma Qiao wrote:
>>
>> @@ -979,6 +980,11 @@ static struct uprobe_cpu_buffer
>> *prepare_uprobe_buffer(struct trace_uprobe *tu,
>> ucb = up
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 SAVE_REG
From: Masami Hiramatsu (Google)
Add get_entry_ip() implementation for arm64. This is based on the
information in ftrace_call_adjust() on arm64. Basically function entry
address = ftrace call entry_ip - 4, but when there is a BTI at the first
instruction, we need one more instruction back (entry_i
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.
---
Doc
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 ++
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 deletions(
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 | 43 +
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 cur
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 ftrace_reg
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).
Sig
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_FTRACE_REGS_HAVING_PT_REGS,
fprobe events will not be able to be used from p
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 Hiramat
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 event)
From: Masami Hiramatsu (Google)
Change the fprobe exit handler to use ftrace_regs structure instead of
pt_regs. This also introduce HAVE_FTRACE_REGS_HAVING_PT_REGS which
means the ftrace_regs is including the pt_regs so that ftrace_regs
can provide pt_regs without memory allocation.
Fprobe introd
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 v8
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 Hiramatsu
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.
Note that the ftrace_regs can be NULL when the arch does N
From: Masami Hiramatsu (Google)
Rename ftrace_regs_return_value to ftrace_regs_get_return_value as same as
other ftrace_regs_get/set_* APIs. arm64 and riscv are already using this
new name.
Signed-off-by: Masami Hiramatsu (Google)
Acked-by: Mark Rutland
---
Changes in v16:
- Simplified acco
From: Masami Hiramatsu (Google)
Since the arch_ftrace_get_regs(fregs) is only valid when the
FL_SAVE_REGS is set, we need to use `&arch_ftrace_regs()->regs` for
ftrace_regs_*() APIs because those APIs are for ftrace_regs, not
complete pt_regs.
Signed-off-by: Masami Hiramatsu (Google)
---
inclu
Hi,
Here is the 16th version of the series to re-implement the fprobe on
function-graph tracer. The previous version is;
https://lore.kernel.org/all/172639136989.366111.11359590127009702129.stgit@devnote2/T/#u
This version rebased on for-next branch on linux-trace tree (thus
it is rebased on ftr
There's a long standing issue with having fentry in weak functions that
were overwritten. This was first caught when a "notrace" function was
showing up in the /sys/kernel/tracing/available_filter_functions list.
https://lore.kernel.org/all/20220412094923.0abe90955e5db486b7bca...@kernel.org/
On Mon, 14 Oct 2024 16:14:16 +0200
Petr Pavlu wrote:
> The function ring_buffer_subbuf_order_set() updates each
> ring_buffer_per_cpu and installs new sub buffers that match the requested
> page order. This operation may be invoked concurrently with readers that
> rely on some of the modified dat
On Mon, 14 Oct 2024 14:31:29 -0700
Kees Cook wrote:
>
> We know the destination must have a NUL-terminated string. Is the src
> NUL terminated? Looking at parse_pred(), it seems like no? And we can't
> use memtostr_pad() here because the source buffer size isn't known at
> compile time. Okay then
On Mon, Oct 14, 2024 at 02:13:14PM -0700, Justin Stitt wrote:
> strncpy() is deprecated for use on NUL-terminated destination strings [1] and
> as such we should prefer more robust and less ambiguous string interfaces.
>
> String copy operations involving manual pointer offset and length
> calcula
strncpy() is deprecated for use on NUL-terminated destination strings [1] and
as such we should prefer more robust and less ambiguous string interfaces.
String copy operations involving manual pointer offset and length
calculations followed by explicit NUL-byte assignments are best changed
to eith
On Mon, Oct 14, 2024 at 1:27 PM Andrii Nakryiko
wrote:
>
> On Sun, Oct 13, 2024 at 12:56 AM Shakeel Butt wrote:
> >
> > On Thu, Oct 10, 2024 at 01:56:41PM GMT, Andrii Nakryiko wrote:
> > > From: Suren Baghdasaryan
> > >
> > > Add helper functions to speculatively perform operations without
> > >
On Sun, Oct 13, 2024 at 12:56 AM Shakeel Butt wrote:
>
> On Thu, Oct 10, 2024 at 01:56:41PM GMT, Andrii Nakryiko wrote:
> > From: Suren Baghdasaryan
> >
> > Add helper functions to speculatively perform operations without
> > read-locking mmap_lock, expecting that mmap_lock will not be
> > write-
On Sun, Oct 13, 2024 at 08:26:26PM -0700, Andrew Morton wrote:
> On Sun, 13 Oct 2024 11:43:41 +0300 Mike Rapoport wrote:
>
> > > > The idea is to keep everything together and have execmem_info describe
> > > > all
> > > > that architecture needs.
> > >
> > > But why? That's pretty different f
On 10/14/2024 01:04, Zhuo, Qiuxu wrote:
>> From: Avadhut Naik
>> [...]
>> Subject: [PATCH v5 1/5] x86/mce: Add wrapper for struct mce to export vendor
>> [...]
>> --- a/arch/x86/include/asm/mce.h
>> +++ b/arch/x86/include/asm/mce.h
>> @@ -187,6 +187,14 @@ enum mce_notifier_prios {
>> MCE_P
On Mon, 14 Oct 2024 11:58:25 +0100
Ryan Roberts wrote:
> To prepare for supporting boot-time page size selection, refactor code
> to remove assumptions about PAGE_SIZE being compile-time constant. Code
> intended to be equivalent when compile-time page size is active.
>
> Convert BUILD_BUG_ON()
On Sun, 13 Oct 2024 22:34:49 +0200
Ben Hutchings wrote:
> > Is Debian using out of tree builds Ben?
> [...]
>
> In the linux package specifically, yes, we try to do all builds out-of-
> tree.
Right. Out-of-tree builds is pretty much a must for anything in the Linux
kernel tree.
-- Steve
Sorry, currently I don't have time to even try to read this patch, just
one note below...
On 10/14, Ma Qiao wrote:
>
> @@ -979,6 +980,11 @@ static struct uprobe_cpu_buffer
> *prepare_uprobe_buffer(struct trace_uprobe *tu,
> ucb = uprobe_buffer_get();
> ucb->dsize = tu->tp.size + dsize
On Mon, 14 Oct 2024 14:14:05 +0800
Ma Qiao wrote:
> From: Qiao Ma
>
> Uprobe needs to fetch args into a percpu buffer, and then copy to ring
> buffer to avoid non-atomic context problem.
>
> Sometimes user-space strings, arrays can be very large, but the size of
> percpu buffer is only page si
The function ring_buffer_subbuf_order_set() updates each
ring_buffer_per_cpu and installs new sub buffers that match the requested
page order. This operation may be invoked concurrently with readers that
rely on some of the modified data, such as the head bit (RB_PAGE_HEAD), or
the ring_buffer_per_
On Sun, Oct 13, 2024 at 10:55:25PM -0700, Christoph Hellwig wrote:
> On Sun, Oct 13, 2024 at 11:43:41AM +0300, Mike Rapoport wrote:
> > > But why? That's pretty different from our normal style of arch hooks,
> > > and introduces an indirect call in a security sensitive area.
> >
> > Will change t
To prepare for supporting boot-time page size selection, refactor code
to remove assumptions about PAGE_SIZE being compile-time constant. Code
intended to be equivalent when compile-time page size is active.
Convert BUILD_BUG_ON() BUG_ON() since the argument depends on PAGE_SIZE
and its not trivia
pá 11. 10. 2024 v 19:23 odesílatel Steven Rostedt napsal:
>
> Thanks, I'm applying these, but could you or someone else create a test
> directory in rtla and even rv that tests this code. I just examine it and
> run some basic operations, but I have no idea if it is really working or not.
>
> Havi
so 5. 10. 2024 v 19:21 odesílatel furkanonder
napsal:
>
> The enhancements made to timerlat_load.py focus on improving error
> handling, readability, and overall user experience. These changes aim to
> make the script more robust and easier to maintain while providing clearer
> feedback to users.
On Sun, 13 Oct 2024 at 13:01, syzbot
wrote:
>
> Hello,
>
> syzbot found the following issue on:
>
> HEAD commit:7234e2ea0edd Merge tag 'scsi-fixes' of git://git.kernel.or..
> git tree: upstream
> console output: https://syzkaller.appspot.com/x/log.txt?x=157a085f98
> kernel config: h
44 matches
Mail list logo