- What is KSMBD?
- Under PFIF
- Git
- Maintainers
- Bug reports or contribution
- Features
- Supported Linux Kernel Versions
- KSMBD architecture
KSMBD is an opensource In-kernel CIFS/SMB3 server created by Namjae Jeon for Linux Kernel. It's an implementation of SMB/CIFS protocol in kernel space for sharing files and IPC services over network. Initially the target is to provide improved file I/O performances, but the bigger goal is to have some new features which are much easier to develop and maintain inside the kernel and expose the layers fully. Directions can be attributed to sections where SAMBA is moving to few modules inside the kernel to have features like RDMA(Remote direct memory access) to work with actual performance gain.
This code was developed in participation with the Protocol Freedom Information Foundation.
Please see
- https://samba.org/samba/PFIF/ for more details.
The development git tree is available at
- Namjae Jeon [email protected]
For reporting bugs and sending patches, please send the patches to the following mail address:
or open issues/send PRs to KSMBD.
Install prerequisite package for Fedora, RHEL:
yum install kernel-devel-$(uname -r)
Build step:
make
sudo make install
To load the driver manually, run this as root:
modprobe ksmbd
- Let's take [linux] as the path to your kernel source dir.
cd [linux]
cp -ar ksmbd [linux]/fs/
- edit [linux]/fs/Kconfig
source "fs/cifs/Kconfig"
+source "fs/ksmbd/Kconfig"
source "fs/coda/Kconfig"
- edit [linux]/fs/Makefile
obj-$(CONFIG_CIFS) += cifs/
+obj-$(CONFIG_SMB_SERVER) += ksmbd/
obj-$(CONFIG_HPFS_FS) += hpfs/
- make menuconfig and set ksmbd
[*] Network File Systems --->
<M> SMB server support
build your kernel
Implemented
- SMB1(CIFS), SMB2/3 protocols for basic file sharing
- Dynamic crediting
- Compound requests
- oplock/lease
- Large MTU
- NTLM/NTLMv2
- Auto negotiation
- HMAC-SHA256 Signing
- Secure negotiate
- Signing Update
- Pre-authentication integrity(SMB 3.1.1)
- SMB3 encryption(CCM, GCM)
- SMB direct(RDMA)
- Win-ACL
- Kerberos
- Multi-channel
Planned
- Durable handle v1/v2
- Persistent handles
- Directory lease
- Linux Kernel 5.4 or later
|--- ...
--------|--- ksmbd/3 - Client 3
|-------|--- ksmbd/2 - Client 2
| | _____________________________________________________
| | |- Client 1 |
<--- Socket ---|--- ksmbd/1 <<= Authentication : NTLM/NTLM2, Kerberos(TODO)|
| | | | <<= SMB : SMB1, SMB2, SMB2.1, SMB3, SMB3.0.2, |
| | | | SMB3.1.1 |
| | | |_____________________________________________________|
| | |
| | |--- VFS --- Local Filesystem
| |
KERNEL |--- ksmbd/0(forker kthread)
---------------||---------------------------------------------------------------
USER ||
|| communication using NETLINK
|| ______________________________________________
|| | |
ksmbd.mountd <<= DCE/RPC, WINREG |
^ | <<= configure shares setting, user accounts |
| |______________________________________________|
|
|------ smb.conf(config file)
|
|------ ksmbdpwd.db(user account/password file)
^
ksmbd.adduser ---------------|