Re: [PATCH v4 0/4] overlayfs: Optimize override/revert creds

From: Amir Goldstein
Date: Fri Nov 08 2024 - 11:58:11 EST


On Thu, Nov 7, 2024 at 11:19 AM Amir Goldstein <amir73il@xxxxxxxxx> wrote:
>
> On Thu, Nov 7, 2024 at 1:57 AM Vinicius Costa Gomes
> <vinicius.gomes@xxxxxxxxx> wrote:
> >
> > Hi,
> >
> > Changes from v3:
> > - Another reorganization of the series: separate the pure mechanical
> > changes into their own (Amir Goldstein)
> >
> > The series now reads:
> >
> > Patch 1: Introduce the _light() version of the override/revert cred operations;
> > Patch 2: Convert backing-file.c to use those;
> > Patch 3: Mechanical change to introduce the ovl_revert_creds() helper;
> > Patch 4: Make the ovl_{override,convert}_creds() use the _light()
> > creds helpers, and fix the reference counting issue that would happen;
> >
>
> For the record, this series depends on backing_file API cleanup patch by Miklos:
> https://lore.kernel.org/linux-fsdevel/20241021103340.260731-1-mszeredi@xxxxxxxxxx/
>
> > Changes from v2:
> > - Removed the "convert to guard()/scoped_guard()" patches (Miklos Szeredi);
> > - In the overlayfs code, convert all users of override_creds()/revert_creds() to the _light() versions by:
> > 1. making ovl_override_creds() use override_creds_light();
> > 2. introduce ovl_revert_creds() which calls revert_creds_light();
> > 3. convert revert_creds() to ovl_revert_creds()
> > (Amir Goldstein);
> > - Fix an potential reference counting issue, as the lifetime
> > expectations of the mounter credentials are different (Christian
> > Brauner);
> >
>
> I pushed these patches to:
> https://github.com/amir73il/linux/commits/ovl_creds
>
> rebased overlayfs-next on top of them and tested.
>
> Christian,
>
> Since this work is mostly based on your suggestions,
> I thought that you might want to author and handle this PR?
>
> Would you like to take the patches from ovl_creds (including the backing_file
> API cleanup) to a stable branch in your tree for me to base overlayfs-next on?
> Or would you rather I include them in the overlayfs PR for v6.13 myself?
>

For now, there patches are queued in overlayfs-next.

Thanks Vinicius,
for being patient and working through all the different revisions!

Amir.