Re: [External] Re: [PATCH bpf-next v2 1/9] bpf: tracing: add support to record and check the accessed args

2024-03-30 Thread Andrii Nakryiko
On Sat, Mar 30, 2024 at 10:52 AM Jiri Olsa wrote: > > On Sat, Mar 30, 2024 at 08:27:55AM -0400, Steven Rostedt wrote: > > On Fri, 29 Mar 2024 16:28:33 -0700 > > Andrii Nakryiko wrote: > > > > > I thought I'll just ask instead of digging through code, sorry for > > > being lazy :) Is there any way

Re: [External] Re: [PATCH bpf-next v2 1/9] bpf: tracing: add support to record and check the accessed args

2024-03-30 Thread Steven Rostedt
On Sat, 30 Mar 2024 11:18:29 +0800 梦龙董 wrote: > > If you really want to have thousands of functions, why not just register it > > with ftrace itself. It will give you the arguments via the ftrace_regs > > structure. Can't you just register a program as the callback? > > > > Ennn...I don't unde

Re: [External] Re: [PATCH bpf-next v2 1/9] bpf: tracing: add support to record and check the accessed args

2024-03-30 Thread Jiri Olsa
On Sat, Mar 30, 2024 at 08:27:55AM -0400, Steven Rostedt wrote: > On Fri, 29 Mar 2024 16:28:33 -0700 > Andrii Nakryiko wrote: > > > I thought I'll just ask instead of digging through code, sorry for > > being lazy :) Is there any way to pass pt_regs/ftrace_regs captured > > before function execut

[PATCH 3/3] selftests/mm: mremap_test: Use sscanf to parse /proc/self/maps

2024-03-30 Thread Dev Jain
Enforce consistency across files by avoiding two separate functions to parse /proc/self/maps, replacing them with a simple sscanf(). Signed-off-by: Dev Jain --- tools/testing/selftests/mm/mremap_test.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tools/

[PATCH 1/3] selftests/mm: mremap_test: Optimize using pre-filled random array and memcpy

2024-03-30 Thread Dev Jain
Allocate a pre-filled random buffer using the seed. Replace iterative copying of the random sequence to buffers using the highly optimized library function memcpy(). Signed-off-by: Dev Jain --- tools/testing/selftests/mm/mremap_test.c | 78 1 file changed, 53 insertions(

[PATCH 2/3] selftests/mm: mremap_test: Optimize execution time from minutes to seconds using chunkwise memcmp

2024-03-30 Thread Dev Jain
Mismatch index is currently being checked by a brute force iteration over the buffer. Instead, break the comparison into O(sqrt(n)) number of chunks, with the chunk size of this order only, where n is the size of the buffer. Do a brute-force iteration to print to stdout only when the highly optimiz

[PATCH 0/3] selftests/mm: mremap_test: Optimizations and style fixes

2024-03-30 Thread Dev Jain
The mremap_test, in a worst case controlled by the -t flag, does a for loop iteration in orders of GB. Without compromising on the stdout report, the aim is to reduce this time. A pre-filled random buffer is allocated based on the seed, replacing repetitive rand() calls. The byte pattern in the me

Re: [External] Re: [PATCH bpf-next v2 1/9] bpf: tracing: add support to record and check the accessed args

2024-03-30 Thread Steven Rostedt
On Fri, 29 Mar 2024 16:28:33 -0700 Andrii Nakryiko wrote: > I thought I'll just ask instead of digging through code, sorry for > being lazy :) Is there any way to pass pt_regs/ftrace_regs captured > before function execution to a return probe (fexit/kretprobe)? I.e., > how hard is it to pass inpu

Re: [PATCH v3] selftests: x86: skip the tests if prerequisites aren't fulfilled

2024-03-30 Thread Ingo Molnar
* Shuah Khan wrote: > On 3/29/24 01:36, Ingo Molnar wrote: > > > > * Shuah Khan wrote: > > > > > On 3/27/24 05:17, Muhammad Usama Anjum wrote: > > > > Skip instead of failing when prerequisite conditions aren't fulfilled, > > > > such as invalid xstate values etc. This patch would make the t