x86, ptrace: add buffer size checks
authorMarkus Metzger <markus.t.metzger@intel.com>
Wed, 30 Jan 2008 12:32:03 +0000 (13:32 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:32:03 +0000 (13:32 +0100)
commitcba4b65d359268c40679ca75ac92c0b93cecf6de
tree95352d42a1a51338b08b88603cd4678297d56917
parente6ae5d9540727b0e2e5e2fbeb683c84671ed0a31
x86, ptrace: add buffer size checks

Pass the buffer size for (most) ptrace commands that pass user-allocated buffers and check that size before accessing the buffer. Unfortunately, PTRACE_BTS_GET already uses all 4 parameters.
Commands that access user buffers return the number of bytes or records read or written.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/ptrace.c
include/asm-x86/ptrace-abi.h