All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tracing: irq_pipeline: export missing symbols
@ 2021-06-10  7:29 Philippe Gerum
  2021-06-10  8:15 ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2021-06-10  7:29 UTC (permalink / raw)
  To: xenomai

From: Philippe Gerum <rpm@xenomai.org>

Signed-off-by: Philippe Gerum <rpm@xenomai.org>
---
 kernel/trace/trace_preemptirq.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
index 261ea4101d018ac..2b4110cf6ea2824 100644
--- a/kernel/trace/trace_preemptirq.c
+++ b/kernel/trace/trace_preemptirq.c
@@ -124,6 +124,8 @@ void trace_hardirqs_off_pipelined(void)
 	if (running_inband())
 		trace_hardirqs_off();
 }
+EXPORT_SYMBOL(trace_hardirqs_off_pipelined);
+NOKPROBE_SYMBOL(trace_hardirqs_off_pipelined);
 
 void trace_hardirqs_on_pipelined(void)
 {
@@ -142,6 +144,8 @@ void trace_hardirqs_on_pipelined(void)
 		unstall_inband_nocheck();
 	}
 }
+EXPORT_SYMBOL(trace_hardirqs_on_pipelined);
+NOKPROBE_SYMBOL(trace_hardirqs_on_pipelined);
 
 #else
 
@@ -149,11 +153,15 @@ void trace_hardirqs_off_pipelined(void)
 {
 	trace_hardirqs_off();
 }
+EXPORT_SYMBOL(trace_hardirqs_off_pipelined);
+NOKPROBE_SYMBOL(trace_hardirqs_off_pipelined);
 
 void trace_hardirqs_on_pipelined(void)
 {
 	trace_hardirqs_on();
 }
+EXPORT_SYMBOL(trace_hardirqs_on_pipelined);
+NOKPROBE_SYMBOL(trace_hardirqs_on_pipelined);
 
 #endif
 
-- 
2.31.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] tracing: irq_pipeline: export missing symbols
  2021-06-10  7:29 [PATCH] tracing: irq_pipeline: export missing symbols Philippe Gerum
@ 2021-06-10  8:15 ` Jan Kiszka
  2021-06-10  8:54   ` Philippe Gerum
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2021-06-10  8:15 UTC (permalink / raw)
  To: Philippe Gerum, xenomai

On 10.06.21 09:29, Philippe Gerum via Xenomai wrote:
> From: Philippe Gerum <rpm@xenomai.org>
> 
> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
> ---
>  kernel/trace/trace_preemptirq.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
> index 261ea4101d018ac..2b4110cf6ea2824 100644
> --- a/kernel/trace/trace_preemptirq.c
> +++ b/kernel/trace/trace_preemptirq.c
> @@ -124,6 +124,8 @@ void trace_hardirqs_off_pipelined(void)
>  	if (running_inband())
>  		trace_hardirqs_off();
>  }
> +EXPORT_SYMBOL(trace_hardirqs_off_pipelined);
> +NOKPROBE_SYMBOL(trace_hardirqs_off_pipelined);
>  
>  void trace_hardirqs_on_pipelined(void)
>  {
> @@ -142,6 +144,8 @@ void trace_hardirqs_on_pipelined(void)
>  		unstall_inband_nocheck();
>  	}
>  }
> +EXPORT_SYMBOL(trace_hardirqs_on_pipelined);
> +NOKPROBE_SYMBOL(trace_hardirqs_on_pipelined);
>  
>  #else
>  
> @@ -149,11 +153,15 @@ void trace_hardirqs_off_pipelined(void)
>  {
>  	trace_hardirqs_off();
>  }
> +EXPORT_SYMBOL(trace_hardirqs_off_pipelined);
> +NOKPROBE_SYMBOL(trace_hardirqs_off_pipelined);
>  
>  void trace_hardirqs_on_pipelined(void)
>  {
>  	trace_hardirqs_on();
>  }
> +EXPORT_SYMBOL(trace_hardirqs_on_pipelined);
> +NOKPROBE_SYMBOL(trace_hardirqs_on_pipelined);
>  
>  #endif
>  
> 

How about

"blacklist pipeline tracepoints for kprobe"

as subject? The symbols were already exported, but not in the right way.
The kernel says

"Probing (trapping) such functions can cause a recursive trap (e.g.
double fault) or the nested probe handler may never be called.
Kprobes manages such functions as a blacklist."

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tracing: irq_pipeline: export missing symbols
  2021-06-10  8:15 ` Jan Kiszka
@ 2021-06-10  8:54   ` Philippe Gerum
  2021-06-10  9:19     ` Jan Kiszka
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe Gerum @ 2021-06-10  8:54 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: xenomai


Jan Kiszka <jan.kiszka@siemens.com> writes:

> On 10.06.21 09:29, Philippe Gerum via Xenomai wrote:
>> From: Philippe Gerum <rpm@xenomai.org>
>> 
>> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
>> ---
>>  kernel/trace/trace_preemptirq.c | 8 ++++++++
>>  1 file changed, 8 insertions(+)
>> 
>> diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
>> index 261ea4101d018ac..2b4110cf6ea2824 100644
>> --- a/kernel/trace/trace_preemptirq.c
>> +++ b/kernel/trace/trace_preemptirq.c
>> @@ -124,6 +124,8 @@ void trace_hardirqs_off_pipelined(void)
>>  	if (running_inband())
>>  		trace_hardirqs_off();
>>  }
>> +EXPORT_SYMBOL(trace_hardirqs_off_pipelined);
>> +NOKPROBE_SYMBOL(trace_hardirqs_off_pipelined);
>>  
>>  void trace_hardirqs_on_pipelined(void)
>>  {
>> @@ -142,6 +144,8 @@ void trace_hardirqs_on_pipelined(void)
>>  		unstall_inband_nocheck();
>>  	}
>>  }
>> +EXPORT_SYMBOL(trace_hardirqs_on_pipelined);
>> +NOKPROBE_SYMBOL(trace_hardirqs_on_pipelined);
>>  
>>  #else
>>  
>> @@ -149,11 +153,15 @@ void trace_hardirqs_off_pipelined(void)
>>  {
>>  	trace_hardirqs_off();
>>  }
>> +EXPORT_SYMBOL(trace_hardirqs_off_pipelined);
>> +NOKPROBE_SYMBOL(trace_hardirqs_off_pipelined);
>>  
>>  void trace_hardirqs_on_pipelined(void)
>>  {
>>  	trace_hardirqs_on();
>>  }
>> +EXPORT_SYMBOL(trace_hardirqs_on_pipelined);
>> +NOKPROBE_SYMBOL(trace_hardirqs_on_pipelined);
>>  
>>  #endif
>>  
>> 
>
> How about
>
> "blacklist pipeline tracepoints for kprobe"
>
> as subject? The symbols were already exported, but not in the right way.
> The kernel says
>
> "Probing (trapping) such functions can cause a recursive trap (e.g.
> double fault) or the nested probe handler may never be called.
> Kprobes manages such functions as a blacklist."
>

This is actually the export line which was missing for me. The kbprobe
bits are a careless by-product.

-- 
Philippe.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] tracing: irq_pipeline: export missing symbols
  2021-06-10  8:54   ` Philippe Gerum
@ 2021-06-10  9:19     ` Jan Kiszka
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Kiszka @ 2021-06-10  9:19 UTC (permalink / raw)
  To: Philippe Gerum; +Cc: xenomai

On 10.06.21 10:54, Philippe Gerum wrote:
> 
> Jan Kiszka <jan.kiszka@siemens.com> writes:
> 
>> On 10.06.21 09:29, Philippe Gerum via Xenomai wrote:
>>> From: Philippe Gerum <rpm@xenomai.org>
>>>
>>> Signed-off-by: Philippe Gerum <rpm@xenomai.org>
>>> ---
>>>  kernel/trace/trace_preemptirq.c | 8 ++++++++
>>>  1 file changed, 8 insertions(+)
>>>
>>> diff --git a/kernel/trace/trace_preemptirq.c b/kernel/trace/trace_preemptirq.c
>>> index 261ea4101d018ac..2b4110cf6ea2824 100644
>>> --- a/kernel/trace/trace_preemptirq.c
>>> +++ b/kernel/trace/trace_preemptirq.c
>>> @@ -124,6 +124,8 @@ void trace_hardirqs_off_pipelined(void)
>>>  	if (running_inband())
>>>  		trace_hardirqs_off();
>>>  }
>>> +EXPORT_SYMBOL(trace_hardirqs_off_pipelined);
>>> +NOKPROBE_SYMBOL(trace_hardirqs_off_pipelined);
>>>  
>>>  void trace_hardirqs_on_pipelined(void)
>>>  {
>>> @@ -142,6 +144,8 @@ void trace_hardirqs_on_pipelined(void)
>>>  		unstall_inband_nocheck();
>>>  	}
>>>  }
>>> +EXPORT_SYMBOL(trace_hardirqs_on_pipelined);
>>> +NOKPROBE_SYMBOL(trace_hardirqs_on_pipelined);
>>>  
>>>  #else
>>>  
>>> @@ -149,11 +153,15 @@ void trace_hardirqs_off_pipelined(void)
>>>  {
>>>  	trace_hardirqs_off();
>>>  }
>>> +EXPORT_SYMBOL(trace_hardirqs_off_pipelined);
>>> +NOKPROBE_SYMBOL(trace_hardirqs_off_pipelined);
>>>  
>>>  void trace_hardirqs_on_pipelined(void)
>>>  {
>>>  	trace_hardirqs_on();
>>>  }
>>> +EXPORT_SYMBOL(trace_hardirqs_on_pipelined);
>>> +NOKPROBE_SYMBOL(trace_hardirqs_on_pipelined);
>>>  
>>>  #endif
>>>  
>>>
>>
>> How about
>>
>> "blacklist pipeline tracepoints for kprobe"
>>
>> as subject? The symbols were already exported, but not in the right way.
>> The kernel says
>>
>> "Probing (trapping) such functions can cause a recursive trap (e.g.
>> double fault) or the nested probe handler may never be called.
>> Kprobes manages such functions as a blacklist."
>>
> 
> This is actually the export line which was missing for me. The kbprobe
> bits are a careless by-product.
> 

Oops, indeed - I somehow read

-EXPORT_SYMBOL(trace_hardirqs_on_pipelined);
+NOKPROBE_SYMBOL(trace_hardirqs_on_pipelined);

no idea why.

Jan

-- 
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-06-10  9:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  7:29 [PATCH] tracing: irq_pipeline: export missing symbols Philippe Gerum
2021-06-10  8:15 ` Jan Kiszka
2021-06-10  8:54   ` Philippe Gerum
2021-06-10  9:19     ` Jan Kiszka

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.