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, 18 Jan 2023 10:28:12 +0100
From:   Jan Kara <jack@...e.cz>
To:     "Darrick J. Wong" <djwong@...nel.org>
Cc:     Luis Chamberlain <mcgrof@...nel.org>, hch@...radead.org,
        song@...nel.org, rafael@...nel.org, gregkh@...uxfoundation.org,
        viro@...iv.linux.org.uk, jack@...e.cz, bvanassche@....org,
        ebiederm@...ssion.com, mchehab@...nel.org, keescook@...omium.org,
        p.raghav@...sung.com, linux-fsdevel@...r.kernel.org,
        kernel@...force.de, kexec@...ts.infradead.org,
        linux-kernel@...r.kernel.org, xfs <linux-xfs@...r.kernel.org>
Subject: Re: [RFC v3 03/24] fs: distinguish between user initiated freeze and
 kernel initiated freeze

On Tue 17-01-23 18:25:40, Darrick J. Wong wrote:
> [add linux-xfs to cc on this one]
> 
> On Fri, Jan 13, 2023 at 04:33:48PM -0800, Luis Chamberlain wrote:
> > Userspace can initiate a freeze call using ioctls. If the kernel decides
> > to freeze a filesystem later it must be able to distinguish if userspace
> > had initiated the freeze, so that it does not unfreeze it later
> > automatically on resume.
> 
> Hm.  Zooming out a bit here, I want to think about how kernel freezes
> should behave...
> 
> > Likewise if the kernel is initiating a freeze on its own it should *not*
> > fail to freeze a filesystem if a user had already frozen it on our behalf.
> 
> ...because kernel freezes can absorb an existing userspace freeze.  Does
> that mean that userspace should be prevented from undoing a kernel
> freeze?  Even in that absorption case?
> 
> Also, should we permit multiple kernel freezes of the same fs at the
> same time?  And if we do allow that, would they nest like freeze used to
> do?
> 
> (My suggestions here are 'yes', 'yes', and '**** no'.)

Yeah, makes sense to me. So I think the mental model to make things safe
is that there are two flags - frozen_by_user, frozen_by_kernel - and the
superblock is kept frozen as long as either of these is set.

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ