News for hackers. Stuff that matters.
Re:Ubuntu Systemd Vulnerability by FridgeSeal on Wednesday June 28, 2017 @08:08AM (#14653380)
How plausible is it that someone/some group could rewrite/update this to be written in Rust? (Which would presumably solve a lot of the memory corruption issues if I understand Rust's memory safety correctly?).
Re:Ubuntu Systemd Vulnerability by zanny on Wednesday June 28, 2017 @02:43PM (#14657041)
Whats what Redox is, pretty much. The trick to understand in the GNU/Linux world is that C is sacred - it is so sacred Gnome developers write desktop applications in C. It is absolutely a religion.

A lot of it is legacy, of course. The steering heads of projects have been around for over 30 years in many cases. These are people who dedicate their lives to a cause, and a lot of it is relation to a vision of the perfect OS circa 1990 - albeit, systemd doesn't follow that philosophy, but the participants in the project are cut from the same cloth, with some new blood and ideas mixed in enough to cast aside the unix philosophy but not enough to change course away from C.

And its all free software, after all. The developers of coreutils, Linux, Mesa, GCC, systemd, NetworkManager, Samba, NFS, and so many other services and applications in use by millions all at least started out as a project of passion. They chose C because that is where their passion lay. We are seeing a new age of such passions emerging around Rust, which is great to see. Whether or not Redox or similar projects can develop the momentum to approach the C lineage is something to be seen (and I would add the permissive licensing is not helping their situation) but the spark is definitely there.

Re:Ubuntu Systemd Vulnerability by cesarb on Wednesday June 28, 2017 @04:10PM (#14657831)
Rust has an important advantage over many other languages: since Firefox now requires it, for most desktop distributions it becomes one of the "must have" languages, together with C and C++. That makes writing system software in Rust an easier sell. Also, IMO Rust sits between C and C++ in the programming language spectrum, so it should be more acceptable for C and C++ programmers than higher-level languages.
Re:Ubuntu Systemd Vulnerability by zanny on Wednesday June 28, 2017 @06:26PM (#14659068)
Rust isn't one of those languages you need to include in a distro. Binary rust is just so's and elf's. It has no runtime, so its compile once and run anywhere with a C linker.

Its development tools are spread like wildfire, but in part that is because of their isolation - you only need rustup to bootstrap your own local Rust ecosystem.

Compared to many other recent native languages, the lack of a runtime absolutely helps Rust in adoption.

Re:Ubuntu Systemd Vulnerability by pjmlp on Thursday June 29, 2017 @02:38AM (#14661237)
Actually it was the adoption of GNU/Linux and *BSD that increased the adoption of C, given that they are UNIX systems.

Back when GNU/Linux was still at 0.x versions, the OS industry was starting to move to C++. Even though Mac OS, OS/2 and Windows APIs and kernel were written in C, everyone was using C++ with PowerPlant, OWL, MFC, CSet++ or languages like Object Pascal.

OS like Symbian and BeOS were even fully written in C++.

But the adoption of GNU/LInux and BSD with the sacred C, meant everyone that wanted to play ball need to use C instead, so the adoption grew and here we are.

Re:Ubuntu Systemd Vulnerability by teamhappy on Wednesday June 28, 2017 @08:44AM (#14653561)
Not plausible at all.

    * Rewriting a codebase is much harder than it seems
    * systemd is pretty big (376,726 LOC according to Open Hub) which makes it even harder to rewrite
    * All maintainers and contributors are C programmers
    * Distros don't want their codebase to be made up of many different languages
Re:Ubuntu Systemd Vulnerability by rndgermandude on Wednesday June 28, 2017 @10:18AM (#14654307)
* You can just rewrite systemd-resolved (and similar networked services), not the entire systemd, for a start. E.g. Firefox, which has even more LOC, started rewriting a ton of stuff in javascript and now rust (e.g. mp4 parsers was the first rust code in Firefox IIRC)

* If your project lacks people with the required skill set, then reach out to programmers who got what you need and educate yourself.

* Distro codebases are not just C since forever, they are a mix of all kinds of stuff, in particular but not limited to C, C++, perl, shell, python.

Re:Ubuntu Systemd Vulnerability by teh_klev on Wednesday June 28, 2017 @11:05AM (#14654737)
> Distro codebases are not just C since forever, they are a mix of all kinds of stuff

Indeed....I was surprised to discover OCaml used in Citrix XenServer when spelunking the codebase.

Re:Ubuntu Systemd Vulnerability by kps on Wednesday June 28, 2017 @11:26AM (#14654913)

  > * Rewriting a codebase is much harder than it seems
… which is why systemd shouldn't be doing it.
Re:Ubuntu Systemd Vulnerability by Someone1234 on Wednesday June 28, 2017 @12:51PM (#14655776)
> * Distros don't want their codebase to be made up of many different languages

That ship sailed a long time ago. Distros already contain C/C++/Python/Perl/Shell Script and others. It is meaningless if you added Go/Rust to that mix.

Re:Ubuntu Systemd Vulnerability by wott on Wednesday June 28, 2017 @10:29AM (#14654403)
> systemd is pretty big (376,726 LOC according to Open Hub) which makes it even harder to rewrite

That's about twice as much as the Linux kernel when I started using a Linux distribution, I believe...

Re:Ubuntu Systemd Vulnerability by riquito on Wednesday June 28, 2017 @11:00AM (#14654685)
Please, Linux 1.0 was 150k loc, it's in the millions nowadays
Re:Ubuntu Systemd Vulnerability by jancsika on Wednesday June 28, 2017 @08:21PM (#14659774)
That seems unlikely.

However, I noticed Bruce Perens' message on the Devuan list about the idea of providing a libsystemd0 interface that calls non-systemd services to complete the requests that come in to the systemd API:

https://lists.dyne.org/lurker/message/20170618.121634.7c0d5b...

The plumbing for something like that could indeed be written in Rust. :)

edit: typo

Re:Ubuntu Systemd Vulnerability by bjourne on Wednesday June 28, 2017 @02:13PM (#14656712)
Rewriting in C++ would be a better and more practical choice though. Mostly because you can rewrite one component at a time.