lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d76415de-2056-c7d6-cc88-b896deaa8ead@torlan.ru>
Date:   Fri, 3 Aug 2018 00:32:21 +0300
From:   WGH <wgh@...lan.ru>
To:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Ilya Dryomov <idryomov@...il.com>
Cc:     Jens Axboe <axboe@...nel.dk>,
        linux-block <linux-block@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Sagi Grimberg <sagi@...mberg.me>,
        Mike Snitzer <snitzer@...hat.com>, dm-devel@...hat.com
Subject: Re: LVM snapshot broke between 4.14 and 4.16

On 08/02/2018 09:32 PM, Linus Torvalds wrote:
> WGH (sorry, no idea what your real name is) - what's the source of the
> script that broke? Was it some system script you got from outside and
> likely to affect others too?
>
> Or was it just some local thing you wrote yourself and was
> unintentionally buggy and nobody else is likely to hit this?
>
> Because if the latter, if you can work around it and you're the only
> user this hits, we might just be able to ignore it.

The script in question is written by me and contains literally two lines:

    lvcreate --size 5G --snapshot --name snap0 --permission r
/dev/mapper/vg0-lvol_rootfs
    mount /dev/mapper/vg0-snap0 /mnt/rootfs_snapshot

The script is not buggy (I think), it was written under simple
assumption that --permission r works. And it does - unless you happen to
have combination of kernel >=4.16 and lvm2 <2.02.178.

The commit in question appeared only in 4.16, and this kernel version is
not widespread yet. You have to be running both recent kernel and
not-so-recent lvm2 to be bitten by this. This probably explains why no
one else reported this problem.

Workaround certainly exists: I can just create read-write snapshot, but
mount it read-only. The reason why I didn't discover the workaround
earlier is that after unsuccessful read-only snapshot creation system
ends up in some weird state where read-write snapshots are also failing
with the same error (until reboot). So I got a wrong impression that
read-write snapshots were broken as well.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ