linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: yangshukui <yangshukui@huawei.com>,
	linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: Bug fix for uid/gid in jffs2
Date: Wed, 01 Mar 2017 09:29:13 +0000	[thread overview]
Message-ID: <1488360553.5629.43.camel@infradead.org> (raw)
In-Reply-To: <58B689F1.3000000@huawei.com>

[-- Attachment #1: Type: text/plain, Size: 1117 bytes --]

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? 

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 4938 bytes --]

  reply	other threads:[~2017-03-01 15:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-01  8:44 Bug fix for uid/gid in jffs2 yangshukui
2017-03-01  9:29 ` David Woodhouse [this message]
2017-06-14  6:30 ` [PATCH] fs/jffs2: Fix a Invalid argument error when mkdir in jffs2 which is mounted as overlayfs yangshukui
2017-06-14 15:55   ` Richard Weinberger

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=1488360553.5629.43.camel@infradead.org \
    --to=dwmw2@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=yangshukui@huawei.com \
    /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).