lkml.org 
[lkml]   [2015]   [Sep]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/3] kprobes/x86: stacktool: ignore kretprobe_trampoline_holder
On Thu, Sep 17, 2015 at 05:14:37PM -0500, Chris J Arges wrote:
> The function kretprobe_trampoline_holder isn't called explicility and therefore
> should be ignored by stacktool.
>
> Signed-off-by: Chris J Arges <chris.j.arges@canonical.com>
> ---
> arch/x86/kernel/kprobes/core.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/arch/x86/kernel/kprobes/core.c b/arch/x86/kernel/kprobes/core.c
> index 1deffe6..3ade909 100644
> --- a/arch/x86/kernel/kprobes/core.c
> +++ b/arch/x86/kernel/kprobes/core.c
> @@ -49,6 +49,7 @@
> #include <linux/kdebug.h>
> #include <linux/kallsyms.h>
> #include <linux/ftrace.h>
> +#include <linux/stacktool.h>
>
> #include <asm/cacheflush.h>
> #include <asm/desc.h>
> @@ -704,6 +705,7 @@ static void __used kretprobe_trampoline_holder(void)
> }
> NOKPROBE_SYMBOL(kretprobe_trampoline_holder);
> NOKPROBE_SYMBOL(kretprobe_trampoline);
> +STACKTOOL_IGNORE_FUNC(kretprobe_trampoline_holder);
>
> /*
> * Called from kretprobe_trampoline
> --
> 1.9.1

The kretprobe trampoline isn't called directly but it can still be
executed at runtime. I think we should make sure it does the "right
thing" with respect to frame pointers and CFI before telling stacktool
to ignore it.

--
Josh


\
 
 \ /
  Last update: 2015-09-18 16:21    [W:0.529 / U:0.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site