From: "Blackwood, John" <john.blackwood@ccur.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arch/i386|x86_64/kernel/ptrace.c linux-2.6.7
Date: Tue, 13 Jul 2004 12:31:13 -0400 [thread overview]
Message-ID: <40F40E51.8030803@ccur.com> (raw)
I just want to try one more time to post a good diff without newlines.
Thanks.
diff -ru linux-2.6.7/arch/i386/kernel/ptrace.c
linux/arch/i386/kernel/ptrace.c
--- linux-2.6.7/arch/i386/kernel/ptrace.c 2004-06-16
01:19:03.000000000 -0400
+++ linux/arch/i386/kernel/ptrace.c 2004-07-12 13:09:33.000000000 -0400
@@ -428,11 +428,11 @@
ret = -EIO;
break;
}
+ ret = 0;
for ( i = 0; i < FRAME_SIZE*sizeof(long); i += sizeof(long)
) {
- __put_user(getreg(child, i), datap);
+ ret |= __put_user(getreg(child, i), datap);
datap++;
}
- ret = 0;
break;
}
@@ -442,12 +442,12 @@
ret = -EIO;
break;
}
+ ret = 0;
for ( i = 0; i < FRAME_SIZE*sizeof(long); i += sizeof(long)
) {
- __get_user(tmp, datap);
+ ret |=__get_user(tmp, datap);
putreg(child, i, tmp);
datap++;
}
- ret = 0;
break;
}
diff -ru linux-2.6.7/arch/x86_64/kernel/ptrace.c
linux/arch/x86_64/kernel/ptrace.c
--- linux-2.6.7/arch/x86_64/kernel/ptrace.c 2004-06-16
01:19:09.000000000 -0400
+++ linux/arch/x86_64/kernel/ptrace.c 2004-07-12 16:03:35.584411668 -0400
@@ -429,30 +429,30 @@
break;
case PTRACE_GETREGS: { /* Get all gp regs from the child. */
- if (!access_ok(VERIFY_WRITE, (unsigned __user *)data,
FRAME_SIZE)) {
+ if (!access_ok(VERIFY_WRITE, (unsigned __user *)data,
sizeof(struct user_regs_struct))) {
ret = -EIO;
break;
}
+ ret = 0;
for (ui = 0; ui < sizeof(struct user_regs_struct); ui +=
sizeof(long)) {
- __put_user(getreg(child, ui),(unsigned long __user
*) data);
+ ret |= __put_user(getreg(child, ui),(unsigned long
__user *) data);
data += sizeof(long);
}
- ret = 0;
break;
}
case PTRACE_SETREGS: { /* Set all gp regs in the child. */
unsigned long tmp;
- if (!access_ok(VERIFY_READ, (unsigned __user *)data,
FRAME_SIZE)) {
+ if (!access_ok(VERIFY_READ, (unsigned __user *)data,
sizeof(struct user_regs_struct))) {
ret = -EIO;
break;
}
+ ret = 0;
for (ui = 0; ui < sizeof(struct user_regs_struct); ui +=
sizeof(long)) {
- __get_user(tmp, (unsigned long __user *) data);
+ ret |= __get_user(tmp, (unsigned long __user *)
data);
putreg(child, ui, tmp);
data += sizeof(long);
}
- ret = 0;
break;
}
next reply other threads:[~2004-07-13 16:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-13 16:31 Blackwood, John [this message]
2004-07-13 18:31 ` [PATCH] arch/i386|x86_64/kernel/ptrace.c linux-2.6.7 Olaf Hering
-- strict thread matches above, loose matches on Subject: below --
2004-07-13 1:30 Blackwood, John
2004-07-13 7:42 ` Andi Kleen
2004-07-12 23:52 Blackwood, John
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=40F40E51.8030803@ccur.com \
--to=john.blackwood@ccur.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox