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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 6 Jun 2017 11:06:41 -0600
From:   Shuah Khan <shuah@...nel.org>
To:     Steven Rostedt <rostedt@...dmis.org>,
        "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
Cc:     Michael Ellerman <mpe@...erman.id.au>,
        linux-kernel@...r.kernel.org, linux-kselftest@...r.kernel.org,
        Shuah Khan <shuah@...nel.org>
Subject: Re: [PATCH 2/4] ftrace/instances: Clear function triggers when
 removing instances

On 05/16/2017 12:33 PM, Steven Rostedt wrote:
> On Tue, 16 May 2017 23:14:23 +0530
> "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com> wrote:
> 
>> On 2017/05/16 07:31PM, Naveen N. Rao wrote:
>>> On 2017/05/15 10:20PM, Steven Rostedt wrote:  
>>>> On Sun, 14 May 2017 01:01:02 +0530
>>>> "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com> wrote:
>>>>   
>>>
>>> [snip]
>>>   
>>>>> diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
>>>>> index c4536c449021..3f2aed4ad1ed 100644
>>>>> --- a/kernel/trace/trace.c
>>>>> +++ b/kernel/trace/trace.c
>>>>> @@ -7550,6 +7550,7 @@ static int instance_rmdir(const char *name)
>>>>>  	}
>>>>>  
>>>>>  	tracing_set_nop(tr);
>>>>> +	clear_ftrace_function_probes(tr);
>>>>>  	event_trace_del_tracer(tr);
>>>>>  	ftrace_clear_pids(tr);
>>>>>  	ftrace_destroy_function_files(tr);
>>>>> diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h
>>>>> index 291a1bca5748..98e0845f7235 100644
>>>>> --- a/kernel/trace/trace.h
>>>>> +++ b/kernel/trace/trace.h
>>>>> @@ -980,6 +980,7 @@ register_ftrace_function_probe(char *glob, struct trace_array *tr,
>>>>>  extern int
>>>>>  unregister_ftrace_function_probe_func(char *glob, struct trace_array *tr,
>>>>>  				      struct ftrace_probe_ops *ops);
>>>>> +extern void clear_ftrace_function_probes(struct trace_array *tr);  
>>>>
>>>> This needs to have a stub function when CONFIG_DYNAMIC_FTRACE is not
>>>> defined. Otherwise we have:
>>>>
>>>> kernel/trace/trace.c:7553:2: error: implicit declaration of function 'clear_ftrace_function_probes' [-Werror=implicit-function-declaration]
>>>>   clear_ftrace_function_probes(tr);
>>>>   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~  
>>
>> The prototype in trace.h is actually guarded by:
>> #if defined(CONFIG_FUNCTION_TRACER) && defined(CONFIG_DYNAMIC_FTRACE)
>>
>> So, I will guard the call to clear_ftrace_function_probes() in trace.c 
>> with the same.
>>
> 
> No, the proper thing to do is to make a stub function in the else part
> of the #if that the prototype was declared in.
> 
> static inline void clear_ftrace_function_probes(struct trace_array *tr)
> {
> }
> 
> Please, lets limit the #ifdef ugliness from the code.
> 
> -- Steve
> 
> 


Hi Steve,

Are you good with this patch series. I am looking to see which
of these should go into 4.13-rc1 - please ack individual patches
that should be pulled into 4.13-rc1

thanks,
-- Shuah

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ