From: Nick Piggin <npiggin@suse.de>
To: Christoph Hellwig <hch@lst.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Ulrich Drepper <drepper@redhat.com>,
viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 2/2] add f_flags to struct statfs(64)
Date: Thu, 8 Jul 2010 04:16:31 +1000 [thread overview]
Message-ID: <20100707181631.GF9263@laptop> (raw)
In-Reply-To: <20100707173311.GA14608@lst.de>
On Wed, Jul 07, 2010 at 07:33:11PM +0200, Christoph Hellwig wrote:
> On Wed, Jul 07, 2010 at 10:31:37AM -0700, Linus Torvalds wrote:
> > On Wed, Jul 7, 2010 at 10:11 AM, Ulrich Drepper <drepper@redhat.com> wrote:
> > >
> > > How does this work with old kernels which didn't initialize f_spare?
> >
> > Some of the compat layers (and older kernels) don't copy the f_spare
> > values, so user space should clear the field before doing the system
> > call, and you should be ok.
> >
> > There should be no actual _uninitialized_ values copied from the
> > kernel. IOW, either the kernel writes zero, or it doesn't write
> > anything at all. Anything else would be a security issue anyway (ie
> > kernel stack data leak). Afaik, no kernel does that.
>
> Sometime before 2.4.0 (I posted the exact release in the previous
> thread) the kernel initalized unused fields to 0xff. So if we want to
> support these kernels it is an issue.
glibc could just set 2.4.0 as the oldest version to test ST_VALID
against. I think most distros compile it to support no older than
2.6.something kernels anyway.
Should we not allow glibc to assume the mapping is 1:1 except ST_VALID?
If other spare fields may be used in future, this could be the best
place to do versioning or otherwise make use of some bits. Possibly a
couple of bits could be used for version number.
next prev parent reply other threads:[~2010-07-07 18:16 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-07 16:53 [PATCH 2/2] add f_flags to struct statfs(64) Christoph Hellwig
2010-07-07 17:11 ` Ulrich Drepper
2010-07-07 17:31 ` Linus Torvalds
2010-07-07 17:33 ` Christoph Hellwig
2010-07-07 17:55 ` Miklos Szeredi
2010-07-07 18:06 ` Linus Torvalds
2010-07-07 18:50 ` Nick Piggin
2010-07-07 19:30 ` Linus Torvalds
2010-07-18 6:41 ` Christoph Hellwig
2010-07-18 17:03 ` Linus Torvalds
2010-07-07 18:16 ` Nick Piggin [this message]
-- strict thread matches above, loose matches on Subject: below --
2010-06-26 9:35 Christoph Hellwig
2010-06-26 9:56 ` Nick Piggin
2010-06-26 13:09 ` Christoph Hellwig
2010-06-26 13:16 ` Nick Piggin
2010-06-26 12:55 ` Neil Brown
2010-06-26 13:12 ` Christoph Hellwig
2010-06-27 7:55 ` Tao Ma
2010-06-27 9:20 ` Christoph Hellwig
2010-06-28 18:43 ` Andreas Dilger
2010-06-28 19:52 ` Ulrich Drepper
2010-06-28 20:07 ` Andreas Dilger
2010-06-29 8:57 ` Nick Piggin
2010-06-29 9:25 ` Christoph Hellwig
2010-06-29 9:59 ` Ulrich Drepper
2010-06-29 11:05 ` Nick Piggin
2010-06-29 12:57 ` Christoph Hellwig
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=20100707181631.GF9263@laptop \
--to=npiggin@suse.de \
--cc=drepper@redhat.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=torvalds@linux-foundation.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).