lkml.org 
[lkml]   [2010]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 04/43] ptrace, x86: change signature of arch_ptrace()
    Date
    change type of @addr and @data into unsigned long according to commit
    f76671df26ef06321480e702770f88f61272be29 [PATCH 03/43]

    Signed-off-by: Namhyung Kim <namhyung@gmail.com>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: "H. Peter Anvin" <hpa@zytor.com>
    ---
    arch/x86/kernel/ptrace.c | 13 ++++++-------
    1 files changed, 6 insertions(+), 7 deletions(-)

    diff --git a/arch/x86/kernel/ptrace.c b/arch/x86/kernel/ptrace.c
    index 70c4872..ea7766a 100644
    --- a/arch/x86/kernel/ptrace.c
    +++ b/arch/x86/kernel/ptrace.c
    @@ -801,7 +801,8 @@ void ptrace_disable(struct task_struct *child)
    static const struct user_regset_view user_x86_32_view; /* Initialized below. */
    #endif

    -long arch_ptrace(struct task_struct *child, long request, long addr, long data)
    +long arch_ptrace(struct task_struct *child, long request,
    + unsigned long addr, unsigned long data)
    {
    int ret;
    unsigned long __user *datap = (unsigned long __user *)data;
    @@ -812,8 +813,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)
    unsigned long tmp;

    ret = -EIO;
    - if ((addr & (sizeof(data) - 1)) || addr < 0 ||
    - addr >= sizeof(struct user))
    + if ((addr & (sizeof(data) - 1)) || addr >= sizeof(struct user))
    break;

    tmp = 0; /* Default return condition */
    @@ -830,8 +830,7 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)

    case PTRACE_POKEUSR: /* write the word at location addr in the USER area */
    ret = -EIO;
    - if ((addr & (sizeof(data) - 1)) || addr < 0 ||
    - addr >= sizeof(struct user))
    + if ((addr & (sizeof(data) - 1)) || addr >= sizeof(struct user))
    break;

    if (addr < sizeof(struct user_regs_struct))
    @@ -888,14 +887,14 @@ long arch_ptrace(struct task_struct *child, long request, long addr, long data)

    #if defined CONFIG_X86_32 || defined CONFIG_IA32_EMULATION
    case PTRACE_GET_THREAD_AREA:
    - if (addr < 0)
    + if ((int) addr < 0)
    return -EIO;
    ret = do_get_thread_area(child, addr,
    (struct user_desc __user *) data);
    break;

    case PTRACE_SET_THREAD_AREA:
    - if (addr < 0)
    + if ((int) addr < 0)
    return -EIO;
    ret = do_set_thread_area(child, addr,
    (struct user_desc __user *) data, 0);
    --
    1.7.2.2


    \
     
     \ /
      Last update: 2010-08-27 11:45    [W:0.028 / U:33.556 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site