4 ms·
Can't see why this needs to be in the kernel
by moonbug 5y ago
Can't see why this needs to be in the kernel
- oauea 5y ago> The target is to provide optimized performance, GPLv2 SMB server
- muricula 5y agoHigh performance doesn't have to mean being in the kernel.
- jasonjayr 5y agoSame reason knfsd is in the kernel: performant file + locking access synchronized with the fs primitives. The post indicates this is not to replace samba, but to improve the file sharing bits of it.
- mkj 5y agoIsn't the main reason for knfsd being in-kernel that it depends on inode number to file lookups? Does samba have the same problem? The kernel nfs server is IME more robust than userspace options like ganesha, but that seems to mostly be a function of it being widely used - a kernel samba server doesn't have that advantage?
- jra_samba 5y agoNo, Samba does not need to do inode to file lookups. There are no "open by inode" primitives in SMB1/2/3.
- cestith 5y agoIt doesn't need to be. Samba works from userspace. This performs better because the fs primitives are in-kernel. It's also reportedly easier to maintain and easier to further optimize as part of the kernel. Everything's a tradeoff.
- ape4 5y agoDumb question: if this (or any other) kernel module crashes does the entire kernel?
- muricula 5y agoYup! And if an attacker hacks this module they can hijack the kernel. And it can probably be reached by anyone on the same network, or may even be exposed to the internet :|
- unmole 5y agoYou mean like the TCP/IP stack?
- rbanffy 5y agoGood point, but SMB has earned quite a reputation in this area.
- yjftsjthsd-h 5y agoAnd if I could move that into user space without a hideous performance and/or compatibility penalty, I probably would.