public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] nfs-utils: signed filehandle support
@ 2026-02-06 15:14 Benjamin Coddington
  2026-02-06 15:15 ` [PATCH v4 1/2] exportfs: Add support for export option sign_fh Benjamin Coddington
  2026-02-06 15:15 ` [PATCH v4 2/2] nfsdctl/rpc.nfsd: Add support for passing encrypted filehandle key Benjamin Coddington
  0 siblings, 2 replies; 6+ messages in thread
From: Benjamin Coddington @ 2026-02-06 15:14 UTC (permalink / raw)
  To: Steve Dickson, Benjamin Coddington
  Cc: linux-nfs, Chuck Lever, NeilBrown, Jeff Layton

Here are two patches allowing userspace to set a secret key for kNFSD to
sign filehandles, and also set the option to sign filehandles for an
export.

The secret key passed to the server is the first 128 bits of a sha1 hash of
the contents of a file configured via the nfs.conf server section
"fh_key_file".  Exports that have the option "sign_fh" set will cause the
server to use this key to append an 8-byte siphash of the filehandle onto
each filehandle.

This version of the userspace patches correspond with the v4 of the kernel
changes which have been posted here:
https://lore.kernel.org/linux-nfs/cover.1770390036.git.bcodding@hammerspace.com

This work is based on a branch that includes Jeff Layton's patch for
min-threads:
https://lore.kernel.org/linux-nfs/20260112-minthreads-v1-1-30c5f4113720@kernel.org/

.. and Jeff Layton's v2 series to fix up userspace handling of kernels that
may not support the most recent netlink attributes:
https://lore.kernel.org/linux-nfs/20260204-minthreads-v2-0-a7eba34201e9@kernel.org/

Comments and critique welcomed.

Benjamin Coddington (2):
  exportfs: Add support for export option sign_fh
  nfsdctl/rpc.nfsd: Add support for passing encrypted filehandle key

 nfs.conf                     |  1 +
 support/include/nfs/export.h |  2 +-
 support/include/nfslib.h     |  2 +
 support/nfs/Makefile.am      |  4 +-
 support/nfs/exports.c        |  4 ++
 support/nfs/fh_key_file.c    | 79 ++++++++++++++++++++++++++++++++++++
 systemd/nfs.conf.man         |  1 +
 utils/exportfs/exportfs.c    |  2 +
 utils/exportfs/exports.man   |  9 ++++
 utils/nfsd/nfssvc.h          |  1 +
 utils/nfsdctl/nfsd_netlink.h |  1 +
 utils/nfsdctl/nfsdctl.c      | 39 ++++++++++++++++--
 12 files changed, 138 insertions(+), 7 deletions(-)
 create mode 100644 support/nfs/fh_key_file.c


base-commit: 8f54511aefe1455161a6c4406ed8c770139f61e3
prerequisite-patch-id: b0d57152c98d360daa9a71e6fa9759b7eb9de348
prerequisite-patch-id: 99680869954aef9f878c24ec9ee1302ab7f24b1a
prerequisite-patch-id: 2ab31271461352d11bcce760e45573f9e6459553
prerequisite-patch-id: 22c392c9dba2e63916af6cd8fbf4e9d6bce9d01c
prerequisite-patch-id: 50f6f48932426f89060eb77de58718baa80b979f
-- 
2.50.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-02-06 16:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-06 15:14 [PATCH v4 0/2] nfs-utils: signed filehandle support Benjamin Coddington
2026-02-06 15:15 ` [PATCH v4 1/2] exportfs: Add support for export option sign_fh Benjamin Coddington
2026-02-06 15:15 ` [PATCH v4 2/2] nfsdctl/rpc.nfsd: Add support for passing encrypted filehandle key Benjamin Coddington
2026-02-06 15:58   ` Jeff Layton
2026-02-06 16:09     ` Benjamin Coddington
2026-02-06 16:31       ` Jeff Layton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox