Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1590421

Re: Bug fix for uid/gid in jffs2

From David Woodhouse <dwmw2@infradead.org>
Newsgroups linux.kernel
Subject Re: Bug fix for uid/gid in jffs2
Date 2017-03-01 16:40 +0100
Message-ID <tgewa-4ZE-31@gated-at.bofh.it> (permalink)
References <tg8h4-AQ-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Wed, 2017-03-01 at 16:44 +0800, yangshukui wrote:
> 
> @@ -146,8 +146,8 @@ struct jffs2_raw_inode
>       jint32_t ino;        /* Inode number.  */
>       jint32_t version;    /* Version number.  */
>       jmode_t mode;       /* The file's type or mode.  */
> -    jint16_t uid;        /* The file's owner.  */
> -    jint16_t gid;        /* The file's group.  */
> +    jint32_t uid;        /* The file's owner.  */
> +    jint32_t gid;        /* The file's group.  */

This is changing the binary data structures on the flash, and breaking
compatibility with all existing file systems. Your modified kernel
won't be able to mount existing JFFS2 images.

The way to do this, if we really do need 32-bit ugid support in JFFS2,
is to define a *new* node (JFFS2_NODE_INCOMPAT) type, and then support
reading both. You could even contrive a way to make it
JFFS2_NODE_ROCOMPAT; perhaps a new node type which contains *only* the
(32-bit) ownership information and overrides the 16-bit ones in the
original data nodes? 

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Bug fix for uid/gid in jffs2 yangshukui <yangshukui@huawei.com> - 2017-03-01 10:00 +0100
  Re: Bug fix for uid/gid in jffs2 David Woodhouse <dwmw2@infradead.org> - 2017-03-01 16:40 +0100

csiph-web