From: David Howells <dhowells@redhat.com>
To: torvalds@osdl.org, akpm@linux-foundation.org
Cc: dhowells@redhat.com, hch@lst.de, roland@redhat.com,
linux-kernel@vger.kernel.org
Subject: [PATCH] FRV: utrace: Miscellaneous fixes
Date: Tue, 28 Apr 2009 00:28:33 +0100 [thread overview]
Message-ID: <20090427232833.491.25088.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20090427161556.16200.41214.stgit@warthog.procyon.org.uk>
Fixes for the FRV utrace/tracehook code:
(1) Macro task_pt_regs()'s argument should be bracketed when used.
(2) The dest data pointer for user_regset_copyin() should point to the place
at which the data at position start_pos begins.
Signed-off-by: David Howells <dhowells@redhat.com>
---
arch/frv/include/asm/ptrace.h | 2 +-
arch/frv/kernel/ptrace.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/frv/include/asm/ptrace.h b/arch/frv/include/asm/ptrace.h
index 5f8b5e4..a54b535 100644
--- a/arch/frv/include/asm/ptrace.h
+++ b/arch/frv/include/asm/ptrace.h
@@ -81,7 +81,7 @@ extern unsigned long user_stack(const struct pt_regs *);
extern void show_regs(struct pt_regs *);
#define profile_pc(regs) ((regs)->pc)
-#define task_pt_regs(task) (task->thread.frame0)
+#define task_pt_regs(task) ((task)->thread.frame0)
#define arch_has_single_step() (1)
extern void user_enable_single_step(struct task_struct *);
diff --git a/arch/frv/kernel/ptrace.c b/arch/frv/kernel/ptrace.c
index e847945..60eeed3 100644
--- a/arch/frv/kernel/ptrace.c
+++ b/arch/frv/kernel/ptrace.c
@@ -92,7 +92,7 @@ static int genregs_set(struct task_struct *target,
/* set the general regs */
ret = user_regset_copyin(&pos, &count, &kbuf, &ubuf,
- iregs, offs_gr1, sizeof(*iregs));
+ &iregs->gr[1], offs_gr1, sizeof(*iregs));
if (ret < 0)
return ret;
next prev parent reply other threads:[~2009-04-27 23:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-27 16:15 [PATCH 1/4] FRV: utrace: Remove in-kernel strace code David Howells
2009-04-27 16:15 ` [PATCH 2/4] FRV: utrace: Implement TIF_NOTIFY_RESUME David Howells
2009-04-27 17:41 ` Roland McGrath
2009-04-27 18:54 ` David Howells
2009-04-27 16:15 ` [PATCH 3/4] FRV: Don't turn on TIF_SYSCALL_TRACE unconditionally in syscall prologue David Howells
2009-04-27 16:15 ` [PATCH 4/4] FRV: utrace: Implement tracehooks David Howells
2009-04-27 23:28 ` David Howells [this message]
2009-04-28 9:12 ` [PATCH 1/4] FRV: utrace: Remove in-kernel strace code Christoph Hellwig
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=20090427232833.491.25088.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=hch@lst.de \
--cc=linux-kernel@vger.kernel.org \
--cc=roland@redhat.com \
--cc=torvalds@osdl.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
all inboxes | Powered by JetHome®