[PATCH] x86_64: Don't allow accesses below register frame in ptrace

There was a "off by one quad word" error in there. I don't think it is
exploitable because it will only store into a unused area, but better to plug
it.

Found and fixed by John Blackwood

Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by Andi Kleen and committed by Linus Torvalds c4d1fcf3 b41e2939

+2 -2
+2 -2
arch/x86_64/kernel/ptrace.c
··· 380 380 break; 381 381 382 382 switch (addr) { 383 - case 0 ... sizeof(struct user_regs_struct): 383 + case 0 ... sizeof(struct user_regs_struct) - sizeof(long): 384 384 tmp = getreg(child, addr); 385 385 break; 386 386 case offsetof(struct user, u_debugreg[0]): ··· 425 425 break; 426 426 427 427 switch (addr) { 428 - case 0 ... sizeof(struct user_regs_struct): 428 + case 0 ... sizeof(struct user_regs_struct) - sizeof(long): 429 429 ret = putreg(child, addr, data); 430 430 break; 431 431 /* Disallows to set a breakpoint into the vsyscall */