Redox: Ring Buffers Project Summary

(redox-os.org)

40 points | by g0xA52A2A 3 days ago

4 comments

  • digikata 1 hour ago
    Interesting read keeping in mind this is two degrees of separation from NVMe queues and their atomic doorbell head/tail registers.
  • happyPersonR 1 hour ago
    This is cool stuff !!

    Would love to see what other things could benefit from this beyond storage. Maybe like BT or similar wireless.

  • rvz 35 minutes ago
    This is great work by the Redox team. This might be over the heads of many HNers who are undergoing skill atrophy in real time and addicted to agents, given that 4 hours and less than 10 comments on a highly technical blog post about Rust and asynchronous I/O in Redox.

    This project is vehemently against AI usage of any kind, so I can trust that the contents of this post has been checked and written by someone who has read the code and knows what they are doing.

    > The Linux io_uring interface allows the user to submit one or more I/O operations to the kernel, which are then processed in an asynchronous fashion without blocking the userspace process. Redox, being a microkernel, handles I/O in userspace scheme processes rather than in the kernel.

    io_uring is incredibly fast for async I/O but is also a massive security disaster in the Linux kernel. As long as Redox is able to show a secure interface for async I/O the better. Likely part of their long term goals for the OS.

    > While it has substantially improved over the years, IPC is still quite slow on Redox, and this is important to optimize as ring buffers can only offset this overhead to a certain extent. This has been a focus of our work to improve system performance.

    I quite like this targeted and thoughtful approach for a wholistic improvement starting with ring buffers in redox. They need to compare the async executor benchmark results with Linux and continue from there for improvements.

    > The optimization made here is that the kernel zeroes the vector registers if the caller and callee entered the kernel through syscalls, rather than saving/restoring (using vzeroall, ldmxcsr etc. as required for correctness).

    Interesting approach for complete correctness over performance in this area and this tells me that they are not taking going to risk on overlying on rust's "guarantees" to help them prevent races or data reuse after free bugs in the Redox kernel.

    One of the most technically sound and researched posts I've read, but unfortunately it has been buried under low effort slop posts on HN.

    • wofo 12 minutes ago
      Could you elaborate on io_uring being a security disaster? The Redox article has the following to say:

      > In its early days, io_uring did have a few security issues and memory leaks, but these have since been addressed

      The article also links to a GitHub discussion where someone explains how io_uring is actually all right (see https://github.com/axboe/liburing/discussions/1047#discussio... ).

      (I don't have a horse in this race, I just like being well informed and had reconciled myself with io_uring being secure as a consequence of the Redox article.)

    • anthk 6 minutes ago
      >io_uring is incredibly fast for async I/O but is also a massive security disaster in the Linux kernel

      Torvalds bound it up with... DMABUF. Guess what will happen.

      On Linux' future memory subsystem imported from a branch, the Asterinas' one in Rust it's miles ahead and far more secure. Like Windows 98 compared to NT.

  • hurricanepootis 4 hours ago
    Redox: Reduction and Oxidation
    • QuantumNomad_ 2 hours ago
      That is indeed the chemical reaction that creates rust, and they intentionally named their OS such for that very reason, as they are writing this OS in the Rust programming language. But I am not sure why you’d just comment that and nothing more. For a moment I thought you might be a bot instructed to “write a relevant comment for this title”. But your other comments in other threads seem human to me.
      • wheremiah 8 minutes ago
        Alternative take: I did look up that exact word while reading the article. It’s been a minute since I saw it in a chemistry context. For me, it was nice to see someone else with the same question and that they took the time to post a concise definition.