Linux NFS development
 help / color / mirror / Atom feed
* [LSF/MM/BPF TOPIC] Namespace-aware upcalls from kernel filesystems
@ 2026-02-14 10:06 Shyam Prasad N
  2026-02-14 15:39 ` Chuck Lever
  2026-02-16  0:48 ` David Leadbeater
  0 siblings, 2 replies; 10+ messages in thread
From: Shyam Prasad N @ 2026-02-14 10:06 UTC (permalink / raw)
  To: lsf-pc; +Cc: linux-fsdevel, keyrings, CIFS, linux-nfs, brauner, David Howells

Kernel filesystems sometimes need to upcall to userspace to get some
work done, which cannot be achieved in kernel code (or rather it is
better to be done in userspace). Some examples are DNS resolutions,
user authentication, ID mapping etc.

Filesystems like SMB and NFS clients use the kernel keys subsystem for
some of these, which has an upcall facility that can exec a binary in
userspace. However, this upcall mechanism is not namespace aware and
upcalls to the host namespaces (namespaces of the init process).

This can be an inconvenience or a blocker for container services,
which run most code from containers and do not like to host any
binaries in the host namespace. They now need to host an upcall
handler in the host namespace, which can switch to the appropriate
namespaces based on the parameters sent before getting the work done.

I tried to prototype a namespace aware upcall mechanism for kernel keys here:
https://www.spinics.net/lists/keyrings/msg17581.html
But it has not been successful so far. I'm seeking reviews on this
approach from security point of view.

Another option that I could think of is to host a device file in
devfs. The mount could register with keys subsystem by keeping an FD
open from inside a container. The keys subsystem could then upcall on
the "right" FD based on some parameter supplied to it.

Looking forward to hearing if there is a better approach to solving
this problem.

-- 
Regards,
Shyam

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

end of thread, other threads:[~2026-02-24  8:35 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-14 10:06 [LSF/MM/BPF TOPIC] Namespace-aware upcalls from kernel filesystems Shyam Prasad N
2026-02-14 15:39 ` Chuck Lever
2026-02-17  4:14   ` Shyam Prasad N
2026-02-17 14:21     ` Chuck Lever
2026-02-17 15:18       ` Jeff Layton
2026-02-24  3:31         ` Shyam Prasad N
2026-02-24  8:35         ` Christian Brauner
2026-02-24  3:15       ` Shyam Prasad N
2026-02-16  0:48 ` David Leadbeater
2026-02-17  4:16   ` Shyam Prasad N

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