Messages in this thread | | | From | Andy Lutomirski <> | Date | Mon, 26 May 2014 09:57:44 -0700 | Subject | Re: [PATCH 2/9] procfs: add pid_entry_access() for proper checks on /proc/<pid>/* |
| |
On Mon, May 26, 2014 at 6:27 AM, Djalal Harouni <tixxdz@opendz.org> wrote: > Add the helper pid_entry_access() to unify the permission checks during > ->open() > > This is a preparation patch. > > Signed-off-by: Djalal Harouni <tixxdz@opendz.org> > --- > fs/proc/generic.c | 22 ++++++++++++++++++++++ > fs/proc/internal.h | 2 ++ > 2 files changed, 24 insertions(+) > > diff --git a/fs/proc/generic.c b/fs/proc/generic.c > index b7f268e..98ed927 100644 > --- a/fs/proc/generic.c > +++ b/fs/proc/generic.c > @@ -23,6 +23,7 @@ > #include <linux/bitops.h> > #include <linux/spinlock.h> > #include <linux/completion.h> > +#include <linux/ptrace.h> > #include <asm/uaccess.h> > > #include "internal.h" > @@ -596,3 +597,24 @@ void *PDE_DATA(const struct inode *inode) > return __PDE_DATA(inode); > } > EXPORT_SYMBOL(PDE_DATA); > + > +int pid_entry_access(struct file *filp, unsigned int mode)
pid_entry_may_ptrace, perhaps?
--Andy
| |