Re: [PATCH v2 2/7] error-injection: support static keys around injectable functions

2024-06-25 Thread Steven Rostedt
->etype = iter->etype; > + ent->key = (struct static_key *) iter->static_key_addr; Nit, should there be a space between the typecast and the "iter"? > ent->priv = priv; > INIT_LIST_HEAD(&ent->list); > list_

Re: [PATCH v2 1/7] fault-inject: add support for static keys around fault injection sites

2024-06-25 Thread Steven Rostedt
On Thu, 20 Jun 2024 00:48:55 +0200 Vlastimil Babka wrote: > +static int debugfs_prob_set(void *data, u64 val) > +{ > + struct fault_attr *attr = data; > + > + mutex_lock(&probability_mutex); > + > + if (attr->active) { > + if (attr->probability != 0 && val == 0) { > +

Re: [PATCH] filemap: add trace events for get_pages, map_pages, and fault

2024-06-18 Thread Steven Rostedt
ap_pages | sort -u |wc -l 6 Note, ureadahead ignores duplicate pages. If these new events really do only show what is used and not what is just pulled in, and doesn't miss anything, I can see it bringing down the number of pages needed to be saved dramatically. Reviewed-by: Steven Rostedt (Google) -- Steve

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-18 Thread Steven Rostedt
On Tue, 18 Jun 2024 13:47:49 +0200 Alexander Graf wrote: > IMHO the big fat disclaimer should be in the argument name. > "reserve_mem" to me sounds like it actually guarantees a reservation - > which it doesn't. Can we name it more along the lines of "debug" (to > indicate it's not for product

Re: [PATCH v6 1/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-18 Thread Steven Rostedt
On Tue, 18 Jun 2024 20:55:17 +0800 Zhengyejian wrote: > > + start = memblock_phys_alloc(size, align); > > + if (!start) > > + return -ENOMEM; > > + > > + reserved_mem_add(start, size, name); > > + > > + return 0; > > Hi, steve, should here return 1 ? Other __setup functions >

Re: Bug in Kernel 6.8.x, 6.9.x Causing Trace/Panic During Shutdown/Reboot

2024-06-18 Thread Steven Rostedt
On Thu, 13 Jun 2024 10:32:24 +0300 Ilkka Naulapää wrote: > ok, so if you don't have any idea where this bug is after those debug > patches, I'll try to find some time to bisect it as a last resort. > Stay tuned. FYI, I just debugged a strange crash that was caused by my config having something

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-17 Thread Steven Rostedt
On Mon, 17 Jun 2024 23:01:12 +0200 Alexander Graf wrote: > > This could be an added feature, but it is very architecture specific, > > and would likely need architecture specific updates. > > > It definitely would be an added feature, yes. But one that allows you to > ensure persistence a lot

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-17 Thread Steven Rostedt
On Mon, 17 Jun 2024 09:07:29 +0200 Alexander Graf wrote: > Hey Steve, > > > I believe we're talking about 2 different things :). Let me rephrase a > bit and make a concrete example. > > Imagine you have passed the "reserve_mem=12M:4096:trace" kernel command > line option. The kernel now come

Re: [PATCH v4 1/3] kbuild: add mod(name,file)_flags to assembler flags for module objects

2024-06-14 Thread Steven Rostedt
On Fri, 14 Jun 2024 14:10:58 -0400 Kris Van Hees wrote: > On Fri, Jun 14, 2024 at 01:46:51PM -0400, Steven Rostedt wrote: > > On Fri, 14 Jun 2024 13:14:26 -0400 > > Kris Van Hees wrote: > > > > > Module objects compiled from C source can be ident

Re: [PATCH v4 1/3] kbuild: add mod(name,file)_flags to assembler flags for module objects

2024-06-14 Thread Steven Rostedt
On Fri, 14 Jun 2024 13:14:26 -0400 Kris Van Hees wrote: > Module objects compiled from C source can be identified by the presence > of -DKBUILD_MODFILE and -DKBUILD_MODNAME on their compile command lines. > However, module objects from assembler source do not have this defines. > > Add $(modfile

[PATCH v7 1/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-13 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In order to allow for requesting a memory region that can be used for things like pstore on multiple machines where the memory layout is not the same, add a new option to the kernel command line called "reserve_mem". The format is: reser

[PATCH v7 2/2] pstore/ramoops: Add ramoops.mem_name= command line option

2024-06-13 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a method to find a region specified by reserve_mem=nn:align:name for ramoops. Adding a kernel command line parameter: reserve_mem=12M:4096:oops ramoops.mem_name=oops Will use the size and location defined by the memmap parameter where it finds

[PATCH v7 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-13 Thread Steven Rostedt
is.org/ - Updated the change log of the first patch as well as added an entry into kernel-parameters.txt about how reserve_mem is for soft reboots and may not be reliable. Steven Rostedt (Google) (2): mm/memblock: Add "reserve_mem" to reserved named memory at boot up

Re: [PATCH] linux++: delete some forward declarations

2024-06-13 Thread Steven Rostedt
On Thu, 13 Jun 2024 14:21:10 -0700 Andrew Morton wrote: > On Thu, 13 Jun 2024 16:10:12 -0400 Steven Rostedt wrote: > > > > And... I'm a bit surprised that forward declarations are allowed in C. > > > A billion years ago I used a C compiler which would use 16

Re: [PATCH] linux++: delete some forward declarations

2024-06-13 Thread Steven Rostedt
On Thu, 13 Jun 2024 22:22:18 +0300 Alexey Dobriyan wrote: > g++ doesn't like forward enum declarations: > > error: use of enum ‘E’ without previous declaration > 64 | enum E; But we don't care about g++. Do we? I would make that a separate patch. > > Delete those which aren't

Re: [PATCH] linux++: delete some forward declarations

2024-06-13 Thread Steven Rostedt
On Thu, 13 Jun 2024 13:04:20 -0700 Andrew Morton wrote: > On Thu, 13 Jun 2024 15:34:02 -0400 Steven Rostedt wrote: > > > On Thu, 13 Jun 2024 22:22:18 +0300 > > Alexey Dobriyan wrote: > > > > > g++ doesn't like forward enum declarations: > &g

Re: [PATCH v6 2/2] pstore/ramoops: Add ramoops.mem_name= command line option

2024-06-13 Thread Steven Rostedt
On Thu, 13 Jun 2024 15:19:50 -0300 "Guilherme G. Piccoli" wrote: > > + > > + reserver_mem=2M:4096:oops ramoops.mem_name=oops > > + > > Likely this could be fixed on merge, to avoid another version, but... > > s/reserver_mem/reserve_mem That 'r' is my nemesis! Almost every time I type "res

[PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-13 Thread Steven Rostedt
- Added EXPORT_SYMBOL_GPL() for reserve_mem_find_by_name() - Removed "built-in" from module description that was changed from v1. Changes since v1: https://lore.kernel.org/all/2024060320.801075...@goodmis.org/ - Updated the change log of the first patch as well as added an entry into

Re: [PATCH v6 0/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-13 Thread Steven Rostedt
On Thu, 13 Jun 2024 18:54:12 +0200 Alexander Graf wrote: > > Do you have a "real" pstore on these systems that you could store > non-volatile variables in, such as persistent UEFI variables? If so, you > could create an actually persistent mapping for your trace pstore even > across kernel ve

Re: [PATCH v4 01/35] ftrace: Unpoison ftrace_regs in ftrace_ops_list_func()

2024-06-13 Thread Steven Rostedt
ping a stale partially > unpoisoned stack frame. Poisoning stack frames before returns [1] > makes the issue appear on x86_64 as well. > > [1] > https://github.com/iii-i/llvm-project/commits/msan-poison-allocas-before-returning-2024-06-12/ > > Reviewed-by: Alexander Potapenko &g

[PATCH v6 1/2] mm/memblock: Add "reserve_mem" to reserved named memory at boot up

2024-06-13 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In order to allow for requesting a memory region that can be used for things like pstore on multiple machines where the memory layout is not the same, add a new option to the kernel command line called "reserve_mem". The format is: reser

[PATCH v6 2/2] pstore/ramoops: Add ramoops.mem_name= command line option

2024-06-13 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a method to find a region specified by reserve_mem=nn:align:name for ramoops. Adding a kernel command line parameter: reserve_mem=12M:4096:oops ramoops.mem_name=oops Will use the size and location defined by the memmap parameter where it finds

[PATCH] function_graph: Add READ_ONCE() when accessing fgraph_array[]

2024-06-13 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In function_graph_enter() there's a loop that looks at fgraph_array[] elements which are fgraph_ops. It first tests if it is a fgraph_stub op, and if so skips it, as that's just there as a place holder. Then it checks the fgraph_ops filters to

Re: [PATCH 2/8] tracing: do not trace kernel_text_address()

2024-06-13 Thread Steven Rostedt
On Thu, 13 Jun 2024 15:11:07 +0800 Andy Chiu wrote: > kernel_text_address() and __kernel_text_address() are called in > arch_stack_walk() of riscv. This results in excess amount of un-related > traces when the kernel is compiled with CONFIG_TRACE_IRQFLAGS. The > situation worsens when function_gr

[PATCH v6 12/13] tracing: Update function tracing output for previous boot buffer

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" For a persistent ring buffer that is saved across boots, if function tracing was performed in the previous boot, it only saves the address of the functions and uses "%pS" to print their names. But the current boot, those functions may be in

[PATCH v6 13/13] tracing: Add last boot delta offset for stack traces

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The addresses of a stack trace event are relative to the kallsyms. As that can change between boots, when printing the stack trace from a buffer that was from the last boot, it needs all the addresses to be added to the "text_delta" that giv

[PATCH v6 11/13] tracing: Handle old buffer mappings for event strings and functions

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Use the saved text_delta and data_delta of a persistent memory mapped ring buffer that was saved from a previous boot, and use the delta in the trace event print output so that strings and functions show up normally. That is, for an event like tra

[PATCH v6 10/13] tracing/ring-buffer: Add last_boot_info file to boot instance

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" If an instance is mapped to memory on boot up, create a new file called "last_boot_info" that will hold information that can be used to properly parse the raw data in the ring buffer. It will export the delta of the addresses for text and d

[PATCH v6 08/13] tracing: Add option to use memmapped memory for trace boot instance

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add an option to the trace_instance kernel command line parameter that allows it to use the reserved memory from memmap boot parameter. memmap=12M$0x28450 trace_instance=boot_mapped@0x28450:12M The above will reserves 12 megs at the physic

[PATCH v6 09/13] ring-buffer: Save text and data locations in mapped meta data

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" When a ring buffer is mapped to a specific address, save the address of a text function and some data. This will be used to determine the delta between the last boot and the current boot for pointers to functions as well as to data. Signed-off-by: Stev

[PATCH v6 06/13] ring-buffer: Add test if range of boot buffer is valid

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a test against the ring buffer memory range to see if it has valid data. The ring_buffer_meta structure is given a new field called "first_buffer" which holds the address of the first sub-buffer. This is used to both determine if the other

[PATCH v6 07/13] ring-buffer: Validate boot range memory events

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Make sure all the events in each of the sub-buffers that were mapped in a memory region are valid. This moves the code that walks the buffers for time-stamp validation out of the CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS ifdef block and is used to va

[PATCH v6 05/13] ring-buffer: Add output of ring buffer meta page

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a buffer_meta per-cpu file for the trace instance that is mapped to boot memory. This shows the current meta-data and can be used by user space tools to record off the current mappings to help reconstruct the ring buffer after a reboot. It does not

[PATCH v6 03/13] ring-buffer: Add ring_buffer_meta data

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Populate the ring_buffer_meta array. It holds the pointer to the head_buffer (next to read), the commit_buffer (next to write) the size of the sub-buffers, number of sub-buffers and an array that keeps track of the order of the sub-buffers. This inform

[PATCH v6 04/13] tracing: Implement creating an instance based on a given memory region

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Allow for creating a new instance by passing in an address and size to map the ring buffer for the instance to. This will allow features like a pstore memory mapped region to be used for an tracing instance ring buffer that can be retrieved from one b

[PATCH v6 02/13] ring-buffer: Add ring_buffer_alloc_range()

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In preparation to allowing the trace ring buffer to be allocated in a range of memory that is persistent across reboots, add ring_buffer_alloc_range(). It takes a contiguous range of memory and will split it up evenly for the per CPU ring buffers. If t

[PATCH v6 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-12 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In preparation for having the ring buffer mapped to a dedicated location, which will have the same restrictions as user space memory mapped buffers, allow it to use the "mapped" field of the ring_buffer_per_cpu structure without having the

[PATCH v6 00/13] tracing: Persistent traces across a reboot or crash

2024-06-12 Thread Steven Rostedt
code. - Added hard coded address to map to (from memmap=nn$ss), instead of relying on using reserve_mem (which I still want to add). - Updated comments - Restructured the validate code as the previous version broke the ring buffer timestamp validation code. Steven Rostedt (Google) (13):

Re: [PATCH 05/14] tracefs: replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-06-12 Thread Steven Rostedt
On Wed, 12 Jun 2024 16:09:40 +0200 "Jason A. Donenfeld" wrote: > > > > I think "Depends-on" is the way to go, as it is *not* a stable thing, and > > what is in stable rules is only about stable patches. > > How does "Depends-on" not spiral out of control? There's a *lot* of > "Depends-on" rela

Re: Bug in Kernel 6.8.x, 6.9.x Causing Trace/Panic During Shutdown/Reboot

2024-06-12 Thread Steven Rostedt
e previous one is needed > > also, let me know and I'll rerun it. > > > > --Ilkka > > > > On Thu, May 30, 2024 at 5:00 PM Steven Rostedt wrote: > > > >> > >> On Thu, 30 May 2024 16:02:37 +0300 > >> Ilkka Naulapää wrote: >

Re: [PATCH v5 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-12 Thread Steven Rostedt
On Tue, 11 Jun 2024 22:16:43 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > In preparation for having the ring buffer mapped to a dedicated location, > which will have the same restrictions as user space memory mapped buffers, > allow it to use

[PATCH v5 13/13] tracing: Add last boot delta offset for stack traces

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The addresses of a stack trace event are relative to the kallsyms. As that can change between boots, when printing the stack trace from a buffer that was from the last boot, it needs all the addresses to be added to the "text_delta" that giv

[PATCH v5 10/13] tracing/ring-buffer: Add last_boot_info file to boot instance

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" If an instance is mapped to memory on boot up, create a new file called "last_boot_info" that will hold information that can be used to properly parse the raw data in the ring buffer. It will export the delta of the addresses for text and d

[PATCH v5 12/13] tracing: Update function tracing output for previous boot buffer

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" For a persistent ring buffer that is saved across boots, if function tracing was performed in the previous boot, it only saves the address of the functions and uses "%pS" to print their names. But the current boot, those functions may be in

[PATCH v5 11/13] tracing: Handle old buffer mappings for event strings and functions

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Use the saved text_delta and data_delta of a persistent memory mapped ring buffer that was saved from a previous boot, and use the delta in the trace event print output so that strings and functions show up normally. That is, for an event like tra

[PATCH v5 09/13] ring-buffer: Save text and data locations in mapped meta data

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" When a ring buffer is mapped to a specific address, save the address of a text function and some data. This will be used to determine the delta between the last boot and the current boot for pointers to functions as well as to data. Signed-off-by: Stev

[PATCH v5 08/13] tracing: Add option to use memmapped memory for trace boot instance

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add an option to the trace_instance kernel command line parameter that allows it to use the reserved memory from memmap boot parameter. memmap=12M$0x28450 trace_instance=boot_mapped@0x28450:12M The above will reserves 12 megs at the physic

[PATCH v5 07/13] ring-buffer: Validate boot range memory events

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Make sure all the events in each of the sub-buffers that were mapped in a memory region are valid. This moves the code that walks the buffers for time-stamp validation out of the CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS ifdef block and is used to va

[PATCH v5 06/13] ring-buffer: Add test if range of boot buffer is valid

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a test against the ring buffer memory range to see if it has valid data. The ring_buffer_meta structure is given a new field called "first_buffer" which holds the address of the first sub-buffer. This is used to both determine if the other

[PATCH v5 05/13] ring-buffer: Add output of ring buffer meta page

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a buffer_meta per-cpu file for the trace instance that is mapped to boot memory. This shows the current meta-data and can be used by user space tools to record off the current mappings to help reconstruct the ring buffer after a reboot. It does not

[PATCH v5 04/13] tracing: Implement creating an instance based on a given memory region

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Allow for creating a new instance by passing in an address and size to map the ring buffer for the instance to. This will allow features like a pstore memory mapped region to be used for an tracing instance ring buffer that can be retrieved from one b

[PATCH v5 03/13] ring-buffer: Add ring_buffer_meta data

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Populate the ring_buffer_meta array. It holds the pointer to the head_buffer (next to read), the commit_buffer (next to write) the size of the sub-buffers, number of sub-buffers and an array that keeps track of the order of the sub-buffers. This inform

[PATCH v5 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In preparation for having the ring buffer mapped to a dedicated location, which will have the same restrictions as user space memory mapped buffers, allow it to use the "mapped" field of the ring_buffer_per_cpu structure without having the

[PATCH v5 00/13] tracing: Persistent traces across a reboot or crash

2024-06-11 Thread Steven Rostedt
o map to (from memmap=nn$ss), instead of relying on using reserve_mem (which I still want to add). - Updated comments - Restructured the validate code as the previous version broke the ring buffer timestamp validation code. Steven Rostedt (Google) (13): ring-buffer: Allow mapped field

[PATCH v5 02/13] ring-buffer: Add ring_buffer_alloc_range()

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In preparation to allowing the trace ring buffer to be allocated in a range of memory that is persistent across reboots, add ring_buffer_alloc_range(). It takes a contiguous range of memory and will split it up evenly for the per CPU ring buffers. If t

Re: [PATCH v4 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Steven Rostedt
On Tue, 11 Jun 2024 21:39:37 -0400 Steven Rostedt wrote: > > > > Maybe explain why sometimes __rb_inc_dec_mapped() is called to > > increment or decrement ->mapped, and sometimes it id done directly ? > > I can see that the function also acquires the buffer mutex, wh

Re: [PATCH v4 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Steven Rostedt
On Tue, 11 Jun 2024 16:53:43 -0700 Guenter Roeck wrote: > >>> @@ -6403,7 +6407,8 @@ int ring_buffer_unmap(struct trace_buffer *buffer, > >>> int cpu) > >>> mutex_lock(&buffer->mutex); > >>> raw_spin_lock_irqsave(&cpu_buffer->reader_lock, flags); > >>> > >>> - cpu_buffer->

Re: [PATCH 3/3] tracing/kprobe: Remove cleanup code unrelated to selftest

2024-06-11 Thread Steven Rostedt
the generated events are cleaned up. > And if not, we cannot guarantee that the kprobe events will work > correctly. So, anyway, there is no need to clean it up. > > Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) -- Steve

Re: [PATCH v4 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Steven Rostedt
On Tue, 11 Jun 2024 15:43:59 -0700 Guenter Roeck wrote: > On 6/11/24 12:28, Steven Rostedt wrote: > > From: "Steven Rostedt (Google)" > > > > In preparation for having the ring buffer mapped to a dedicated location, > > which will have the same restriction

[PATCH v4 13/13] tracing: Add last boot delta offset for stack traces

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The addresses of a stack trace event are relative to the kallsyms. As that can change between boots, when printing the stack trace from a buffer that was from the last boot, it needs all the addresses to be added to the "text_delta" that giv

[PATCH v4 11/13] tracing: Handle old buffer mappings for event strings and functions

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Use the saved text_delta and data_delta of a persistent memory mapped ring buffer that was saved from a previous boot, and use the delta in the trace event print output so that strings and functions show up normally. That is, for an event like tra

[PATCH v4 12/13] tracing: Update function tracing output for previous boot buffer

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" For a persistent ring buffer that is saved across boots, if function tracing was performed in the previous boot, it only saves the address of the functions and uses "%pS" to print their names. But the current boot, those functions may be in

[PATCH v4 10/13] tracing/ring-buffer: Add last_boot_info file to boot instance

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" If an instance is mapped to memory on boot up, create a new file called "last_boot_info" that will hold information that can be used to properly parse the raw data in the ring buffer. It will export the delta of the addresses for text and d

[PATCH v4 08/13] tracing: Add option to use memmapped memory for trace boot instance

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add an option to the trace_instance kernel command line parameter that allows it to use the reserved memory from memmap boot parameter. memmap=12M$0x28450 trace_instance=boot_mapped@0x28450:12M The above will reserves 12 megs at the physic

[PATCH v4 09/13] ring-buffer: Save text and data locations in mapped meta data

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" When a ring buffer is mapped to a specific address, save the address of a text function and some data. This will be used to determine the delta between the last boot and the current boot for pointers to functions as well as to data. Signed-off-by: Stev

[PATCH v4 07/13] ring-buffer: Validate boot range memory events

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Make sure all the events in each of the sub-buffers that were mapped in a memory region are valid. This moves the code that walks the buffers for time-stamp validation out of the CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS ifdef block and is used to va

[PATCH v4 06/13] ring-buffer: Add test if range of boot buffer is valid

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a test against the ring buffer memory range to see if it has valid data. The ring_buffer_meta structure is given a new field called "first_buffer" which holds the address of the first sub-buffer. This is used to both determine if the other

[PATCH v4 05/13] ring-buffer: Add output of ring buffer meta page

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add a buffer_meta per-cpu file for the trace instance that is mapped to boot memory. This shows the current meta-data and can be used by user space tools to record off the current mappings to help reconstruct the ring buffer after a reboot. It does not

[PATCH v4 03/13] ring-buffer: Add ring_buffer_meta data

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Populate the ring_buffer_meta array. It holds the pointer to the head_buffer (next to read), the commit_buffer (next to write) the size of the sub-buffers, number of sub-buffers and an array that keeps track of the order of the sub-buffers. This inform

[PATCH v4 02/13] ring-buffer: Add ring_buffer_alloc_range()

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In preparation to allowing the trace ring buffer to be allocated in a range of memory that is persistent across reboots, add ring_buffer_alloc_range(). It takes a contiguous range of memory and will split it up evenly for the per CPU ring buffers. If t

[PATCH v4 04/13] tracing: Implement creating an instance based on a given memory region

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Allow for creating a new instance by passing in an address and size to map the ring buffer for the instance to. This will allow features like a pstore memory mapped region to be used for an tracing instance ring buffer that can be retrieved from one b

[PATCH v4 01/13] ring-buffer: Allow mapped field to be set without mapping

2024-06-11 Thread Steven Rostedt
From: "Steven Rostedt (Google)" In preparation for having the ring buffer mapped to a dedicated location, which will have the same restrictions as user space memory mapped buffers, allow it to use the "mapped" field of the ring_buffer_per_cpu structure without having the

[PATCH v4 00/13] tracing: Persistent traces across a reboot or crash

2024-06-11 Thread Steven Rostedt
ress to map to (from memmap=nn$ss), instead of relying on using reserve_mem (which I still want to add). - Updated comments - Restructured the validate code as the previous version broke the ring buffer timestamp validation code. Steven Rostedt (Google) (13): ring-buffer: Allow mapped fie

Re: [PATCH v3 3/3] tracing/kprobe: Remove cleanup code unrelated to selftest

2024-06-11 Thread Steven Rostedt
the generated events are cleaned up. > And if not, we cannot guarantee that the kprobe events will work > correctly. So, anyway, there is no need to clean it up. > > Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) -- Steve > --- > kernel/trace/t

Re: [PATCH v3 2/3] tracing/kprobe: Integrate test warnings into WARN_ONCE

2024-06-11 Thread Steven Rostedt
s makes it easy to handle errors from ktest. > > Suggested-by: Steven Rostedt > Signed-off-by: Masami Hiramatsu (Google) > --- > Changes in v3: > - integrate WARN_ON_ONCE() and pr_warn() instead of remove > WARN_ONCE(). Reviewed-by: Steven Rostedt (Google) -- Steve

Re: [PATCH v6 3/3] sched/rt: Rename realtime_{prio, task}() to rt_or_dl_{prio, task}()

2024-06-11 Thread Steven Rostedt
On Tue, 11 Jun 2024 11:03:25 +0200 Daniel Bristot de Oliveira wrote: > On 6/10/24 21:20, Qais Yousef wrote: > > - if (realtime_prio(p->prio)) /* includes deadline */ > > + if (rt_or_dl_prio(p->prio)) > > that is it... no thinking, no recall, no comment, no confusion... How about "not_norm

Re: [PATCH 05/14] tracefs: replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-06-11 Thread Steven Rostedt
On Tue, 11 Jun 2024 10:42:28 +0200 Vlastimil Babka wrote: > AFAICS that documented way is for a different situation? I assume you mean > this part: > > * Specify any additional patch prerequisites for cherry picking:: > > Cc: # 3.3.x: a1f84a3: sched: Check for idle > > But that would assu

Re: [PATCH 05/14] tracefs: replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-06-11 Thread Steven Rostedt
On Tue, 11 Jun 2024 08:23:11 +0200 Greg KH wrote: > > Depends-on: c9929f0e344a ("mm/slob: remove CONFIG_SLOB") > > Ick, no, use the documented way of handling this as described in the > stable kernel rules file. You mentioned this before, I guess you mean this: > To send additional instructi

Re: [PATCH 2/3] tracing/kprobe: Remove unneeded WARN_ON_ONCE() in selftests

2024-06-10 Thread Steven Rostedt
On Tue, 11 Jun 2024 06:26:44 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Since the kprobe-events selftest shows OK or NG with the reason, the > WARN_ON_ONCE()s for each place are redundant. Let's remove it. > > Signed-off-by: Masami Hiramatsu (Google) > ---

Re: [PATCH -next 2/2] ftrace: Add kernel-doc comments for unregister_ftrace_direct() function

2024-06-10 Thread Steven Rostedt
On Fri, 7 Jun 2024 16:49:57 +0800 Yang Li wrote: > Added kernel-doc comments for the unregister_ftrace_direct() function to > improve code documentation and readability. > Someone else beat you to this. -- Steve > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cg

Re: [PATCH -next 1/2] function_graph: Add kernel-doc comments for ftrace_graph_ret_addr() function

2024-06-10 Thread Steven Rostedt
On Fri, 7 Jun 2024 16:49:56 +0800 Yang Li wrote: > Added kernel-doc comments for the ftrace_graph_ret_addr() function to > improve code documentation and readability. > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=9299 > Signed-off-by: Yang Li > --- > k

Re: [PATCH 1/3] tracing: Build event generation tests only as modules

2024-06-10 Thread Steven Rostedt
because those > are designed for playing as modules. > > If we make those modules as built-in, those events are left locked in the > kernel, and never be removed. This causes kprobe event self-test failure > as below. Reviewed-by: Steven Rostedt (Google) -- Steve

Re: [PATCH 2/3] tracing/kprobe: Remove unneeded WARN_ON_ONCE() in selftests

2024-06-10 Thread Steven Rostedt
On Tue, 11 Jun 2024 06:26:44 +0900 "Masami Hiramatsu (Google)" wrote: > From: Masami Hiramatsu (Google) > > Since the kprobe-events selftest shows OK or NG with the reason, the > WARN_ON_ONCE()s for each place are redundant. Let's remove it. Note, the ktests we run to validate commits, fail wh

Re: [PATCH 05/14] tracefs: replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-06-10 Thread Steven Rostedt
On Mon, 10 Jun 2024 22:42:30 +0200 Vlastimil Babka wrote: > On 6/10/24 5:46 PM, Paul E. McKenney wrote: > > On Mon, Jun 10, 2024 at 11:22:23AM -0400, Steven Rostedt wrote: > >> On Sun, 9 Jun 2024 10:27:17 +0200 > >> Julia Lawall wrote: > >> > &g

Re: [PATCH 05/14] tracefs: replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-06-10 Thread Steven Rostedt
a kmalloc()? > > A recent change to kfree() allows it to correctly handle memory allocated > via kmem_cache_alloc(). News to me as of a few weeks ago. ;-) If that's the case then: Acked-by: Steven Rostedt (Google) Do we have a way to add a "Depends-on" tag so that anyone backporting this will know that it requires the change to whatever allowed that to happen? Or we need to update the change log to explicitly state that this should *not* be backported. -- Steve

Re: [PATCH 0/3] tracing: Fix some selftest issues

2024-06-10 Thread Steven Rostedt
On Mon, 10 Jun 2024 11:10:01 +0900 Masami Hiramatsu (Google) wrote: > > But you don't explain what exactly the conflict is. What about those > > events causes kprobe selftests to fail? > > I also found another problem on these modules. These modules get trace > event file references to prevent

Re: [RFC v3 net-next 1/7] net: add rx_sk to trace_kfree_skb

2024-06-10 Thread Steven Rostedt
On Thu, 6 Jun 2024 10:37:46 -0500 Yan Zhai wrote: > > name: kfree_skb > > ID: 1799 > > format: > > field:unsigned short common_type; offset:0; size:2; > > signed:0; > > field:unsigned char common_flags; offset:2; size:1; > > signed:0; > > field:un

Re: [PATCH 2/2] ring-buffer: Fix a race between readers and resize checks

2024-06-10 Thread Steven Rostedt
On Fri, 7 Jun 2024 10:29:03 +0200 Petr Pavlu wrote: > Another option could be to try traversing the whole list in smaller > parts and give up the reader_lock in between them. This would need some > care to make sure that the operation completes, e.g. the code would need > to bail out if it detect

Re: [PATCH 05/14] tracefs: replace call_rcu by kfree_rcu for simple kmem_cache_free callback

2024-06-10 Thread Steven Rostedt
On Sun, 9 Jun 2024 10:27:17 +0200 Julia Lawall wrote: > diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c > index 7c29f4afc23d..338c52168e61 100644 > --- a/fs/tracefs/inode.c > +++ b/fs/tracefs/inode.c > @@ -53,14 +53,6 @@ static struct inode *tracefs_alloc_inode(struct > super_block *sb) >

Re: [PATCHv7 bpf-next 0/9] uprobe: uretprobe speed up

2024-06-10 Thread Steven Rostedt
On Wed, 5 Jun 2024 09:42:45 -0700 Andrii Nakryiko wrote: > Another ping. It's been two weeks since Jiri posted the last revision > that got no more feedback to be addressed and everyone seems to be > happy with it. Sorry, there's been a lot going on. > > This is an important speed up improveme

Re: [RFC PATCH] ftrace: Skip __fentry__ location of overridden weak functions

2024-06-07 Thread Steven Rostedt
On Fri, 7 Jun 2024 17:02:28 +0200 Peter Zijlstra wrote: > > There may be following resolutions: > > Oh gawd, sodding weak functions again. > > I would suggest changing scipts/kallsyms.c to emit readily identifiable > symbol names for all the weak junk, eg: > > __weak_junk_N > > That i

[PATCH] function_graph: Make fgraph_update_pid_func() a stub for !DYNAMIC_FTRACE

2024-06-07 Thread Steven Rostedt
From: "Steven Rostedt (Google)" When CONFIG_DYNAMIC_FTRACE is not set, the function fgraph_update_pid_func() doesn't do anything. Currently, most of its logic is within a "#ifdef CONFIG_DYNAMIC_FTRACE" block, but its variables were declared outside that, and when DYNA

Re: [PATCH v3 08/13] tracing: Add option to use memmapped memory for trace boot instance

2024-06-06 Thread Steven Rostedt
Memory management folks. Please review this patch. Specifically the "map_pages()" function below. On Thu, 06 Jun 2024 17:17:43 -0400 Steven Rostedt wrote: > From: "Steven Rostedt (Google)" > > Add an option to the trace_instance kernel command line paramete

[PATCH v3 10/13] tracing/ring-buffer: Add last_boot_info file to boot instance

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" If an instance is mapped to memory on boot up, create a new file called "last_boot_info" that will hold information that can be used to properly parse the raw data in the ring buffer. It will export the delta of the addresses for text and d

[PATCH v3 13/13] tracing: Add last boot delta offset for stack traces

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" The addresses of a stack trace event are relative to the kallsyms. As that can change between boots, when printing the stack trace from a buffer that was from the last boot, it needs all the addresses to be added to the "text_delta" that giv

[PATCH v3 09/13] ring-buffer: Save text and data locations in mapped meta data

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" When a ring buffer is mapped to a specific address, save the address of a text function and some data. This will be used to determine the delta between the last boot and the current boot for pointers to functions as well as to data. Signed-off-by: Stev

[PATCH v3 12/13] tracing: Update function tracing output for previous boot buffer

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" For a persistent ring buffer that is saved across boots, if function tracing was performed in the previous boot, it only saves the address of the functions and uses "%pS" to print their names. But the current boot, those functions may be in

[PATCH v3 11/13] tracing: Handle old buffer mappings for event strings and functions

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Use the saved text_delta and data_delta of a persistent memory mapped ring buffer that was saved from a previous boot, and use the delta in the trace event print output so that strings and functions show up normally. That is, for an event like tra

[PATCH v3 08/13] tracing: Add option to use memmapped memory for trace boot instance

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Add an option to the trace_instance kernel command line parameter that allows it to use the reserved memory from memmap boot parameter. memmap=12M$0x28450 trace_instance=boot_mapped@0x28450:12M The above will reserves 12 megs at the physic

[PATCH v3 07/13] ring-buffer: Validate boot range memory events

2024-06-06 Thread Steven Rostedt
From: "Steven Rostedt (Google)" Make sure all the events in each of the sub-buffers that were mapped in a memory region are valid. This moves the code that walks the buffers for time-stamp validation out of the CONFIG_RING_BUFFER_VALIDATE_TIME_DELTAS ifdef block and is used to va

<    1   2   3   4   5   6   7   8   9   10   >