By goyox86 on

This is the 35th post of a series of blog posts tracking the development and progress of Redox, the Rust operating system. If you want to know more about Redox in general, visit our Github page.

(edited by @goyox86)

PSA

If you have any questions, ideas, or are curious about Redox, we recommend joining #redox on irc.mozilla.org , our Discourse forum or you can get an invite to our chat by sending an email request to info@redox-os.org .

What’s new in Redox?

TL;DR

Hello people! Welcome to the 35th edition of TWiRx!

We started this year with @jackpot51 being featured on the Changelog talking about building a secure operating system in Rust and about Redox in general. Make sure you listen to the episode, it’s pretty good! (specially the part on which Jeremy says SPOILER ALERT!: “Redox is not going away”)

This month we’ve also got the Redox Crash Challenge going on. An initiative to attempt to cause the system to:

Escalate privilege.

Lock up.

Kernel panic.

Program crash.

Any other unexpected behavior.

Basically, a fun way of testing and discover bugs in the system, and ultimately hardening it!

So far, it has been productive! We have found (and successfully fixed) few bugs:

An issue with too many arguments to exec not returning E2BIG: redox-os/kernel#81

An issue with the kernel attempting to remap kernel code (and failing due to protections) in: redox-os/kernel#79

An issue with address validation allowing overflows: redox-os/kernel@dcb49be

An issue with su allowing login as any user by pressing Ctrl+D : redox-os/userutils@02759b4

Without further ado, let’s start with this week’s work!

We begin with the kernel, where SIGCONT/SIGSTOP signals were implemented, a bug in the TLS when forking was fixed (this one was causing some programs to crash and/or miss behave), along with the implementation of waitpid on PGID .

One interesting thing I saw in the kernel was the start of the work on PTI (Page Table Isolation) as a mitigation for the recently discovered Meltdown vulnerability. I was gladly impressed while looking at the changes, how small, isolated they were. All of this, without mentioning the time frame in which they were made. One of the advantages of having a microkernel!

Also in the low level, syscall, our system call interface crate, got a bunch of additions like: WUNTRACED / WCONTINUED , wif* functions, and a few more wait calls.

A quick look at Redoxfs reveals a small change to enter into the null namespace by @jackpot51.

Moving up to the drivers @ids1024 have been busy working on an ATAPI driver which gives support for CD-ROM drives along with an implementation of the ISO-9660 filesystem (the standard filesystem for CD-ROM drives). I think is pretty cool!

On the Ion shell We saw the addition of the isatty builtin by @Sag0Sag0 as well as many small fixes and improvements.

In the Cookbook, the collection of package recipes for Redox, @zachlute added the logd package which implements a log daemon located at log: for collecting all log output.

During this period, I saw a lot of activity on the GUI front, particularly Orbtk and Orbutils namely: Changes to allow apps to add classes and pseudo-classes to widgets, the addition of a Style trait to remaining widgets, correction on the initialization of fonts in WindowBuilder , the implementation of KeyPressed and KeyReleased events plus some other goodies. Good work @blackle and @FloVanGH!

Lastly (but not least) we have the Userutils Coreutils and Extrautils with bugfixes for su , updates to README and some unused code removal respectively.

Looking forward to see you soon in the next issue of TWiRx.

BTW! keep trying to crash Redox and report bugs!

Redox

Redox: A Rust Operating System - Main Repo

@fengalin Docker: Added autopoint . Details here.

. Details here. @dogHere Added autopoint as a dependency for ubuntu. Details here.

as a dependency for ubuntu. Details here. @bugabinga Added dependency xargo to manual setup. Details here.

to manual setup. Details here. @jackpot51 Added logd . Details here.

. Details here. @FloVanGH Added orbgame to the readme. Details here.

book

The Redox book

@bmusin Replaced “I” with “We” for consistency with rest of text. Details here

kernel

The Redox microkernel

@jackpot51 Added support for stop/cont signals. Details here.

@jackpot51 Fixed TLS when forking, fixed signal delivery to self. Details here.

@jackpot51 Made a change to use separate stopped status. Details here.

@jackpot51 Added support for WCONTINUED and WUNTRACED , Fixed issues with SIGCONT . Details here.

and , Fixed issues with . Details here. @jackpot51 Fixed stop signal by switching context after stopping. Details here.

@jackpot51 Implemented waitpid on PGID . Details here.

on . Details here. @wartman4404 Made an update to write hpet timer twice. Details here.

timer twice. Details here. @jackpot51 Added PML4 constants. Details here.

@jackpot51 Added trampolines for PTI support. Details here.

@jackpot51 Added rbx to saved registers in syscall stack. Details here.

to saved registers in syscall stack. Details here. @jackpot51 WIP: Added per-cpu interrupt stack used before mapping kernel heap. Details here.

@dlrobertson Updated debugging docs. Details here.

@jackpot51 Updated PTI patch to inline PTI functions. Details here.

@jackpot51 Used fninit in start. Details here.

in start. Details here. @jackpot51 Removed comment from linker file. Details here.

@jackpot51 Disabled PTI by default. Details here.

@jackpot51 Removed debugging print. Details here.

@jackpot51 Fixed potential overflows in validate_slice and validate_slice_mut, require memory to be userspace. Details here.

@jackpot51 Fixed #81 by limiting arguments to 4095, Fix #79 by limiting mappable sections to the 2GB mark. Details here.

@biotty Made a change to operate on word size as possible. Details here.

Drivers

Redox OS Drivers

@ids1024 AHCI: Implemented basic ATAPI support (Needed for CD drives). Details here.

@ids1024 AHCI: Refactored duplicated ATA command code into a method. Details here.

Syscall

Redox Rust Syscall Library

@jackpot51 Added WUNTRACED . Details here.

. Details here. @jackpot51 Added WCONTINUED . Details here.

. Details here. @jD91mZM2 Added wif* functions. Details here.

functions. Details here. @jackpot51 Released version 0.1.36 . Details here.

. Details here. @jackpot51 Added more wait related calls. Details here.

related calls. Details here. @ids1024 Removed the core_intrinsics feature. Details here.

Ion

The Ion Shell. Compatible with Redox and Linux.

@mmstick Made some pipeline fixes & tests. Details here.

@gibfahn Used libc::__error() rather than libc::__errno_location() on macOS. Details here.

rather than on macOS. Details here. @Sag0Sag0 Added the isatty builtin. Details here.

builtin. Details here. @jackpot51 Updated redox-syscall, to use WUNTRACED for waitpid in Redox. Details here.

for in Redox. Details here. @blackle Made a change to call execve from fork_and_exec in sys/redox.rs so they can share code. Details here.

from in so they can share code. Details here. @its-suun Fixed issue board link. Details here.

@Sag0Sag0 Cleaned up builtin isatty . Details here.

. Details here. @Sag0Sag0 Updated methods used to print to stdout and stderr . Details here.

and . Details here. @spacingnix Fixed an array parsing issue. Details here.

@aimof Removed tests dependency. Details here.

@jD91mZM2 Implemented CD_CHANGE function. Details here.

function. Details here. @jD91mZM2 Moved binary::main into actual main . Details here.

into actual . Details here. @aimof Added tests to #638 array parsing issue. Details here.

@jackpot51 Synchronized Redox and Unix job_control. Details here.

Cookbook

A collection of package recipes for Redox.

@zachlute Added the logd recipe. Details here.

Orbtk

The Orbital Widget Toolkit. Compatible with Redox and SDL2.

@blackle Made an update to unpress buttons regardless of left_button state. Details here.

@blackle [WIP] Allowed apps to add classes and pseudoclasses to widgets. Details here.

@blackle Added Style trait to remaining widgets, allow apps to remove classes. Details here.

trait to remaining widgets, allow apps to remove classes. Details here. @blackle Initialized font correctly in WindowBuilder . Details here.

. Details here. @FloVanGH Implemented KeyPressed and KeyReleased events. Details here.

and events. Details here. @FloVanGH Fix bug when x > 200 the entries of Combobox were not being drawn. Details here.

the entries of were not being drawn. Details here. @FloVanGH Widget children tree part one / two. Details here.

Orbutils

The Orbital Utilities. Compatible with Redox and SDL2.

@blackle Updated calendar and file_manager to use new CSS in Orbtk. Details here.

@blackle Fixed build with toolchain. Details here.

Redoxfs

The Redox Filesystem.

@jackpot51 Enter null namespace for redoxfs. Details here.

Userutils

User and group management utilities.

@jackpot51 Fix bug causing ctrl-d to log in any user with su, Document su’s logic, Return error code of shell from su. Details here.

Coreutils

The Redox coreutils.

@dabbydubby Updated the readme to show only included files. Details here.

Extrautils

Extra utilities for Redox (and Unix systems).

@bmusin Remove unused use of AsciiExt . Details here.

of . Details here. @bmusin Change man constant names to MAN_PAGE . Details here.

New contributors

Since the list of contributors are growing too fast, we’ll now only list the new contributors. This might change in the future.

Sorted in alphabetical order.

If I missed something, feel free to contact me @goyox86 or send a PR to Redox website.