[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101216212609.GA9352@redhat.com>
Date: Thu, 16 Dec 2010 16:26:10 -0500
From: Dave Jones <davej@...hat.com>
To: Alexey Dobriyan <adobriyan@...il.com>
Cc: akpm@...ux-foundation.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] proc: warn if registering world writeable files
On Thu, Dec 16, 2010 at 10:32:17PM +0200, Alexey Dobriyan wrote:
> Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
> ---
>
> fs/proc/generic.c | 1 +
> 1 file changed, 1 insertion(+)
>
> --- a/fs/proc/generic.c
> +++ b/fs/proc/generic.c
> @@ -623,6 +623,7 @@ static struct proc_dir_entry *__proc_create(struct proc_dir_entry **parent,
> memcpy(((char *) ent) + sizeof(struct proc_dir_entry), fn, len + 1);
> ent->name = ((char *) ent) + sizeof(*ent);
> ent->namelen = len;
> + WARN_ON(S_ISREG(mode) && (mode & S_IWOTH));
> ent->mode = mode;
> ent->nlink = nlink;
> atomic_set(&ent->count, 1);
Not sure about this. For the reason I mentioned in the checkpatch diff
that this is "usually" a problem. There may be some use cases where
it may actually be ok.
(I'm having a hard time thinking up a justification though tbh)
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists