[POWERPC] spufs: Avoid user-triggered oops in ptrace
authorChristoph Hellwig <hch@infradead.org>
Mon, 20 Nov 2006 17:45:05 +0000 (18:45 +0100)
committerPaul Mackerras <paulus@samba.org>
Mon, 4 Dec 2006 09:39:57 +0000 (20:39 +1100)
commit5c3ecd659bd20cda214a402a3132c790cc886cd2
treec95d77196c6ce5e9acc20d7ac2ff42cf18668b46
parent2ebb2477f9a61b436dd22b75189857df1a77e585
[POWERPC] spufs: Avoid user-triggered oops in ptrace

When one of the spufs files is mapped into a process address
space, regular users can use ptrace to attempt accessing
them with access_process_vm(). With the way that the
mappings currently work, this likely causes an oops.

Setting the vm_flags to VM_IO makes sure that ptrace can
not access them but returns an error code. This is not
the perfect solution in case of the local store mapping,
but it fixes the oops in a well-defined way.

Also remove leftover VM_RESERVED flags in spufs.  The
VM_RESERVED flag is on it's way out and not checked by
the memory managment code anymore.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Christoph Hellwig <chellwig@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/spufs/file.c