Linux NFS development
 help / color / mirror / Atom feed
From: Benjamin Coddington <bcodding@redhat.com>
To: Jeff Layton <jlayton@kernel.org>
Cc: NeilBrown <neilb@suse.de>, Olga Kornievskaia <aglo@umich.edu>,
	Olga Kornievskaia <okorniev@redhat.com>,
	chuck.lever@oracle.com, linux-nfs@vger.kernel.org,
	Dai.Ngo@oracle.com, tom@talpey.com
Subject: Re: [PATCH 3/3] nfsd: reset access mask for NLM calls in nfsd_permission
Date: Tue, 08 Apr 2025 16:40:45 -0400	[thread overview]
Message-ID: <0A108901-1D6F-42FD-9C06-0849EC37933D@redhat.com> (raw)
In-Reply-To: <05336ea7be56be78db853a811bf740ff0d3ab1df.camel@kernel.org>

On 7 Apr 2025, at 11:57, Jeff Layton wrote:

> Emulating flock locks over NFS locking is entirely a client-side
> endeavor. The server isn't aware of it. The job on the server side is
> to conform to the protocol.
>
> In this case, I think failing exclusive flock() locks when the client
> doesn't have the file open for write is the correct thing to do, as I
> think the protocol requires this.
>
> At one time, nfs_flock would reject those on the client, until this
> patch reverted that behavior:

That behavior existed for only a short time (6 months?) until the revert.

>     fcfa447062b2 NFS: Revert "NFS: Move the flock open mode check into nfs_flock()"
>
> I'm not sure that reverting that was the correct thing to do. NFS/NLM
> locking generally follows fcntl() semantics. ISTM that we shouldn't
> allow locks that fall outside of those semantics.

I don't remember the details other than we submitted that revert after
regression testing showed the original changed v3 behavior.

Is it possible that some existing v3 server would use flock semantics for
NLM?

Ben


  reply	other threads:[~2025-04-08 20:40 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-22  0:13 [PATCH 0/3] access checking fixes for NLM under security policies Olga Kornievskaia
2025-03-22  0:13 ` [PATCH 1/3] nfsd: fix access checking for NLM under XPRTSEC policies Olga Kornievskaia
2025-04-07 19:44   ` Jeff Layton
2025-03-22  0:13 ` [PATCH 2/3] nfsd: adjust nfsd4_spo_must_allow checking order Olga Kornievskaia
2025-04-07 15:36   ` Jeff Layton
2025-04-07 15:56     ` Olga Kornievskaia
2025-04-07 15:59       ` Jeff Layton
2025-04-07 17:17         ` Olga Kornievskaia
2025-04-07 17:47           ` Jeff Layton
2025-04-07 18:02             ` Olga Kornievskaia
2025-03-22  0:13 ` [PATCH 3/3] nfsd: reset access mask for NLM calls in nfsd_permission Olga Kornievskaia
2025-03-27 23:54   ` NeilBrown
2025-03-28  0:36     ` Olga Kornievskaia
2025-03-28  1:43       ` NeilBrown
2025-03-28 12:43         ` Chuck Lever
2025-03-28 15:13         ` Olga Kornievskaia
2025-03-28 21:53           ` NeilBrown
2025-03-28 23:29             ` Tom Talpey
2025-03-30 16:17               ` Chuck Lever
2025-03-30 16:12             ` Olga Kornievskaia
2025-03-31  0:10               ` NeilBrown
2025-03-31 14:49                 ` Chuck Lever
2025-03-31 18:24                   ` Olga Kornievskaia
2025-04-01 22:24                     ` NeilBrown
2025-04-01 22:57                       ` Olga Kornievskaia
2025-04-01 23:18                         ` NeilBrown
2025-04-07 15:57             ` Jeff Layton
2025-04-08 20:40               ` Benjamin Coddington [this message]
2025-03-22 15:08 ` [PATCH 0/3] access checking fixes for NLM under security policies cel
2025-03-28  0:07 ` NeilBrown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0A108901-1D6F-42FD-9C06-0849EC37933D@redhat.com \
    --to=bcodding@redhat.com \
    --cc=Dai.Ngo@oracle.com \
    --cc=aglo@umich.edu \
    --cc=chuck.lever@oracle.com \
    --cc=jlayton@kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=okorniev@redhat.com \
    --cc=tom@talpey.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox