lkml.org 
[lkml]   [2010]   [Jan]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH -tip 3/8] x86/ptrace: Remove unused regs_get_argument_nth API
    Date
    Because of dropping function argument syntax from kprobe-tracer,
    we don't need this API anymore.

    Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
    Cc: Ingo Molnar <mingo@elte.hu>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Roland McGrath <roland@redhat.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
    Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
    Cc: Michael Neuling <mikey@neuling.org>
    Cc: Steven Rostedt <rostedt@goodmis.org>
    Cc: linuxppc-dev@ozlabs.org
    ---

    arch/x86/include/asm/ptrace.h | 4 ----
    arch/x86/kernel/ptrace.c | 24 ------------------------
    2 files changed, 0 insertions(+), 28 deletions(-)

    diff --git a/arch/x86/include/asm/ptrace.h b/arch/x86/include/asm/ptrace.h
    index 9d369f6..2010280 100644
    --- a/arch/x86/include/asm/ptrace.h
    +++ b/arch/x86/include/asm/ptrace.h
    @@ -274,10 +274,6 @@ static inline unsigned long regs_get_kernel_stack_nth(struct pt_regs *regs,
    return 0;
    }

    -/* Get Nth argument at function call */
    -extern unsigned long regs_get_argument_nth(struct pt_regs *regs,
    - unsigned int n);
    -
    /*
    * These are defined as per linux/ptrace.h, which see.
    */
    diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
    index 017d937..73554a3 100644
    --- a/arch/x86/kernel/ptrace.c
    +++ b/arch/x86/kernel/ptrace.c
    @@ -140,30 +140,6 @@ static const int arg_offs_table[] = {
    #endif
    };

    -/**
    - * regs_get_argument_nth() - get Nth argument at function call
    - * @regs: pt_regs which contains registers at function entry.
    - * @n: argument number.
    - *
    - * regs_get_argument_nth() returns @n th argument of a function call.
    - * Since usually the kernel stack will be changed right after function entry,
    - * you must use this at function entry. If the @n th entry is NOT in the
    - * kernel stack or pt_regs, this returns 0.
    - */
    -unsigned long regs_get_argument_nth(struct pt_regs *regs, unsigned int n)
    -{
    - if (n < ARRAY_SIZE(arg_offs_table))
    - return *(unsigned long *)((char *)regs + arg_offs_table[n]);
    - else {
    - /*
    - * The typical case: arg n is on the stack.
    - * (Note: stack[0] = return address, so skip it)
    - */
    - n -= ARRAY_SIZE(arg_offs_table);
    - return regs_get_kernel_stack_nth(regs, 1 + n);
    - }
    -}
    -
    /*
    * does not yet catch signals sent when the child dies.
    * in exit.c or in signal.c.

    --
    Masami Hiramatsu

    Software Engineer
    Hitachi Computer Products (America), Inc.
    Software Solutions Division

    e-mail: mhiramat@redhat.com


    \
     
     \ /
      Last update: 2010-01-05 23:45    [W:0.023 / U:5.356 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site