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-next>] [day] [month] [year] [list]
Date:   Fri, 27 Aug 2021 17:16:44 +0200
From:   Christoph Hellwig <hch@....de>
To:     NeilBrown <neilb@...e.de>
Cc:     "Darrick J. Wong" <darrick.wong@...cle.com>,
        Christoph Hellwig <hch@....de>,
        David Howells <dhowells@...hat.com>,
        torvalds@...ux-foundation.org, trond.myklebust@...marydata.com,
        linux-nfs@...r.kernel.org, linux-mm@...ck.org,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Don't block writes to swap-files with ETXTBSY.

On Thu, Aug 26, 2021 at 09:57:39AM +1000, NeilBrown wrote:
> 
> Commit dc617f29dbe5 ("vfs: don't allow writes to swap files")
> broke swap-over-NFS as it introduced an ETXTBSY error when NFS tries to
> swap-out using ->direct_IO().
> 
> There is no sound justification for this error.  File permissions are
> sufficient to stop non-root users from writing to a swap file, and root
> must always be cautious not to do anything dangerous.
> 
> These checks effectively provide a mandatory write lock on swap, and
> mandatory locks are not supported in Linux.
> 
> So remove all the checks that return ETXTBSY when attempts are made to
> write to swap.

Swap files are not just any files and do need a mandatory write lock
as they are part of the kernel VM and writing to them will mess up
the kernel badly.  David Howells actually has sent various patches
to fix swap over NFS in the last weeks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ