From: Dave Jones <davej@redhat.com>
To: Alexey Dobriyan <adobriyan@gmail.com>
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] proc: warn if registering world writeable files
Date: Thu, 16 Dec 2010 16:26:10 -0500 [thread overview]
Message-ID: <20101216212609.GA9352@redhat.com> (raw)
In-Reply-To: <20101216203217.GA3581@p183.telecom.by>
On Thu, Dec 16, 2010 at 10:32:17PM +0200, Alexey Dobriyan wrote:
> Signed-off-by: Alexey Dobriyan <adobriyan@gmail.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
next prev parent reply other threads:[~2010-12-16 21:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 20:32 [PATCH] proc: warn if registering world writeable files Alexey Dobriyan
2010-12-16 21:26 ` Dave Jones [this message]
2010-12-16 22:04 ` Alexey Dobriyan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101216212609.GA9352@redhat.com \
--to=davej@redhat.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox