linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Al Viro <viro@ZenIV.linux.org.uk>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, hch@lst.de
Subject: Re: [PATCH -vfs] proc: don't maintain sizeof(struct proc_dir_entry)
Date: Fri, 18 May 2018 23:50:11 +0300	[thread overview]
Message-ID: <20180518205011.GA9756@avx2> (raw)
In-Reply-To: <20180518202315.GU30522@ZenIV.linux.org.uk>

On Fri, May 18, 2018 at 09:23:15PM +0100, Al Viro wrote:
> On Fri, May 18, 2018 at 11:02:13PM +0300, Alexey Dobriyan wrote:
> > Automatically cap sizeof(struct proc_dir_entry) at 192/128 bytes or
> > 256/192 bytes if spinlock debugging/lockdep is enabled.
> 
> > --- a/fs/proc/internal.h
> > +++ b/fs/proc/internal.h
> > @@ -61,13 +61,15 @@ struct proc_dir_entry {
> >  	char *name;
> >  	umode_t mode;
> >  	u8 namelen;
> > +	char inline_name[];
> > +} __randomize_layout;
> > +
> 
> Hmm...  proc_root initialization relies upon a gccism after that...

Yeah well.

> Speaking of which, why the hell do we even bother with proc_root.name?

printk("%s/%s", pde->parent->name, pde->name) is nice and doesn't cost
anything (OK, it may cost 5 bytes).

      reply	other threads:[~2018-05-18 20:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-18 20:02 [PATCH -vfs] proc: don't maintain sizeof(struct proc_dir_entry) Alexey Dobriyan
2018-05-18 20:23 ` Al Viro
2018-05-18 20:50   ` Alexey Dobriyan [this message]

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=20180518205011.GA9756@avx2 \
    --to=adobriyan@gmail.com \
    --cc=hch@lst.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=viro@ZenIV.linux.org.uk \
    /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;
as well as URLs for NNTP newsgroup(s).