All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Amir Goldstein <amir73il@gmail.com>, Sasha Levin <sashal@kernel.org>
Subject: Re: [PATCH 6.6 1/3] ovl: pass realinode to ovl_encode_real_fh() instead of realdentry
Date: Tue, 21 Jan 2025 14:52:52 -0500	[thread overview]
Message-ID: <20250121131434-f734405aee7c8bc1@stable.kernel.org> (raw)
In-Reply-To: <20250121110815.416785-2-amir73il@gmail.com>

[ Sasha's backport helper bot ]

Hi,

The upstream commit SHA1 provided is correct: 07aeefae7ff44d80524375253980b1bdee2396b0


Status in newer kernel trees:
6.12.y | Present (different SHA1: 668d8dea2cee)
6.6.y | Present (different SHA1: a3f8a2b13a27)

Note: The patch differs from the upstream commit:
---
1:  07aeefae7ff44 ! 1:  8f1f4e6b34fc1 ovl: pass realinode to ovl_encode_real_fh() instead of realdentry
    @@ Metadata
      ## Commit message ##
         ovl: pass realinode to ovl_encode_real_fh() instead of realdentry
     
    +    [ Upstream commit 07aeefae7ff44d80524375253980b1bdee2396b0 ]
    +
         We want to be able to encode an fid from an inode with no alias.
     
         Signed-off-by: Amir Goldstein <amir73il@gmail.com>
         Link: https://lore.kernel.org/r/20250105162404.357058-2-amir73il@gmail.com
         Signed-off-by: Christian Brauner <brauner@kernel.org>
    +    Stable-dep-of: c45beebfde34 ("ovl: support encoding fid from inode with no alias")
    +    Signed-off-by: Sasha Levin <sashal@kernel.org>
    +    [re-applied over v6.6.71 with conflict resolved]
    +    Signed-off-by: Amir Goldstein <amir73il@gmail.com>
     
      ## fs/overlayfs/copy_up.c ##
     @@ fs/overlayfs/copy_up.c: int ovl_set_attr(struct ovl_fs *ofs, struct dentry *upperdentry,
    @@ fs/overlayfs/copy_up.c: struct ovl_fh *ovl_encode_real_fh(struct ovl_fs *ofs, st
      	buflen = (dwords << 2);
      
      	err = -EIO;
    -@@ fs/overlayfs/copy_up.c: struct ovl_fh *ovl_get_origin_fh(struct ovl_fs *ofs, struct dentry *origin)
    - 	if (!ovl_can_decode_fh(origin->d_sb))
    - 		return NULL;
    - 
    --	return ovl_encode_real_fh(ofs, origin, false);
    -+	return ovl_encode_real_fh(ofs, d_inode(origin), false);
    - }
    - 
    - int ovl_set_origin_fh(struct ovl_fs *ofs, const struct ovl_fh *fh,
    +@@ fs/overlayfs/copy_up.c: int ovl_set_origin(struct ovl_fs *ofs, struct dentry *lower,
    + 	 * up and a pure upper inode.
    + 	 */
    + 	if (ovl_can_decode_fh(lower->d_sb)) {
    +-		fh = ovl_encode_real_fh(ofs, lower, false);
    ++		fh = ovl_encode_real_fh(ofs, d_inode(lower), false);
    + 		if (IS_ERR(fh))
    + 			return PTR_ERR(fh);
    + 	}
     @@ fs/overlayfs/copy_up.c: static int ovl_set_upper_fh(struct ovl_fs *ofs, struct dentry *upper,
      	const struct ovl_fh *fh;
      	int err;
    @@ fs/overlayfs/export.c: static int ovl_dentry_to_fid(struct ovl_fs *ofs, struct d
      
     
      ## fs/overlayfs/namei.c ##
    -@@ fs/overlayfs/namei.c: int ovl_verify_origin_xattr(struct ovl_fs *ofs, struct dentry *dentry,
    +@@ fs/overlayfs/namei.c: int ovl_verify_set_fh(struct ovl_fs *ofs, struct dentry *dentry,
      	struct ovl_fh *fh;
      	int err;
      
    @@ fs/overlayfs/overlayfs.h: int ovl_copy_up_with_data(struct dentry *dentry);
     -struct ovl_fh *ovl_encode_real_fh(struct ovl_fs *ofs, struct dentry *real,
     +struct ovl_fh *ovl_encode_real_fh(struct ovl_fs *ofs, struct inode *realinode,
      				  bool is_upper);
    - struct ovl_fh *ovl_get_origin_fh(struct ovl_fs *ofs, struct dentry *origin);
    - int ovl_set_origin_fh(struct ovl_fs *ofs, const struct ovl_fh *fh,
    + int ovl_set_origin(struct ovl_fs *ofs, struct dentry *lower,
    + 		   struct dentry *upper);
---

Results of testing on various branches:

| Branch                    | Patch Apply | Build Test |
|---------------------------|-------------|------------|
| stable/linux-6.6.y        |  Success    |  Success   |
| stable/linux-6.1.y        |  Success    |  Failed    |

Build Errors:
Build error for stable/linux-6.1.y:
    fs/overlayfs/copy_up.c: In function 'ovl_encode_real_fh':
    fs/overlayfs/copy_up.c:360:19: error: too many arguments to function 'exportfs_encode_inode_fh'
      360 |         fh_type = exportfs_encode_inode_fh(realinode, (void *)fh->fb.fid,
          |                   ^~~~~~~~~~~~~~~~~~~~~~~~
    In file included from fs/overlayfs/copy_up.c:21:
    ./include/linux/exportfs.h:228:12: note: declared here
      228 | extern int exportfs_encode_inode_fh(struct inode *inode, struct fid *fid,
          |            ^~~~~~~~~~~~~~~~~~~~~~~~
    make[3]: *** [scripts/Makefile.build:250: fs/overlayfs/copy_up.o] Error 1
    make[3]: Target 'fs/overlayfs/' not remade because of errors.
    make[2]: *** [scripts/Makefile.build:503: fs/overlayfs] Error 2
    make[2]: Target 'fs/' not remade because of errors.
    make[1]: *** [scripts/Makefile.build:503: fs] Error 2
    make[1]: Target './' not remade because of errors.
    make: *** [Makefile:2009: .] Error 2
    make: Target '__all' not remade because of errors.

  reply	other threads:[~2025-01-21 19:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-21 11:08 [PATCH 6.6 0/3] Manual backport of overlayfs fixes from v6.6.72 Amir Goldstein
2025-01-21 11:08 ` [PATCH 6.6 1/3] ovl: pass realinode to ovl_encode_real_fh() instead of realdentry Amir Goldstein
2025-01-21 19:52   ` Sasha Levin [this message]
2025-01-21 11:08 ` [PATCH 6.6 2/3] ovl: support encoding fid from inode with no alias Amir Goldstein
2025-01-21 11:08 ` [PATCH 6.6 3/3] fs: relax assertions on failure to encode file handles Amir Goldstein
2025-01-21 11:14 ` [PATCH 6.6 0/3] Manual backport of overlayfs fixes from v6.6.72 Amir Goldstein
2025-01-21 11:21   ` Greg Kroah-Hartman

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=20250121131434-f734405aee7c8bc1@stable.kernel.org \
    --to=sashal@kernel.org \
    --cc=amir73il@gmail.com \
    --cc=stable@vger.kernel.org \
    /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.