Received: by 2002:a05:6a10:1d13:0:0:0:0 with SMTP id pp19csp1801366pxb; Fri, 20 Aug 2021 14:32:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwfV0uk4k5u0nFCvQKKs998+xIIXXSGm9FUGMCzjdyJmWB4g+YLASDd6bxvYl+SUiSC2hu+ X-Received: by 2002:a17:907:7e9e:: with SMTP id qb30mr1000723ejc.227.1629495143099; Fri, 20 Aug 2021 14:32:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1629495143; cv=none; d=google.com; s=arc-20160816; b=wAEo+h98sU4j3qXadZlh5PdlFfeKfHeQvOz4uBrFfoSL4vI62k+QVyu2GS/J0NDRSh tjZ6Xbrz7m134YSVtGKsWy/gPNjcM8VGDOCanKKs9hJIHt+PRCrACvgZ9TBG1tWn1hp6 VXx6gv1W1RQJN6qyLFC2SLRvLKHIY9dusYzAiOlHACy5w1Lp/mGQOdTTh8rIlgakbRmD kawI8l6qCitkWq4drR5W6VkRKLib/5uyUrXPN/RXoBKZeQ/eb0NhTGZZLVycpt7PJvVn nXvXAlAWahHoUOw8Wc+OWTIe/bJqYlff/lyyU4UwNaTJ6ln5WDHvGqcmZCUgHqYG71DJ yobQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=ZADZhnr/fajj23834eeo/wzwyOoi9WOQqqr4MPYuNEc=; b=baCp6CBwRwEltH1G9AXjvhPFPPZvS0PXZu4fcAA48IveP8dRfn9J2NcPDQ4ufxKhC8 11yZTexoLGmskyHRRoL7pfyhzISD9zDeSabLV38+3bEmnzNeBRSYnXOmwx+9MdEw8kfn KTMn09MNLW0LACBb4E0zjSk8tM6rqg64wpdGAaQ5lsYv3rqacRh5C2OTDiVYnOz592ru bAmDdEFVKt8h/wK+YtU1rPrFwd8EwnmphH5p/ESW98JmM3JNBrubYBN2x0aXnPaKUecy hsbf+Zlh1tAimJ5x/bJ1iV+gGhFeRPZnLQm5twdhsFF5B7W4hsdFbuWEG2DMXkAwzgcj TOZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=paHJbV4a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d9si8455558edy.7.2021.08.20.14.31.49; Fri, 20 Aug 2021 14:32:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=paHJbV4a; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240747AbhHTVaP (ORCPT + 99 others); Fri, 20 Aug 2021 17:30:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:59602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231761AbhHTVaO (ORCPT ); Fri, 20 Aug 2021 17:30:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3DDF461102; Fri, 20 Aug 2021 21:29:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1629494976; bh=CSpxkRr0njJFwn1bNyK1M/lOW65Uuk1c0JklPI8xo7w=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=paHJbV4aD+5TZGOJ6zZf6GRISmKjaaMLmZ5WgIftKEepMQlOUns10X8IPDExdOOjN M/+2s9X8hIT0bzVhH2fJEWiuiA3DReUbBZJoMKhaDOClD3nTHIWlYB3Z64nnt3IhjL Qhyaur14Ly1nMotZUaNZOApgaDumSL5frA7f9XxVB79HQOiVXHYr7NQQccH4YDlqrf pCmUTnDPPVkixLdijZ31QqSe4oSUdYj8fOH7Z0pokJ7Kbt2XwdSi/ylF1dTttV1iS0 eVX16h4vU8/pa8yUqM7lcwkLKoy6p1J7oOXmydwT/haVOnxxqpZGiI5kpbF4jOXCLq SEYYNJYbWsn5w== Message-ID: <8a6737f9fa2dd3b8b9d851064cd28ca57e489a77.camel@kernel.org> Subject: Re: Removing Mandatory Locks From: Jeff Layton To: "H. Peter Anvin" , Kees Cook , Linus Torvalds Cc: "Eric W. Biederman" , Matthew Wilcox , Andy Lutomirski , David Laight , David Hildenbrand , Linux Kernel Mailing List , Andrew Morton , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Al Viro , Alexey Dobriyan , Steven Rostedt , "Peter Zijlstra (Intel)" , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Petr Mladek , Sergey Senozhatsky , Andy Shevchenko , Rasmus Villemoes , Greg Ungerer , Geert Uytterhoeven , Mike Rapoport , Vlastimil Babka , Vincenzo Frascino , Chinwen Chang , Michel Lespinasse , Catalin Marinas , Huang Ying , Jann Horn , Feng Tang , Kevin Brodsky , Michael Ellerman , Shawn Anastasio , Steven Price , Nicholas Piggin , Christian Brauner , Jens Axboe , Gabriel Krisman Bertazi , Peter Xu , Suren Baghdasaryan , Shakeel Butt , Marco Elver , Daniel Jordan , Nicolas Viennot , Thomas Cedeno , Collin Fijalkovich , Michal Hocko , Miklos Szeredi , Chengguang Xu , Christian =?ISO-8859-1?Q?K=F6nig?= , "linux-unionfs@vger.kernel.org" , Linux API , the arch/x86 maintainers , "" , Linux-MM , Florian Weimer , Michael Kerrisk Date: Fri, 20 Aug 2021 17:29:30 -0400 In-Reply-To: References: <87eeay8pqx.fsf@disp2133> <5b0d7c1e73ca43ef9ce6665fec6c4d7e@AcuMS.aculab.com> <87h7ft2j68.fsf@disp2133> <87k0kkxbjn.fsf_-_@disp2133> <0c2af732e4e9f74c9d20b09fc4b6cbae40351085.camel@kernel.org> <202108200905.BE8AF7C@keescook> Content-Type: text/plain; charset="ISO-8859-15" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 wrote: > > On Thu, Aug 19, 2021 at 12:15:08PM -0700, Linus Torvalds wrote: > > > On Thu, Aug 19, 2021 at 11:39 AM Jeff Layton wrote: > > > > > > > > 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=f3aac5e47789cbeb3177a14d3d2a06575249e14b > > > > > 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