mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/stacktrace: export save_stack_trace_tsk_reliable
@ 2019-02-27 21:17 Joe Lawrence
  2019-02-27 21:31 ` Thomas Gleixner
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Lawrence @ 2019-02-27 21:17 UTC (permalink / raw)
  To: linux-kernel, live-patching, x86; +Cc: Jiri Slaby, Josh Poimboeuf

The ppc64le implementation of save_stack_trace_tsk_reliable() is
exported, so do the same with x86.

Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
---
 arch/x86/kernel/stacktrace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/stacktrace.c b/arch/x86/kernel/stacktrace.c
index 5c2d71a1dc06..ad9b38dabf6a 100644

We could do the inverse and remove the symbol export from
arch/powerpc/kernel/stacktrace.c, but I figured the other
save_stack_trace_tsk variants are already exported for both
arches, so add this one, too.  -- JL

--- a/arch/x86/kernel/stacktrace.c
+++ b/arch/x86/kernel/stacktrace.c
@@ -163,6 +163,7 @@ int save_stack_trace_tsk_reliable(struct task_struct *tsk,
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(save_stack_trace_tsk_reliable);
 #endif /* CONFIG_HAVE_RELIABLE_STACKTRACE */
 
 /* Userspace stacktrace - based on kernel/trace/trace_sysprof.c */
-- 
2.20.1


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

* Re: [PATCH] x86/stacktrace: export save_stack_trace_tsk_reliable
  2019-02-27 21:17 [PATCH] x86/stacktrace: export save_stack_trace_tsk_reliable Joe Lawrence
@ 2019-02-27 21:31 ` Thomas Gleixner
  2019-02-27 22:25   ` Joe Lawrence
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Gleixner @ 2019-02-27 21:31 UTC (permalink / raw)
  To: Joe Lawrence; +Cc: linux-kernel, live-patching, x86, Jiri Slaby, Josh Poimboeuf

On Wed, 27 Feb 2019, Joe Lawrence wrote:

> The ppc64le implementation of save_stack_trace_tsk_reliable() is
> exported, so do the same with x86.

And what's the in tree module user of this? I can't find one and just
because PPC has an export with no user is not a convincing argument to add
another one. The proper solution is to remove the unused PPC export.

Thanks,

	tglx





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

* Re: [PATCH] x86/stacktrace: export save_stack_trace_tsk_reliable
  2019-02-27 21:31 ` Thomas Gleixner
@ 2019-02-27 22:25   ` Joe Lawrence
  2019-02-27 23:20     ` Joe Lawrence
  0 siblings, 1 reply; 4+ messages in thread
From: Joe Lawrence @ 2019-02-27 22:25 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: linux-kernel, live-patching, x86, Jiri Slaby, Josh Poimboeuf

On 2/27/19 4:31 PM, Thomas Gleixner wrote:
> On Wed, 27 Feb 2019, Joe Lawrence wrote:
> 
>> The ppc64le implementation of save_stack_trace_tsk_reliable() is
>> exported, so do the same with x86.
> 
> And what's the in tree module user of this? I can't find one and just
> because PPC has an export with no user is not a convincing argument to add
> another one. The proper solution is to remove the unused PPC export.
> 

Good point.

For that matter, I do see in-tree modules making use of 
save_stack_trace, but who is calling save_stack_trace_tsk (exported by 
most arches) and save_stack_trace_regs (exported by openrisc, powerpc, 
s390)?

-- Joe

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

* Re: [PATCH] x86/stacktrace: export save_stack_trace_tsk_reliable
  2019-02-27 22:25   ` Joe Lawrence
@ 2019-02-27 23:20     ` Joe Lawrence
  0 siblings, 0 replies; 4+ messages in thread
From: Joe Lawrence @ 2019-02-27 23:20 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: linux-kernel, live-patching, x86, Jiri Slaby, Josh Poimboeuf

On 2/27/19 5:25 PM, Joe Lawrence wrote:
> On 2/27/19 4:31 PM, Thomas Gleixner wrote:
>> On Wed, 27 Feb 2019, Joe Lawrence wrote:
>>
>>> The ppc64le implementation of save_stack_trace_tsk_reliable() is
>>> exported, so do the same with x86.
>>
>> And what's the in tree module user of this? I can't find one and just
>> because PPC has an export with no user is not a convincing argument to add
>> another one. The proper solution is to remove the unused PPC export.
>>
> 
> Good point.
> 
> For that matter, I do see in-tree modules making use of
> save_stack_trace, but who is calling save_stack_trace_tsk (exported by
> most arches) and save_stack_trace_regs (exported by openrisc, powerpc,
> s390)?

Well, at least for save_stack_trace_tsk there is the out-of-tree kpatch 
core module[1].  (Kpatch drops that call if the kernel provides 
livepatch functionality.)

[1] https://github.com/dynup/kpatch/blob/master/kmod/core/core.c#L275

-- Joe

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

end of thread, other threads:[~2019-02-27 23:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-27 21:17 [PATCH] x86/stacktrace: export save_stack_trace_tsk_reliable Joe Lawrence
2019-02-27 21:31 ` Thomas Gleixner
2019-02-27 22:25   ` Joe Lawrence
2019-02-27 23:20     ` Joe Lawrence

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®