Recent rework of stack trace infrastructure introduced a new set of
helpers for common stack trace operations (commit e9b98e162aa5
("stacktrace: Provide helpers for common stack trace operations") and
related). As a result, save_stack_trace_tsk_reliable() is not directly
called anywhere. Livepatch, currently the only user of the reliable
stack trace feature, now calls stack_trace_save_tsk_reliable().
When CONFIG_HAVE_RELIABLE_STACKTRACE is set and depending on
CONFIG_ARCH_STACKWALK, stack_trace_save_tsk_reliable() calls either
arch_stack_walk_reliable() or mentioned save_stack_trace_tsk_reliable().
x86_64 defines the former, ppc64le the latter. All other architectures
do not have HAVE_RELIABLE_STACKTRACE and include/linux/stacktrace.h
defines -ENOSYS returning version for them.
In short, stack_trace_save_tsk_reliable() returning -ENOSYS defined in
include/linux/stacktrace.h serves the same purpose as the old weak
version of save_stack_trace_tsk_reliable() which is therefore no longer
needed.
Cc: Thomas Gleixner <[email protected]>
Signed-off-by: Miroslav Benes <[email protected]>
---
kernel/stacktrace.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/kernel/stacktrace.c b/kernel/stacktrace.c
index 36139de0a3c4..0c3f00db9069 100644
--- a/kernel/stacktrace.c
+++ b/kernel/stacktrace.c
@@ -255,14 +255,6 @@ save_stack_trace_regs(struct pt_regs *regs, struct stack_trace *trace)
WARN_ONCE(1, KERN_INFO "save_stack_trace_regs() not implemented yet.\n");
}
-__weak int
-save_stack_trace_tsk_reliable(struct task_struct *tsk,
- struct stack_trace *trace)
-{
- WARN_ONCE(1, KERN_INFO "save_stack_tsk_reliable() not implemented yet.\n");
- return -ENOSYS;
-}
-
/**
* stack_trace_save - Save a stack trace into a storage array
* @store: Pointer to storage array
--
2.21.0
On Tue 2019-06-11 16:13:18, Miroslav Benes wrote:
> Recent rework of stack trace infrastructure introduced a new set of
> helpers for common stack trace operations (commit e9b98e162aa5
> ("stacktrace: Provide helpers for common stack trace operations") and
> related). As a result, save_stack_trace_tsk_reliable() is not directly
> called anywhere. Livepatch, currently the only user of the reliable
> stack trace feature, now calls stack_trace_save_tsk_reliable().
>
> When CONFIG_HAVE_RELIABLE_STACKTRACE is set and depending on
> CONFIG_ARCH_STACKWALK, stack_trace_save_tsk_reliable() calls either
> arch_stack_walk_reliable() or mentioned save_stack_trace_tsk_reliable().
> x86_64 defines the former, ppc64le the latter. All other architectures
> do not have HAVE_RELIABLE_STACKTRACE and include/linux/stacktrace.h
> defines -ENOSYS returning version for them.
>
> In short, stack_trace_save_tsk_reliable() returning -ENOSYS defined in
> include/linux/stacktrace.h serves the same purpose as the old weak
> version of save_stack_trace_tsk_reliable() which is therefore no longer
> needed.
>
> Cc: Thomas Gleixner <[email protected]>
> Signed-off-by: Miroslav Benes <[email protected]>
Reviewed-by: Petr Mladek <[email protected]>
Best Regards,
Petr
On Tue, Jun 11, 2019 at 04:13:18PM +0200, Miroslav Benes wrote:
> Recent rework of stack trace infrastructure introduced a new set of
> helpers for common stack trace operations (commit e9b98e162aa5
> ("stacktrace: Provide helpers for common stack trace operations") and
> related). As a result, save_stack_trace_tsk_reliable() is not directly
> called anywhere. Livepatch, currently the only user of the reliable
> stack trace feature, now calls stack_trace_save_tsk_reliable().
>
> When CONFIG_HAVE_RELIABLE_STACKTRACE is set and depending on
> CONFIG_ARCH_STACKWALK, stack_trace_save_tsk_reliable() calls either
> arch_stack_walk_reliable() or mentioned save_stack_trace_tsk_reliable().
> x86_64 defines the former, ppc64le the latter. All other architectures
> do not have HAVE_RELIABLE_STACKTRACE and include/linux/stacktrace.h
> defines -ENOSYS returning version for them.
>
> In short, stack_trace_save_tsk_reliable() returning -ENOSYS defined in
> include/linux/stacktrace.h serves the same purpose as the old weak
> version of save_stack_trace_tsk_reliable() which is therefore no longer
> needed.
>
> Cc: Thomas Gleixner <[email protected]>
> Signed-off-by: Miroslav Benes <[email protected]>
Reviewed-by: Kamalesh Babulal <[email protected]>
On Tue, 11 Jun 2019, Miroslav Benes wrote:
> Recent rework of stack trace infrastructure introduced a new set of
> helpers for common stack trace operations (commit e9b98e162aa5
> ("stacktrace: Provide helpers for common stack trace operations") and
> related). As a result, save_stack_trace_tsk_reliable() is not directly
> called anywhere. Livepatch, currently the only user of the reliable
> stack trace feature, now calls stack_trace_save_tsk_reliable().
>
> When CONFIG_HAVE_RELIABLE_STACKTRACE is set and depending on
> CONFIG_ARCH_STACKWALK, stack_trace_save_tsk_reliable() calls either
> arch_stack_walk_reliable() or mentioned save_stack_trace_tsk_reliable().
> x86_64 defines the former, ppc64le the latter. All other architectures
> do not have HAVE_RELIABLE_STACKTRACE and include/linux/stacktrace.h
> defines -ENOSYS returning version for them.
>
> In short, stack_trace_save_tsk_reliable() returning -ENOSYS defined in
> include/linux/stacktrace.h serves the same purpose as the old weak
> version of save_stack_trace_tsk_reliable() which is therefore no longer
> needed.
>
> Cc: Thomas Gleixner <[email protected]>
> Signed-off-by: Miroslav Benes <[email protected]>
Reviewed-by: Thomas Gleixner <[email protected]>
Hi Thomas,
On Sun 2019-06-16 10:44:59, Thomas Gleixner wrote:
> On Tue, 11 Jun 2019, Miroslav Benes wrote:
>
> > Recent rework of stack trace infrastructure introduced a new set of
> > helpers for common stack trace operations (commit e9b98e162aa5
> > ("stacktrace: Provide helpers for common stack trace operations") and
> > related). As a result, save_stack_trace_tsk_reliable() is not directly
> > called anywhere. Livepatch, currently the only user of the reliable
> > stack trace feature, now calls stack_trace_save_tsk_reliable().
> >
> > When CONFIG_HAVE_RELIABLE_STACKTRACE is set and depending on
> > CONFIG_ARCH_STACKWALK, stack_trace_save_tsk_reliable() calls either
> > arch_stack_walk_reliable() or mentioned save_stack_trace_tsk_reliable().
> > x86_64 defines the former, ppc64le the latter. All other architectures
> > do not have HAVE_RELIABLE_STACKTRACE and include/linux/stacktrace.h
> > defines -ENOSYS returning version for them.
> >
> > In short, stack_trace_save_tsk_reliable() returning -ENOSYS defined in
> > include/linux/stacktrace.h serves the same purpose as the old weak
> > version of save_stack_trace_tsk_reliable() which is therefore no longer
> > needed.
> >
> > Cc: Thomas Gleixner <[email protected]>
> > Signed-off-by: Miroslav Benes <[email protected]>
>
> Reviewed-by: Thomas Gleixner <[email protected]>
Would you like to push this patch via your tree?
Or is it OK to push it via the livepatch tree for 5.3?
Best Regards,
Petr
On Mon, 17 Jun 2019, Petr Mladek wrote:
> On Sun 2019-06-16 10:44:59, Thomas Gleixner wrote:
> > On Tue, 11 Jun 2019, Miroslav Benes wrote:
> >
> > > Recent rework of stack trace infrastructure introduced a new set of
> > > helpers for common stack trace operations (commit e9b98e162aa5
> > > ("stacktrace: Provide helpers for common stack trace operations") and
> > > related). As a result, save_stack_trace_tsk_reliable() is not directly
> > > called anywhere. Livepatch, currently the only user of the reliable
> > > stack trace feature, now calls stack_trace_save_tsk_reliable().
> > > Cc: Thomas Gleixner <[email protected]>
> > > Signed-off-by: Miroslav Benes <[email protected]>
> >
> > Reviewed-by: Thomas Gleixner <[email protected]>
>
> Would you like to push this patch via your tree?
> Or is it OK to push it via the livepatch tree for 5.3?
Just pick it up. I don't think we have anything conflicting.
Thanks,
tglx