News Rust Programming Language To Land in Linux Kernel 6.1

RichardtST

Notable
May 17, 2022
236
264
960
As a long-time kernel developer and hacker I can tell you without any shadow of a doubt that Rust is being added to create more attack surface. Gotta have those back doors. No better place than someplace "safe". Seriously, have you looked at real Rust code? Absolutely the antithesis of the "KISS PRINCIPLE". This is bad news for linux.
 

coolitic

Distinguished
May 10, 2012
714
36
19,040
Why did Linus approve of integrating RUST inco the Linux Kernal?

Can anybody tell me why?

I'm perfectly fine with C/C++ as the main languages for the Linux Kernal

I know RUST is a C/C++ relative, but it's like that weird cousin.

Has RUST been tested properly for security issues?
C++ is not used in the kernel, because it's unnecessarily complex and ambiguous.
 
D

Deleted member 14196

Guest
It C for kernel and I would like it to STAY that way
 

bit_user

Polypheme
Ambassador
As a long-time kernel developer and hacker I can tell you without any shadow of a doubt that Rust is being added to create more attack surface. Gotta have those back doors. No better place than someplace "safe". Seriously, have you looked at real Rust code? Absolutely the antithesis of the "KISS PRINCIPLE". This is bad news for linux.
Interesting take. In all the discussion and debate I've read about this on Linux-focused forums, I've not seen such claims.

I trust this work wasn't undertaken lightly. It's been under way for several years. Right now, it's just limited to device drivers. If it turns out to be as big a liability as you claim, I'm sure it'll be addressed or removed.
 
  • Like
Reactions: TJ Hooker

bit_user

Polypheme
Ambassador
I'm perfectly fine with C/C++ as the main languages for the Linux Kernal
There was never any C++. Linus is famously opposed to it. Until earlier this year, the kernel was C89 (with GNU extensions). They recently upped it to C11 (with GNU extensions). The Rust support is limited to a very small portion of it, for now.

Has RUST been tested properly for security issues?
Safety & security are its main selling points. If you're interested, I'd encourage you to read up on it.
 
  • Like
Reactions: TJ Hooker

bit_user

Polypheme
Ambassador
C++ is not used in the kernel, because it's unnecessarily complex and ambiguous.
There were objections to it, but I think that doesn't do them justice. Suffice to say that C++ has had a long history, and it still has some reputational damage from its earlier days. I think that colored the opinions of some kernel developers who didn't personally have much experience with it.

The other thing about C++ is that it's been fairly polarizing. Those who still use pure C have likely made a conscious choice to resist C++, making it a harder sell for getting them to adopt it. Anyway, it's a moot point (for the Linux kernel, anyway). It looks like they successfully fended off C++ and its evolutionary path will now potentially be a Rusty one.

What I take issue with is characterizing C++ as "ambiguous", though I'd have to agree that it has a lot of complexity (or richness, as some may choose to characterize it).
 

bit_user

Polypheme
Ambassador
It C for kernel and I would like it to STAY that way
Right, because the world learned nothing about writing software since the 1970's!
;)

It's pretty rare, in this industry, to see people advocate for sticking with technology that's literally 50 years old. It dates back to a time when most software was written on punch cards and most "mini-computers" (which were typically refrigerator-sized) had at most a couple MB of RAM and ran at a couple MHz or less.
 
  • Like
Reactions: TJ Hooker
Oct 9, 2022
1
0
10
Why did Linus approve of integrating RUST into the Linux Kernal?

Can anybody tell me why?

I'm perfectly fine with C/C++ as the main languages for the Linux Kernal

I know RUST is a C/C++ relative, but it's like that weird cousin.

Has RUST been tested properly for security issues?
  • War in Ukraine (why?)
  • The threat of a 3rd world war (why?)
  • Nuclear war threat (why?)
  • The RUST threat (why?)
  • ...
The answer to your question (why?) is that there is no answer.
 

bit_user

Polypheme
Ambassador
  • The RUST threat (why?)
The answer to your question (why?) is that there is no answer.
I think the reason some people feel threatened by Rust is simply resistance to change. Linux has used C for the past 30+ years, so why change it now? There's always a risk involved in any change. If you're happy with Linux as it is, then you probably don't feel you have much to gain by it. That could make the prospect of change seem scary to some.

What the Rust advocates claim (and don't get me wrong, I'm not a Rust user, but here's their argument, as I understand it):
  • Fewer bugs - Rust has memory safety features not found in C.
  • Fewer security exploits - along with the memory safety, Rust also has security features as core parts of the language.
  • Improved productivity - being more modern & expressive, you can do more with fewer lines of code.
  • Larger talent pool - C is a rather primitive language that fewer programmers want to work in, these days.

Somewhere in there ought to be room for performance improvements, as well. The Linux kernel has lots of algorithms and data structures, many of which weren't terribly efficient or haven't scaled well. Using a safer language that's easier to work within should (eventually) facilitate improving lots of aspects in the kernel that might've either seemed to risky or too much effort to tackle, previously.
 
  • Like
Reactions: TJ Hooker

coolitic

Distinguished
May 10, 2012
714
36
19,040
There were objections to it, but I think that doesn't do them justice. Suffice to say that C++ has had a long history, and it still has some reputational damage from its earlier days. I think that colored the opinions of some kernel developers who didn't personally have much experience with it.

The other thing about C++ is that it's been fairly polarizing. Those who still use pure C have likely made a conscious choice to resist C++, making it a harder sell for getting them to adopt it. Anyway, it's a moot point (for the Linux kernel, anyway). It looks like they successfully fended off C++ and its evolutionary path will now potentially be a Rusty one.

What I take issue with is characterizing C++ as "ambiguous", though I'd have to agree that it has a lot of complexity (or richness, as some may choose to characterize it).
C++ has in-part gotten worse over the years. Newer does not imply better.

We have learned things since the 70s, they have just have as of yet to be put into an actual language. Zig is the only example I can think of, but it's still not stable as of now.