this post was submitted on 06 May 2024
132 points (97.8% liked)
Linux
48038 readers
758 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Nope, rust is ideal for kernel code, it really is an improvement.
Writing kernel in C is like building a house with a hammer on loosen handle, there is too much give and the builder has to tap it a few times before every strike. You could say the builder knows how to build and secure a house, but hes still a human. The loosen handle adds too much difficulty result in errors which would otherwise be avoided.
Right here, is what I'm talking about. People believe that the code/language itself is inherently safe/secure or unsafe depending on what you choose and that's wrong. It's what the programmer does with that code that makes it safe or unsafe, secure or insecure. You can have the best designed and engineered materials on the planet and people are still going to be able to make things that will fall over and cause massive disasters with it. Stop bowing down to freaking Rust as if it's the damn savior of computing and programming. In the end, it's just another language and one another step removed from low level computing where it's easiest to deal with hardware-level and basic functionality systems at a huge cost.
This means there are C functions that are documented and used, but insecure.
In Rust there is simply an enforcement of certain conventions, which will make code cleaner and prevent a whole class of errors.
No one who knows anything about C uses insecure functions without having a good reason and a good foundation around them to keep them secure. The functions are there to allow C to have maximum flexibility and low-level access to a system. For the most part, these shouldn't be used, and any decent C programmer knows that. Comparing that with Rust where people think the entire language is inherently safe and has zero awareness of what they might be doing is laughably insecure is the heart of the problem.
Been programming longer than most of you have been alive, kids. Keep on defending your hacked together tricycle language and then crying when you manage to tip it over because of your overconfidence.