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 PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 22 Jul 2022 10:46:32 -0400 From: Eric Whitney <enwlinux@...il.com> To: Theodore Ts'o <tytso@....edu> Cc: Eric Whitney <enwlinux@...il.com>, Jan Kara <jack@...e.cz>, linux-ext4@...r.kernel.org Subject: Re: [PATCH] ext4: minor defrag code improvements * Theodore Ts'o <tytso@....edu>: > On Wed, Jul 20, 2022 at 11:11:38AM -0400, Eric Whitney wrote: > > > Is ETXTBUSY still reported by the kernel? I couldn't find it in a search after > > > reading this: lwn.net/Articles/866493/ > > > I didn't consider that because an executable wasn't involved - interesting that > > > it was used for some operations applied to swap files. > > The LWN article is specifically about whether it's worth it to block > writes to executable files. > > However, if you look at some places where ETXTBSY is returned, such as > in fs/open.c and fs/read_write.c, it's being returned when there is > attempt to operate on a swap file using fallocate(2), write(2) or > copy_file(2). So I agree with Jan that it's better for the defrag > code to be consistent those uses of ETXTBSY. > > I'll also add that, "busy" does make some sense as a concept, since if > you run "swapoff", you can now defrag the file, since it's no longer > being used as a swap file --- hence, it's no longer busy. So I don't > have as visceral reaction to using EBUSY, but given the other ways > defrag might return EBUSY where it *would* make sense to retry the > defrag, I agree that changing the error return in the case of an > attempted defrag of a swap file to ETXTBSY makes sense. > > - Ted Thanks for your review. I'll modify the patch to return ETXTBSY and repost. Eric
Powered by blists - more mailing lists