lkml.org 
[lkml]   [2014]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [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


\
 
 \ /
  Last update: 2014-05-26 19:41    [W:0.111 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site