Nfs2root: A 12-year-old pre-auth remote root in the Linux kernel's NFS server (opens external site)
View full thread · View on Hacker News
To get push notifications on iPhone or iPad, add Hack and Chat to your Home Screen: tap Share → Add to Home Screen, then open the installed app and enable push in Settings.
View full thread · View on Hacker News
Replies (3)
No idea about NFS today, but an argument for SMB is that it apparently supports RDMA transfers and no idea if there's any "generic" interface good enough as sendfile that can be extracted yet.
In particular, NFS filehandles are essentially inodes with a generation number, and it requires root to read a file via the inode number. Then you need generation numbers for each inode, which I think is not accessible in userspace even with root (I don't see st_gen in struct stat).
Replies (2)
File handles (unique identifiers for inodes that can be used to reopen a file later) have been exposed to userspace for a long time with name_to_handle_at(2) and open_by_handle_at(2) -- these were originally exposed precisely for userspace nfsd.
The topic of i_version semantics has been discussed recently[1,2]. The kernel's nfsd lies about filesystems that don't support i_version so it's not a hard requirement for a replacement, and as the articles I linked note you can retrieve i_generation via ioctl(FS_IOC_GETVERSION).
And it's important to note that most (if not all) of these are related to optimisations.
[1]: https://lwn.net/Articles/905931/ [2]: https://lwn.net/Articles/937247/
Replies (2)
I was using Ganesha at work because FUSE on macOS had been deprecated, and we were trying to serve the filesystem locally via NFS. We emulated filehandles with an LRU cache.