mbox series

[6.6,0/3] Manual backport of overlayfs fixes from v6.6.72

Message ID 20250121110815.416785-1-amir73il@gmail.com (mailing list archive)
Headers show
Series Manual backport of overlayfs fixes from v6.6.72 | expand

Message

Amir Goldstein Jan. 21, 2025, 11:08 a.m. UTC
Greg,

Per your request, here is a manual backport of the overlayfs fixes that
were applied in v6.6.72 and reverted in v6.6.73.

For the record, this overlayfs series from v6.7 [2] changes subtle
internal semantics across overlayfs code, which are not detectable by
build error and therefore are a backporting landmine.

This is exactly what happened with the automatic apply of dependecy
patch in v6.6.72.

I will try to be extra diligent about review of auto backports below
v6.7 from now on.

Luckily, the leaked mount reference was caught by a vfs assertion and
promptly reported by Ignat from Cloudflare team.

Thanks!
Amir.

[1] https://lore.kernel.org/stable/2025012123-cable-reburial-568e@gregkh/
[2] https://lore.kernel.org/linux-unionfs/20230816152334.924960-1-amir73il@gmail.com/

Amir Goldstein (3):
  ovl: pass realinode to ovl_encode_real_fh() instead of realdentry
  ovl: support encoding fid from inode with no alias
  fs: relax assertions on failure to encode file handles

 fs/notify/fdinfo.c       |  4 +---
 fs/overlayfs/copy_up.c   | 16 ++++++-------
 fs/overlayfs/export.c    | 49 ++++++++++++++++++++++------------------
 fs/overlayfs/namei.c     |  4 ++--
 fs/overlayfs/overlayfs.h |  2 +-
 5 files changed, 39 insertions(+), 36 deletions(-)

Comments

Amir Goldstein Jan. 21, 2025, 11:14 a.m. UTC | #1
On Tue, Jan 21, 2025 at 12:08 PM Amir Goldstein <amir73il@gmail.com> wrote:
>
> Greg,
>
> Per your request, here is a manual backport of the overlayfs fixes that
> were applied in v6.6.72 and reverted in v6.6.73.
>

Forgot to mention that I backported one extra patch from 6.12.y.
It is not an overlayfs patch, but it fixes in a more generic way
(removing an unneeded assertion) the same bug report that the
overlayfs patches fix.

Both fixes are needed, because the assertion could have been hit
without overlayfs and because the overlayfs fixes are needed to
fix bugs other than the assertion.

Thanks,
Amir.

> For the record, this overlayfs series from v6.7 [2] changes subtle
> internal semantics across overlayfs code, which are not detectable by
> build error and therefore are a backporting landmine.
>
> This is exactly what happened with the automatic apply of dependecy
> patch in v6.6.72.
>
> I will try to be extra diligent about review of auto backports below
> v6.7 from now on.
>
> Luckily, the leaked mount reference was caught by a vfs assertion and
> promptly reported by Ignat from Cloudflare team.
>
> Thanks!
> Amir.
>
> [1] https://lore.kernel.org/stable/2025012123-cable-reburial-568e@gregkh/
> [2] https://lore.kernel.org/linux-unionfs/20230816152334.924960-1-amir73il@gmail.com/
>
> Amir Goldstein (3):
>   ovl: pass realinode to ovl_encode_real_fh() instead of realdentry
>   ovl: support encoding fid from inode with no alias
>   fs: relax assertions on failure to encode file handles
>
>  fs/notify/fdinfo.c       |  4 +---
>  fs/overlayfs/copy_up.c   | 16 ++++++-------
>  fs/overlayfs/export.c    | 49 ++++++++++++++++++++++------------------
>  fs/overlayfs/namei.c     |  4 ++--
>  fs/overlayfs/overlayfs.h |  2 +-
>  5 files changed, 39 insertions(+), 36 deletions(-)
>
> --
> 2.34.1
>
Greg KH Jan. 21, 2025, 11:21 a.m. UTC | #2
On Tue, Jan 21, 2025 at 12:14:28PM +0100, Amir Goldstein wrote:
> On Tue, Jan 21, 2025 at 12:08 PM Amir Goldstein <amir73il@gmail.com> wrote:
> >
> > Greg,
> >
> > Per your request, here is a manual backport of the overlayfs fixes that
> > were applied in v6.6.72 and reverted in v6.6.73.
> >
> 
> Forgot to mention that I backported one extra patch from 6.12.y.
> It is not an overlayfs patch, but it fixes in a more generic way
> (removing an unneeded assertion) the same bug report that the
> overlayfs patches fix.
> 
> Both fixes are needed, because the assertion could have been hit
> without overlayfs and because the overlayfs fixes are needed to
> fix bugs other than the assertion.

No worries, looks good, thanks for the backports, I'll go queue them up
right now.

greg k-h