Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #69670

Bug#969223: Can't rm directory on overlayfs in userns

From Nicolas Schier <nicolas@fjasle.eu>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#969223: Can't rm directory on overlayfs in userns
Date 2021-03-03 11:40 +0100
Message-ID <BOx57-7JK-1@gated-at.bofh.it> (permalink)
References (7 earlier) <BOuqB-65P-1@gated-at.bofh.it> <AJ9S1-516-1@gated-at.bofh.it> <BOw93-7aM-3@gated-at.bofh.it> <AJ9S1-516-1@gated-at.bofh.it> <BOw93-7aM-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Wed 03 Mar 2021 17:33:16 GMT Shengjing Zhu write:
> 
> On Wed, Mar 3, 2021 at 3:40 PM Nicolas Schier <nicolas@fjasle.eu> wrote:
> > > [2]: https://lore.kernel.org/linux-unionfs/CAJfpegsiuf8ib5cvVrr=zHZ+Xu7BMMTT2eYapsEUdmPcRBUiwQ@mail.gmail.com/T/#t
> >
> > The overlay fs patchset [2] has been merged and with v5.10.13 (tested
> > on linux-image-5.10.0-3-arm64) the issue is no more reproducible for
> > me.  Might you want to re-check on your site?
> >
> 
> If I understand correctly, the upstream patch is merged into the v5.11 tree.

Sorry.  Yes, you're right.

> And I still can reproduce the error on the Debian v5.10 kernel.

That confuses me quite a bit.  I did it once again on an ext4 mount 
(still the 5.10.0-3-arm64 kernel):

  nsc@lillesand:/tmp$ cat /sys/module/overlay/parameters/permit_mounts_in_userns 
  Y
  nsc@lillesand:/tmp$ mkdir -p test/lower/a test/merged test/upper test/work
  nsc@lillesand:/tmp$ uname -a | tee test/lower/a/a
  Linux lillesand 5.10.0-3-arm64 #1 SMP Debian 5.10.13-1 (2021-02-06) aarch64 GNU/Linux
  nsc@lillesand:/tmp$ unshare -m -U -r
  root@lillesand:/tmp# mount -t overlay -o rw,lowerdir=/tmp/test/lower,upperdir=/tmp/test/upper,workdir=/tmp/test/work overlay /tmp/test/merged
  root@lillesand:/tmp# rm -rf test/merged/a
  root@lillesand:/tmp# find test -ls
    1597776      4 drwxr-xr-x   6 root     root         4096 mars  3 08:24 test
    1973978      4 drwxr-xr-x   2 root     root         4096 mars  3 08:27 test/upper
    2099881      0 c---------   1 root     root       0,   0 mars  3 08:27 test/upper/a
    1973978      4 drwxr-xr-x   1 root     root         4096 mars  3 08:27 test/merged
    1714388      4 drwxr-xr-x   3 root     root         4096 mars  3 08:24 test/lower
    1714389      4 drwxr-xr-x   2 root     root         4096 mars  3 08:27 test/lower/a
    1714393      4 -rw-r--r--   1 root     root           86 mars  3 10:48 test/lower/a/a
    1973979      4 drwxr-xr-x   3 root     root         4096 mars  3 10:48 test/work
    2099880      4 d---------   2 root     root         4096 mars  3 10:48 test/work/work
  root@lillesand:/tmp# 

Do you see any kernel log message from overlay fs?  Might it depend on 
the underlying filesystem? Can you create a white-out char dev node 
manually?

> And another thing is that the upstream patch introduces a new mount
> option, userxattr, instead of module parameter.

The 'permit_mounts_in_userns' module parameter becomes superfluous with 
v5.11 as overlay fs mounts will then always be enabled in userspace 
namespace.

Kind regards,
Nicolas

-- 
epost: nicolas@fjasle.eu               irc://oftc.net/nsc
↳ gpg: 18ed 52db e34f 860e e9fb  c82b 7d97 0932 55a0 ce7f
     -- frykten for herren er opphav til kunnskap --

Back to linux.debian.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#969223: Can't rm directory on overlayfs in userns Shengjing Zhu <zhsj@debian.org> - 2020-08-29 16:20 +0200
  Bug#969223: Can't rm directory on overlayfs in userns Shengjing Zhu <zhsj@debian.org> - 2020-09-02 06:00 +0200
    Bug#969223: Can't rm directory on overlayfs in userns Nicolas Schier <nicolas@fjasle.eu> - 2020-09-16 10:10 +0200
      Bug#969223: Can't rm directory on overlayfs in userns Shengjing Zhu <zhsj@debian.org> - 2020-09-16 19:00 +0200
        Bug#969223: Can't rm directory on overlayfs in userns Nicolas Schier <nicolas@fjasle.eu> - 2020-09-16 21:00 +0200
          Bug#969223: Can't rm directory on overlayfs in userns Shengjing Zhu <zhsj@debian.org> - 2020-09-16 21:10 +0200
            Bug#969223: Can't rm directory on overlayfs in userns Nicolas Schier <nicolas@fjasle.eu> - 2020-12-11 09:30 +0100
              Bug#969223: Can't rm directory on overlayfs in userns Nicolas Schier <nicolas@fjasle.eu> - 2021-03-03 08:50 +0100
                Bug#969223: Can't rm directory on overlayfs in userns Shengjing Zhu <zhsj@debian.org> - 2021-03-03 10:40 +0100
                Bug#969223: Can't rm directory on overlayfs in userns Nicolas Schier <nicolas@fjasle.eu> - 2021-03-03 11:40 +0100
                Bug#969223: Can't rm directory on overlayfs in userns Shengjing Zhu <zhsj@debian.org> - 2021-03-03 16:00 +0100
                Bug#969223: Can't rm directory on overlayfs in userns Nicolas Schier <nicolas@fjasle.eu> - 2021-03-11 07:20 +0100

csiph-web