ACK: [SRU][F][G][H][PATCH v2] UBUNTU: SAUCE: overlayfs: fix incorrect mnt_id of files opened from map_files
Alexander Mikhalitsyn
alexander at mihalicyn.com
Tue May 4 12:27:53 UTC 2021
On Mon, 3 May 2021 15:58:46 -0500
Seth Forshee <seth.forshee at canonical.com> wrote:
> On Mon, May 03, 2021 at 08:37:18PM +0300, Alexander Mikhalitsyn wrote:
> > On Fri, 30 Apr 2021 15:37:42 -0500
> > Seth Forshee <seth.forshee at canonical.com> wrote:
> >
> > > On Mon, Apr 26, 2021 at 11:11:21AM +0300, alexander at mihalicyn.com wrote:
> > > > From: Alexander Mikhalitsyn <alexander at mihalicyn.com>
> > > >
> > > > BugLink: https://bugs.launchpad.net/bugs/1857257
> > > >
> > > > The hack was introduced in ("UBUNTU: SAUCE: overlayfs: allow with
> > > > shiftfs as underlay") and it broke checkpoint/restore of docker
> > > > contains:
> > > > https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1857257
> > > >
> > > > The following script can be used to trigger the issue:
> > > > #!/bin/bash
> > > >
> > > > cat > test.py << EOF
> > > > import sys
> > > >
> > > > f = open("/proc/self/maps")
> > > >
> > > > for l in f.readlines():
> > > > if "python" not in l:
> > > > continue
> > > > print(l)
> > > > s = l.split()
> > > > start, end = s[0].split("-")
> > > > fname = s[-1]
> > > > print(start, end, fname)
> > > > break
> > > > else:
> > > > sys.exit(1)
> > > >
> > > > test_file1 = open(fname)
> > > > test_file2 = open("/proc/self/map_files/%s-%s" % (start, end))
> > > >
> > > > fdinfo1 = open("/proc/self/fdinfo/%d" % test_file1.fileno()).read()
> > > > fdinfo2 = open("/proc/self/fdinfo/%d" % test_file2.fileno()).read()
> > > >
> > > > if fdinfo1 != fdinfo2:
> > > > print("FAIL")
> > > > print(test_file1)
> > > > print(fdinfo1)
> > > > print(test_file2)
> > > > print(fdinfo2)
> > > > sys.exit(1)
> > > > print("PASS")
> > > > EOF
> > > > sudo docker run -it --privileged --rm -v `pwd`:/mnt python python /mnt/test.py
> > > >
> > > > Thanks to Andrei Vagin for the reproducer and investigation of this problem.
> > > >
> > > > Cc: Andrei Vagin <avagin at gmail.com>
> > > > Cc: Adrian Reber <areber at redhat.com>
> > > > Cc: Christian Brauner <christian.brauner at ubuntu.com>
> > > > Cc: Stefan Bader <stefan.bader at canonical.com>
> > > > Cc: Kleber Sacilotto de Souza <kleber.souza at canonical.com>
> > > > Cc: Krzysztof Kozlowski <krzysztof.kozlowski at canonical.com>
> > > >
> > > > Fixes: d24b8a5 ("UBUNTU: SAUCE: overlayfs: allow with shiftfs as underlay")
> > > > Signed-off-by: Alexander Mikhalitsyn <alexander at mihalicyn.com>
> > >
> > > I tested with and without this patch using the xfstests overlay tests
> > > and saw no regressions. The use of vm_prfile is limited to very few use
> > > cases, all within proc, so I think this change should be safe.
> > >
> > > Acked-by: Seth Forshee <seth.forshee at canonical.com>
> >
> > Hi, Seth
> >
> > Thanks for review and testing!
> > Do I need to resend this patch with your "Acked-by" tag or I need to wait for another maintainer and get second ACK?
>
> You don't need to resend at all, though the patch will need another ack.
got it
>
> Also, today I became aware of a stable patch for at least 5.11 which has
> conflicts with this patch. I'm testing an updated version of the patch
> with the conflicts resolved, which we might need to use for at least
> hirsute/impish.
thanks!
>
> Seth
Alex
More information about the kernel-team
mailing list