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.
[ Parent
| on HN ]
Apparently they did,
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-n...
They went above and beyond :). I was thinking small and talking only about parser.
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.
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).