On Mon, May 26, 2014 at 6:27 AM, Djalal Harouni <tix...@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 <tix...@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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to