From: Eric Biggers <ebiggers@kernel.org>
To: "Theodore Y. Ts'o" <tytso@mit.edu>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH 3/3] ext4: add a new ioctl EXT4_IOC_GETSTATE
Date: Sun, 11 Aug 2019 14:38:36 -0700 [thread overview]
Message-ID: <20190811213836.GA17882@sol.localdomain> (raw)
In-Reply-To: <20190810001247.GA8368@mit.edu>
On Fri, Aug 09, 2019 at 08:12:47PM -0400, Theodore Y. Ts'o wrote:
> On Fri, Aug 09, 2019 at 12:18:12PM -0700, Eric Biggers wrote:
> > On Fri, Aug 09, 2019 at 02:18:31PM -0400, Theodore Ts'o wrote:
> > > The new ioctl EXT4_IOC_GETSTATE returns some of the dynamic state of
> > > an ext4 inode for debugging purposes.
> > >
> > > Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> > > ---
> > > fs/ext4/ext4.h | 11 +++++++++++
> > > fs/ext4/ioctl.c | 17 +++++++++++++++++
> > > 2 files changed, 28 insertions(+)
> > >
> > > diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h
> > > index f6c305b43ffa..58b7a0905186 100644
> > > --- a/fs/ext4/ext4.h
> > > +++ b/fs/ext4/ext4.h
> > > @@ -651,6 +651,7 @@ enum {
> > > #define EXT4_IOC_GET_ENCRYPTION_POLICY FS_IOC_GET_ENCRYPTION_POLICY
> > > /* ioctl codes 19--2F are reserved for fscrypt */
> > > #define EXT4_IOC_CLEAR_ES_CACHE _IO('f', 30)
> > > +#define EXT4_IOC_GETSTATE _IOW('f', 30, __u32)
> >
> > 30 == 0x1e overlaps with the range claimed to be reserved for fscrypt.
> >
> > Also, these two new ioctls are both number 30, which means they can't be
> > controlled separately by SELinux, which only looks at the number.
>
> Yeah, that was my screw up. The range reservation for fscrypt was
> intended to be in decimal starting with 19 decimal
> (FSIOC_SET_ENCRYPTION_POLICY), and I believe with the new key
> management we were up to 26? So If I reserve up to 39, that should be
> more than enough, do you agree?
>
> I'll then make EXT4_IOC_CLEAR_ES_CACHE 40 and EXT4_IOC_GETSTATE 41.
>
> If we're in agreement, then I'll add an update to
> Documentation/ioctl/ioctl-number.rst, which is badly out of date with
> respect to the ioctl's used in ext2 and ext4 (and of course ext3 has
> since been removed from the kernel tree).
>
Sounds good to me.
- Eric
next prev parent reply other threads:[~2019-08-11 21:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 18:18 [PATCH 1/3] ext4: return the extent cache information via fiemap Theodore Ts'o
2019-08-09 18:18 ` [PATCH 2/3] ext4: add a new ioctl EXT4_IOC_CLEAR_ES_CACHE Theodore Ts'o
2019-08-09 18:18 ` [PATCH 3/3] ext4: add a new ioctl EXT4_IOC_GETSTATE Theodore Ts'o
2019-08-09 19:18 ` Eric Biggers
2019-08-10 0:12 ` Theodore Y. Ts'o
2019-08-11 21:38 ` Eric Biggers [this message]
2019-08-10 7:33 ` [PATCH 1/3] ext4: return the extent cache information via fiemap Christoph Hellwig
2019-08-11 16:15 ` Theodore Y. Ts'o
2019-08-12 6:47 ` 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=20190811213836.GA17882@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.