lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Sat, 9 Apr 2022 23:06:44 +0800
From:   Chengming Zhou <zhouchengming@...edance.com>
To:     Steven Rostedt <rostedt@...dmis.org>
Cc:     mingo@...hat.com, catalin.marinas@....com, will@...nel.org,
        tglx@...utronix.de, bp@...en8.de, dave.hansen@...ux.intel.com,
        x86@...nel.org, hpa@...or.com, broonie@...nel.org,
        mark.rutland@....com, ardb@...nel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        duanxiongchun@...edance.com, songmuchun@...edance.com
Subject: Re: [External] Re: [PATCH RESEND v3 1/2] ftrace: cleanup
 ftrace_graph_caller enable and disable

On 2022/4/9 22:23, Steven Rostedt wrote:
> On Sat,  9 Apr 2022 16:54:59 +0800
> Chengming Zhou <zhouchengming@...edance.com> wrote:
> 
>> --- a/kernel/trace/ftrace.c
>> +++ b/kernel/trace/ftrace.c
>> @@ -2721,6 +2721,26 @@ int __weak ftrace_arch_code_modify_post_process(void)
>>  	return 0;
>>  }
>>  
>> +#ifdef CONFIG_FUNCTION_GRAPH_TRACER
> 
> Actually, can you put this into fgraph.c instead. That only gets compiled
> if the above config is enabled. Thus, you do not even need to add the
> #ifdef around it.
> 
> I intend to move even more code into fgraph.c that is only for function
> graph. I don't want to add any new code to ftrace.c for it.

Ok, make sense. I will do it.

Thanks.

> 
> -- Steve
> 
> 
>> +/*
>> + * archs can override this function if they must do something
>> + * to enable hook for graph tracer.
>> + */
>> +int __weak ftrace_enable_ftrace_graph_caller(void)
>> +{
>> +	return 0;
>> +}
>> +
>> +/*
>> + * archs can override this function if they must do something
>> + * to disable hook for graph tracer.
>> + */
>> +int __weak ftrace_disable_ftrace_graph_caller(void)
>> +{
>> +	return 0;
>> +}
>> +#endif
>> +
>>  void ftrace_modify_all_code(int command)
>>  {
>>  	int update = command & FTRACE_UPDATE_TRACE_FUNC;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ