CHROMIUM: x86: need compat version of sys_prctl
authorOlof Johansson <olofj@chromium.org>
Fri, 17 Aug 2012 08:20:53 +0000 (01:20 -0700)
committerGerrit <chrome-bot@google.com>
Fri, 17 Aug 2012 14:18:41 +0000 (07:18 -0700)
commitaf3df26092480c98c2a214f4a1baddbe05aaa0f8
tree4a5df789f3a49332d224d78ff567a00b07f731bc
parent7c4e2811e99b147bb4d17236ba58ebddfc292559
CHROMIUM: x86: need compat version of sys_prctl

Since PR_SET_PTRACER_ANY is the equvalent of (unsigned long)-1, it
needs to be sign extended for 32-bit compat.

Powerpc was the only arch that did any kind of compat handling for prctl,
so move that code to generic location and add the PR_SET_PTRACER check
as needed for the yama module.

BUG=chromium-os:33531
TEST=run security_ptraceRestrictions

Change-Id: I2c034025de8d71b5c317318cee2e079a38461e6d
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/30672
Reviewed-by: Sonny Rao <sonnyrao@chromium.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
arch/powerpc/kernel/sys_ppc32.c
arch/x86/syscalls/syscall_32.tbl
kernel/compat.c