From 86e94da4b3c0e561e5eb091c415429bb54f52621 Mon Sep 17 00:00:00 2001 From: Suresh Siddha Date: Mon, 22 Feb 2010 14:51:32 -0800 Subject: [PATCH] --- yaml --- r: 182597 b: refs/heads/master c: c6a0dd7ec6fb2d4927979ed4dc562fc5c122d826 h: refs/heads/master i: 182595: 30999181213f0aeddc2f6fb8c07b2ca51a7db67f v: v3 --- [refs] | 2 +- trunk/include/linux/ptrace.h | 5 +++++ trunk/kernel/ptrace.c | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 2942d4d7cf17..bb2fd4de3b98 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5e6dbc260704ce4d22fc9664f517f0bb6748feaa +refs/heads/master: c6a0dd7ec6fb2d4927979ed4dc562fc5c122d826 diff --git a/trunk/include/linux/ptrace.h b/trunk/include/linux/ptrace.h index dbfa821d5a6e..c5eab89da51e 100644 --- a/trunk/include/linux/ptrace.h +++ b/trunk/include/linux/ptrace.h @@ -30,6 +30,11 @@ /* * Generic ptrace interface that exports the architecture specific regsets * using the corresponding NT_* types (which are also used in the core dump). + * Please note that the NT_PRSTATUS note type in a core dump contains a full + * 'struct elf_prstatus'. But the user_regset for NT_PRSTATUS contains just the + * elf_gregset_t that is the pr_reg field of 'struct elf_prstatus'. For all the + * other user_regset flavors, the user_regset layout and the ELF core dump note + * payload are exactly the same layout. * * This interface usage is as follows: * struct iovec iov = { buf, len}; diff --git a/trunk/kernel/ptrace.c b/trunk/kernel/ptrace.c index 13b4554d8fbb..42ad8ae729a0 100644 --- a/trunk/kernel/ptrace.c +++ b/trunk/kernel/ptrace.c @@ -537,7 +537,7 @@ static int ptrace_regset(struct task_struct *task, int req, unsigned int type, int regset_no; if (!regset || (kiov->iov_len % regset->size) != 0) - return -EIO; + return -EINVAL; regset_no = regset - view->regsets; kiov->iov_len = min(kiov->iov_len,