All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86 - Fencepost errors in compat ptrace
@ 2008-01-10 19:45 Jeff Dike
  0 siblings, 0 replies; only message in thread
From: Jeff Dike @ 2008-01-10 19:45 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML

The compat PTRACE_SETREGS and PTRACE_GETREGS are verifying_area
one word too few.

Signed-off-by: Jeff Dike <jdike@linux.intel.com>
---
 arch/x86/ia32/ptrace32.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/ia32/ptrace32.c b/arch/x86/ia32/ptrace32.c
index 4a233ad..e5d4eff 100644
--- a/arch/x86/ia32/ptrace32.c
+++ b/arch/x86/ia32/ptrace32.c
@@ -312,7 +312,7 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
 
 	case PTRACE_GETREGS: { /* Get all gp regs from the child. */
 		int i;
-	  	if (!access_ok(VERIFY_WRITE, datap, 16*4)) {
+	  	if (!access_ok(VERIFY_WRITE, datap, 17*4)) {
 			ret = -EIO;
 			break;
 		}
@@ -328,7 +328,7 @@ asmlinkage long sys32_ptrace(long request, u32 pid, u32 addr, u32 data)
 	case PTRACE_SETREGS: { /* Set all gp regs in the child. */
 		unsigned long tmp;
 		int i;
-	  	if (!access_ok(VERIFY_READ, datap, 16*4)) {
+	  	if (!access_ok(VERIFY_READ, datap, 17*4)) {
 			ret = -EIO;
 			break;
 		}

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-10 19:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-10 19:45 [PATCH] x86 - Fencepost errors in compat ptrace Jeff Dike

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.