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]
Date:   Wed, 14 Jun 2023 07:07:16 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     Sergei Shtepa <sergei.shtepa@...am.com>
Cc:     Christoph Hellwig <hch@...radead.org>,
        Dave Chinner <david@...morbit.com>, axboe@...nel.dk,
        corbet@....net, snitzer@...nel.org, viro@...iv.linux.org.uk,
        brauner@...nel.org, dchinner@...hat.com, willy@...radead.org,
        dlemoal@...nel.org, linux@...ssschuh.net, jack@...e.cz,
        ming.lei@...hat.com, linux-block@...r.kernel.org,
        linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, Donald Buczek <buczek@...gen.mpg.de>
Subject: Re: [PATCH v5 04/11] blksnap: header file of the module interface

On Wed, Jun 14, 2023 at 11:26:20AM +0200, Sergei Shtepa wrote:
> This code worked quite successfully for the veeamsnap module, on the
> basis of which blksnap was created. Indeed, such an allocation of an
> area on a block device using a file does not look safe.
> 
> We've already discussed this with Donald Buczek <buczek@...gen.mpg.de>.
> Link: https://github.com/veeam/blksnap/issues/57#issuecomment-1576569075
> And I have planned work on moving to a more secure ioctl in the future.
> Link: https://github.com/veeam/blksnap/issues/61
> 
> Now, thanks to Dave, it becomes clear to me how to solve this problem best.
> swapfile is a good example of how to do it right.

I don't actually think swapfile is a very good idea, in fact the Linux
swap code in general is not a very good place to look for inspirations
:)

IFF the usage is always to have a whole file for the diff storage the
over all API is very simple - just pass a fd to the kernel for the area,
and then use in-kernel direct I/O on it.  Now if that file should also
be able to reside on the same file system that the snapshot is taken
of things get a little more complicated, because writes to it also need
to automatically set the BIO_REFFED flag.  I have some ideas for that
and will share some draft code with you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ