[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.
  • You may highlight syntax and preserve whitespace by using [code] tags.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


first CVE found
>>
unsafe rust code
unsafe rust
unsafe
>>
><thing> gets it's first cve
>"it's over"
something is wrong. very very wrong. these threads seem more artificial than usual.
>>
>>107580817
AKA the only way rusties know how to code.
>>
>>107580833
SOMETHING IS SO VERY WRONG, SO, VERY VERY WRONG, YIKES, OOF EVEN. SO ARTIFICIAL Just like my neovagina when I code in Rust.
>>
>>107580756
Wow, it is almost as if most bugs come from developers or faulty logic, and not the language itself.
>>
>>107580756
Rust doesn't save you from creating any vulnerabilities, it just makes it basically impossible to have memory handling-oriented ones. Also, if having a vulnerability means failure, does this mean C (and every other language used in OSdev) is an abject failure?
>>
>>107580756
>memory corruption
oh no no no no rustsisters???
>>
>>107580845
>mentions "neovagina" out of nowhere
the way you people talk about them makes it seem like you'd fit right in with them.

>>107580864
this.
>>
>>107580864
>it just makes it basically impossible to have memory ha-AAAAAAAAACCCCCCCCCKKKKKKKKKKKKKKKKK
>The code can lead to memory corruption
>>
>memory corruption
>in rust code
what's the point of rust again?
>>
>>107580833
>New thing gets introduce to existing system
>New thing is discovered to have vuln
>OMG! Stop talking about this like it's 100% of the time. It's just most of the time so far!
Rust might get the benefit of the doubt if it had been part of the kernel for a long time and its proponents didn't push for its inclusion so much based on lack of vulns. That it already has a vuln right after being introduced to the kernel is a very bad sign.
>>
>>107580959
Gaining control over existing projects so only people of the "correct" ideology have any input into the system.
>>
>>107580817
>rust code is safe
>look inside
>"unsafe"
>>
>race condition
>system crash
>no compromise possible
Nothing burger.
>>
>>107580961
>>OMG! Stop talking about this like it's 100% of the time. It's just most of the time so far!
i didn't even say that you obtuse faggot. why are you so eager to make something out of nothing?
>>
i just want to know why rust takes up nearly 700MiB of space on my system
>>
Greg Kroah-Hartman, YOU FUCKING INCOMPETENT, USELESS, TRASH-SHIT EXCREMENT EXCUSE FOR A HUMAN BEING, IT IS UNDEFINED BEHAVIOR, ALL BETS ARE OFF. NASAL DEMONS. YOU ARGUED FOR RUST, YET YOU ARE TOO FUCKING DUMB, STUPID, RETARDED, IRRESPONSIBLE, DISHONEST, WHORE-BEGOTTEN, TO GET THE FUCKING BASICS RIGHT. RUST UNSAFE IS FUCKING HARDER TO GET RIGHT THAN C AS EVERYONE HONEST IN THE RUST COMMUNITY CAN TELL YOU AND IT CAN HAVE UNDEFINED BEHAVIOR AND NASAL DEMONS JUST LIKE C. AND no_std DOES NOT EVEN REQUIRE UNSAFE TO GET UB IN RUST. YOU ARE SUPPOSED TO BE LINUS' SUCCESSOR. INCOMPETENT FRAUDULENT DILETTANTE. FUCKING KILL YOURSELF.
>>
>>107581006
Typical Rust installation has full toolchain, package manager, documentation, source code for everything etc.
>>
>>107580996
industrial grade copium
>>
>>107581029
Schizo
>>
>>107581034
but what does it solve?
>>
>>107581058
https://en.wikipedia.org/wiki/Toolchain
>>
>>107581050
FUCKING KILL YOURSELF Greg Kroah-Hartman.
>>
>>107581074
more like troonchain
>>
>>107581029
Greg Shoah Shartman is a huge faggot, hence his love for Rust.
>>
>>107581090
Fucking mindbroken.
>>
>>107581177
I don't know what his background is, but THAT FUCKING SHIT IS FUCKING UNACCEPTABLE, HE SHOULD STEP DOWN, KILL HIMSELF AND NOT FUCK EVERYONE OVER.
>>
What's the point of Rust if your going to use it in "unsafe" mode anyway? Like wearing your seatbelt yet still driving at 150MPH.
>>
>Issue introduced in 6.18 and fixed in 6.18.1
>>
>>107581183
yes, bloat my computer with your terabyte of documentation that everyone just goes to the website for anyway, source code because baby's compiler can't into dynamic linking and supply chain attack as a service aka cargo, senpaaiiii
>>
File: clyde.jpg (14 KB, 249x217)
14 KB
14 KB JPG
>>107581228
>hat everyone just goes to the website for anyway
you don't read man pages?
>>
>>107581242
Rust spits out html pages for the toolchain. The rust book, tutorial, reference manual, cargo, rustc, etc documentation are all web pages.
>>
File: sneaky frog.jpg (42 KB, 816x713)
42 KB
42 KB JPG
>>107581262
you don't read offline documentation?
>>
>>107580756
I don't like rust being pushed so hard
but this is a glowie bot thread
>>
FUCKING HELL THE RUST PROPONENTS WERE RIGHT, THE LINUX KERNEL C PROGRAMMERS ACTUALLY ARE CNILES, THEY DIDN'T EVEN GAIN THE MOST BASIC UNDERSTANDING BEFOREHAND OF THE SYSTEM LANGUAGE THEY CHOSE FOR THE FUCKING LINUX FUCKING KERNEL OF ALL FUCKING THINGS. MAJOR STRATEGIC CHOICE OF FOUNDATIONAL SYSTEM LANGUAGE FOR THE FUCKING LINUX KERNEL. AND THEY DON'T KNOW THE FUCKING BASICS.
>>
>>107581271
It is offline documentation. It's just not .troff, it's .html.
>>
>>107581210
>we've introduced a new revolutionary feature, well call it a "seatbelt"
>i don't want to use it
>ok
if the whole point of rust is safety, why does it even have an unsafe feature? is there something it can't do safely? if not, again, what is the point of it? really, i'm curious
>>
>>107581242
uhh that's problematic, chud. rust's documentation is heckin valid and beautiful instead
>>107581271
no one is typing some shit like /home/troon/.cargo/doc/192741.281723/reference/index.html in their browser and then having to look for the correct page instead of just searching ArCK into google
>>
>>107580756
Can you explain to me like I'm five
or a golden retriever
>>
>>107580756
I imagine corporations are salivating over rust, imagine when a significant portion of linux is ported to rust, and now it can only be compiled on a high end build server. Regular people are locked out of building and developing the kernel and are fully dependent on corporate builds.
>>
>>107580836
You literally can't program a kernel driver in Rust without using 'unsafe'.
>>107580756
There will be more. Just like all the mountains of C code with CVEs.

This is the trade-off you make with a monolithic kernel. Performance is better than micro-kernels that run all their drivers in user-space in a hybrid fashion but any little fuck up and you're pwned.
>>
>>107581210
Same point of C if you are going to use inline assembly anyway.

It's all about the kinds of abstractions you can express in it. Unsafe can break Rust guarantees in the same way inline ASM can break C. You still do want to use high level language for all the 99% of your codebase.
>>
>>107581346
https://materialize.com/blog/rust-concurrency-bug-unbounded-channels/
https://doc.rust-lang.org/nomicon/
>>
>>107581368
>crossbeam
>in Linux kernel
Retard alert
>>
>>107581210
Developer efficiency. Some people want to write kernel drivers in Rust instead of C and ASM.

It doesn't mean Rust is some super secure language that will save you from any and every security bug. That's pure propaganda.
It's just some people's preferred language to use.
>>
>>107581362
I see this cope everywhere. what good is it even if you "abstract" unsafe parts to be used in "safe" code when the unsafe code can and will break any safe code that runs it under some conditions/edge cases anyway?
you surely don't think that a non-trivial C project just does pointer arithmetic and memory allocations all over the codebase instead of abstracting these in more self-contained and abstracted functions, just like "safe" rust, right?
>>
I'm waiting for MentalOutlaw's vid on this to form my opinion
>>
>>107581350
>You literally can't program a kernel driver in Rust without using 'unsafe'.
rnull is in Rust and doesn't have any unsafe.

Sure you need unsafe for some operations but you also need inline ASM for some C operations. Not everything can be expressed in a high level language.
>>
>>107581420
For kernel level programming, it's literally impossible, yeah. Obviously they can still have some safe Rust code in utility functions or libraries or whatever but it's going to need some unsafe code somewhere. It's inevitable when you're writing code that's that low-level in the stack.
>>
>>107581402
>what good is it even if you "abstract" unsafe parts to be used in "safe" code when the unsafe code can and will break any safe code that runs it under some conditions/edge cases anyway?
It's same thing as when you use inline ASM in C which can break any normal C code anyway.

Using a high level language can make it much nicer to work with. Even if you have to write few abstractions over ASM/unsafe code, the remaining 99% of code base can still benefit from being written in a high level language
>>
I like how everybody talks about how "it happened in le unsafe block", but nobody mentions that the fix is in safe code only:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=3428831264096d32f830a7fcfc7885dd263e511a
>>
>>107581439
>For kernel level programming, it's literally impossible,
rnull is literally in mainline Linux.
>>
>>107581439
truth is that rust code literally does not exist without unsafe code, be it in the lib you are importing, the stdlib, the c-runtime or OS api (win32/posix/Foundation) your binary depends on.
the rust cope is that "it wasn't me, a retard, who wrote it, so it's probably safe" when in fact it could be and probably was written by another retard.
rust's "guarantees" are literally just for show. non-existent.
>>
>>107580756
rust only has one
previous C code has hundreds even thousands of CVE
>>
File: 1289091724160.jpg (64 KB, 274x268)
64 KB
64 KB JPG
if the kernel is designed in such a way to force you to write unsafe code, maybe it's the kernel which is the problem

(never wrote a single line of Rust btw)
>>
>>107581476
rust code is tiny and used by no one. linux has otherwise 30 millions of lines of code in C
>>
>>107581472
>truth is that rust code literally does not exist without unsafe code
And C literally does not exist without ASM blobs.
It's nothing new that system programming langs need to interface with low level details that are not expressible within the language itself.
>>
>>107581460
>Some
huh I didn't know this was a keyword.
>>
>>107581479
The problem is it's your kernels job to unfuck your hardware and unfucking your hardware often requires it to do a series of potentially unsafe operations in a potentially unsafe context.

You will never get 100% perfectly safe code everywhere. It's impossible.
>>
>>107581508
It's not an keyword. It's a variant of Option enum, which is automatically imported in Rust prelude.
>>
>>107581498
you keep using the same retarded asm comparison when it's not the same thing at all. you can write pretty much any non-trivial software in C without writing a single line of assembly, and 99% of the time anyway it's only used consciously for performance optimizations, not because it can't be done in C. the 1% are niche things that don't exist in the language like extended instruction sets and simd, maybe, or things you have to do in assembly because the hardware requires it like during boot when you set up a bunch of tables and hardware modes. there is literally no reason to include that kind of support in the language when a tiny fraction of applications will ever need it
>>
>>107580833
dude. this place is 30% intended comedy. 30% accidental comedy. 30% failed comedy. 10% lost people who think this place is serious. lol.
>>
>>107581545
>you can write pretty much any non-trivial software in C without writing a single line of assembly,
Let's see how would you implement longjmp in c without using assembly.
Or how would you switch context from kernel to userspace in C. You know, something that kernel does all the time and is by no means "niche"
>>
>>107581581
keep grasping at straws trying to build an argument. you cited two "examples" that only kernels have to do. if something only 3 pieces of software currently in use (or less than a dozen if you count all the BSDs and other less-than-1% used operating system kernels) do, compared to millions of applications that exist, is not "niche", than I don't know what is.
>>
>>107581636
It's not straw-clutching when the context is kernel programming. Almost every kernel you'll encounter will have some bits of ASM in it.
>>
i'm not liking the SHOUTING bot update. roll it back.
>>
>>107581636
>what's the point of using Rust in Linux kernel if it requires unsafe
>it's same point as using C along with inline asm
>but you can write any software in C without a single line of assembly
>then how would you write kernel context switching in C
>hurr grasping at straws
What. Context switching is one of the most important responsibilities of the kernel.
>>
>>107581669
>"pretty much"
>decides to focus on the single example that does depend on it. not because of C, it just does no matter what you do
>this is somehow an argument in favor of rust
I'm tired of this conversation. believe whatever you want to believe, I have no obligation or anything I stand to gain by convincing you otherwise.
>>
>>107581724
This thread is about Linux kernel.
>>
>>107581376
You are alerting yourself. It's a fine example of UB in Rust. Now kill yourself, mentally ill rustling troll.
>>
Unsafe rust code from my unsafe neovim?
More likely than you think.
>>
>>107581636
>you cited two "examples" that only kernels have to do.
not him, but this thread is about rust in a kernel. you're defeating your own argument.
>>
>>107580833
it's just clickbait from phoronix
>>
>>107581460
That isn't surprising, since even if there is a single, small Rust unsafe block, the absence of UB can hinge on the whole module being correct, and thus the whole module has to be "audited".
It is not uncommon that the proportion of Rust code that needs to be correct in order to avoid UB, is way larger than the proportion of unsafe in Rust code.

The Rustonomicon spells it out quite clearly.

And yet Rust evangelists keep lying through their teeth about this topic, again and again.
>>
>>107582002
kys, the reply chain is about rust as a language and how false its claims are. don't barge in into other people's conversations if you only heard the last word they said
>>
>>107582044
>You literally can't program a kernel driver in Rust without using 'unsafe'.
This is where this reply chain started.
>>
>>107581667
Are you a woman?
>>
>>107580756
Oh no no no not my heckin always perfectly safe rust!!!
>>
>>107582044
>the reply chain is about rust as a language and how false its claims are
*in terms of kernel programming
go look at the op again, the thread is clearly and specifically about it's use in linux, a kernel.
>>
>>107580756
What a bloody mess.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.