4 ms·
Maybe if you want to do SMB in kernel-space they should be using the rust bindings
by bombcar 4y ago
Maybe if you want to do SMB in kernel-space they should be using the rust bindings
- flatiron 4y agoRust is driver only…for now
- sanxiyn 4y agoWell, one thing written to test-drive Rust for Linux was in-kernel server for 9P, which is probably the closest thing to ksmbd, in-kernel server for SMB, without being identical: https://lwn.net/Articles/907685/ https://lwn.net/Articles/907685/
- ilyt 4y agoThis is hilarious: > Initially, he had started trying to replace the ksmbd server, but that turned out to not be an ideal project. if only he perservered...
- deleted 4y ago[deleted]
- howinteresting 4y agoQuite frankly any new kernel code that interacts with the network, or untrusted data in general, should use Rust to the greatest extent possible.
- dinkumthinkum 4y agoWhy? Is it because you think Rust code in the kernel is memory safe?
- howinteresting 4y agoIt is definitely, undisputably memory safer.
- elcritch 4y agoAlternatively using a WASM engine or maybe the kernels built in eBPF.
- ilyt 4y agoThe overhead would make it not worth it, you'd be better off just running it in userspace. WASM started to become equivalent of "just rewrite it in Rust" here...
- liftm 4y agoWait, so I've been lied to? https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death...
- ilyt 4y agoLanguage doesn't need to be good to be popular for a long time. PHP was (is) previous "shit but lowest common denominator that everyone uses it" before JS took that mantle. Also "good" depends on the audience. Ability to cheaply hire a bunch of devs to whip up CRUD app is "good" quality of PHP/JS even if it might not make the language "good" from engineering perspective.
- liftm 4y agoIgnore the JS bashing (it is deserved but irrelevant here). I was referring to the part explaining the 2028-2040 METAL system where "we" gained 4% execution speed because we stuffed all things into a asm.js VM in kernel that can skip syscall overhead. But it's a joke video anyway.
- elcritch 4y agoI’d guess it’d be slightly faster. The WASM or eBPF would add some overhead, however you save on context switching costs from kernel to user land. So for IO heavy stuff like SMB it’d probably perform well.