kernel-ark/fs/proc
Roland McGrath 638fa202cd procfs: mem permission cleanup
This cleans up the permission checks done for /proc/PID/mem i/o calls.  It
puts all the logic in a new function, check_mem_permission().

The old code repeated the (!MAY_PTRACE(task) || !ptrace_may_attach(task))
magical expression multiple times.  The new function does all that work in one
place, with clear comments.

The old code called security_ptrace() twice on successful checks, once in
MAY_PTRACE() and once in __ptrace_may_attach().  Now it's only called once,
and only if all other checks have succeeded.

Signed-off-by: Roland McGrath <roland@redhat.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29 08:06:17 -07:00
..
array.c proc: seqfile convert proc_pid_status to properly handle pid namespaces 2008-02-08 09:22:24 -08:00
base.c procfs: mem permission cleanup 2008-04-29 08:06:17 -07:00
generic.c proc: print more information when removing non-empty directories 2008-04-29 08:06:17 -07:00
inode-alloc.txt
inode.c proc: remove MODULE_LICENSE 2008-02-08 09:22:23 -08:00
internal.h proc: switch to proc_create() 2008-04-29 08:06:17 -07:00
kcore.c aout: remove unnecessary inclusions of {asm, linux}/a.out.h 2008-02-08 09:22:30 -08:00
kmsg.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
Makefile [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
mmu.c fs/proc/mmu.c: headers butchery 2007-10-17 08:42:48 -07:00
nommu.c proc: switch to proc_create() 2008-04-29 08:06:17 -07:00
proc_devtree.c [POWERPC] Make struct property's value a void * 2007-04-13 03:55:18 +10:00
proc_misc.c proc: switch to proc_create() 2008-04-29 08:06:17 -07:00
proc_net.c [NETNS]: Remove ifdef CONFIG_NET braces in fs/proc/proc_net.c. 2008-04-02 00:10:04 -07:00
proc_sysctl.c Embed a struct path into struct nameidata instead of nd->{dentry,mnt} 2008-02-14 21:13:33 -08:00
proc_tty.c proc: switch to proc_create() 2008-04-29 08:06:17 -07:00
root.c proc: fix ->open'less usage due to ->proc_fops flip 2008-02-08 09:22:24 -08:00
task_mmu.c procfs task exe symlink 2008-04-29 08:06:17 -07:00
task_nommu.c procfs task exe symlink 2008-04-29 08:06:17 -07:00
vmcore.c aout: remove unnecessary inclusions of {asm, linux}/a.out.h 2008-02-08 09:22:30 -08:00