Re: Removing Mandatory Locks
From: Jeff Layton <jlayton@kernel.org>
Date: 2021-08-20 21:29:38
Also in:
linux-fsdevel, linux-mm, linux-unionfs, lkml
No, Windows has deny-mode locking at open time, but the kernel's mandatory locks are enforced during read/write (which is why they are such a pain). Samba will not miss these at all. If we want something to provide windows-like semantics, we'd probably want to start with something like Pavel Shilovsky's O_DENY_* patches. -- Jeff On Fri, 2021-08-20 at 12:17 -0700, H. Peter Anvin wrote:
I thought the main user was Samba and/or otherwise providing file service for M$ systems? On August 20, 2021 9:30:31 AM PDT, Kees Cook [off-list ref] wrote:quoted
On Thu, Aug 19, 2021 at 12:15:08PM -0700, Linus Torvalds wrote:quoted
On Thu, Aug 19, 2021 at 11:39 AM Jeff Layton [off-list ref] wrote:quoted
I'm all for ripping it out too. It's an insane interface anyway. I've not heard a single complaint about this being turned off in fedora/rhel or any other distro that has this disabled.I'd love to remove it, we could absolutely test it. The fact that several major distros have it disabled makes me think it's fine.FWIW, it is now disabled in Ubuntu too: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/impish/commit/?h=master-next&id=f3aac5e47789cbeb3177a14d3d2a06575249e14bquoted
But as always, it would be good to check Android.It looks like it's enabled (checking the Pixel 4 kernel image), but it's not specifically mentioned in any of the build configs that are used to construct the image, so I think this is just catching the "default y". I expect it'd be fine to turn this off. I will ask around to see if it's actually used.
-- Jeff Layton [off-list ref]