News for hackers. Stuff that matters.
Re:The kernel has 6 separate ASN.1 parsers by nynx on Friday March 19, 2021 @10:17AM (#26513598)
Now that Linux is starting to be more receptive to rust (drivers only for now, but perhaps in kernel down the line), these parsers should be replaced by implementations in Rust asap.
Re:The kernel has 6 separate ASN.1 parsers by geodel on Friday March 19, 2021 @10:25AM (#26513697)
Yes, someone should just drop by kernel mailing list and ask a very logical question "Have you considered rewriting it in Rust?" That would help remedy the situation fast.
Re:The kernel has 6 separate ASN.1 parsers by pjmlp on Friday March 19, 2021 @10:41AM (#26513856)
Re:The kernel has 6 separate ASN.1 parsers by geodel on Friday March 19, 2021 @11:50AM (#26514754)
They went above and beyond :). I was thinking small and talking only about parser.
Re:The kernel has 6 separate ASN.1 parsers by sitkack on Friday March 19, 2021 @12:15PM (#26515114)
Your snide comment is putting words into the mouth of nynx and then arguing against those words. A classic web forum tactic.

Applying Rust to harden a parser is exactly where Rust is being used. The parent didn't not say Linux should be rewritten in Rust, only that it could be applied to a parser that takes untrusted input.

As mentioned in a sibling comment, Rust support in the kernel is being worked on.

Re:The kernel has 6 separate ASN.1 parsers by nynx on Friday March 19, 2021 @10:33AM (#26513780)
Okay, yeah that wouldn't go over well. Despite that, i think it makes sense to replace very dangerous sections of the kernel with a safer implementation. Parsers are very difficult to make safe in C.
Re:The kernel has 6 separate ASN.1 parsers by vlovich123 on Friday March 19, 2021 @11:05AM (#26514159)
Actually it went over fine [1]. Rust support in the Linux kernel however is still very nascent, & only suitable for drivers. The reason is that rustc only supports the more popular systems (hence drivers for that system are suitable). There's work ongoing to expand the utility of Rust in the kernel on multiple fronts, but for something like this that's built on all platforms, it might take longer. ASN.1 & other crypto format parsers are ripe for being rewritten in Rust & no one would really blink an eye I think (provided the other pieces of support are available to support all the architectures Linux does).

[1] https://lwn.net/Articles/829858/

Re:The kernel has 6 separate ASN.1 parsers by brink on Friday March 19, 2021 @11:44AM (#26514664)
This kind of mentality is going to make people resent Rust, it's not really the culture we need.

While it's technically true that Rust encourages safe practices, it's not a blanket fix-all for everything.

Re:The kernel has 6 separate ASN.1 parsers by sitkack on Friday March 19, 2021 @12:12PM (#26515066)
You are criticizing nynx for something they didn't say. As mentioned in another subthread, Linux is working on Rust support but only for drivers at this time.

Nynx did not say rewrite linux in Rust. They said apply Rust for making a secure ASN.1 parser, which is exactly where Rust should be applied to maintain safety properties.

Rust is being applied to multiple commercial operating systems at the driver level to harden them against known issues. Windows is already running Rust code in its USB subsystem.

Re:The kernel has 6 separate ASN.1 parsers by hrvTGKFyDyko3aK on Friday March 19, 2021 @11:41AM (#26514621)
Rust does not have tier 1 support for all the platforms that Linux supports.
Re:The kernel has 6 separate ASN.1 parsers by selfhoster11 on Friday March 19, 2021 @01:20PM (#26515897)
That should not happen until Rust has support for all the platforms that Linux supports. As far as I know, Rust support is still missing on plenty of platforms.