All posts by daroc

[$] Analyzing Rust programs with Charon

Post Syndicated from daroc original https://lwn.net/Articles/1097198/

Nadrieril is a long-time Rust contributor, and the maintainer of the rustc
pattern-matching infrastructure. During his involvement with Rust, he has
noticed a problem with the usability of the language: it is difficult to
automatically extract information from a Rust crate for use with other tooling.

The Charon project
aims to fix that by providing a stable API for accessing
internal information from the Rust compiler.

[$] Beyond the &

Post Syndicated from daroc original https://lwn.net/Articles/1096028/

Rust has a number of kinds of smart pointers, both in the standard
library and defined by users. Still, some operations that are possible with
built-in references are not possible to perform with user-defined smart
pointers. Tyler Mandry, lead of the Rust project’s

language team
, spoke at

RustConf 2026
about the lengthy effort to change that, and make smart pointers
just as flexible as built-in references.

[$] Native support for Rust on the GPU

Post Syndicated from daroc original https://lwn.net/Articles/1095731/

Christian Legnitto is the maintainer of

rust-gpu
and

Rust CUDA
, two
libraries that make it possible to program a computer’s graphics processing unit
(GPU) from Rust. He isn’t satisfied with the current state of GPU support in
Rust, however. In a talk at

RustConf 2026
, he explained his vision for how the
GPU could become an ordinary compiler target for normal Rust code, without the
need for any special libraries or new ecosystem support. That vision is not yet
fully implemented, but he does have a prototype that he is preparing to release.

[$] Listening to the radio with Rust

Post Syndicated from daroc original https://lwn.net/Articles/1095721/

Many of the transmissions sent over the radio spectrum can
be decoded with a relatively cheap hardware dongle. Thomas Eckert presented at

RustConf 2026
in Montreal about his hobby:
decoding radio transmissions with Rust.
In his presentation, he
covered all of the math necessary to get started with

software-defined radio
,
and gave demonstrations of listening to AM and FM radio, as well as decoding
transmissions from
aircraft transponders. His slides and example code are

available
on GitHub.

[$] Compiling the kernel with gccrs

Post Syndicated from daroc original https://lwn.net/Articles/1095553/

Pierre-Emmanuel Patry and Arthur Cohen gave a talk at

RustConf 2026
on the
status of the Rust frontend for GCC (gccrs), with a particular eye toward the
goal of

compiling the Linux kernel
. Patry gave a follow-up talk for a more
kernel-focused audience at

Kangrejos
the next week, which Cohen could not attend. The

gccrs project
is
making good progress overall, but it will still be some time until the compiler
is usable.

[$] Stabilizing Rust’s never type

Post Syndicated from daroc original https://lwn.net/Articles/1091015/

A function’s return type is supposed to indicate the kind of data that it
produces.
Rust’s “never” type, which is

denoted by an exclamation mark
(“!“), is the type the language uses to mark
a function that never returns and other places where a value can never occur. For
a long time, the never type was used internally by the compiler, but was
considered an unstable feature. On

August 24
, after more than two years of work,
Rust-compiler-contributor “waffle” finally managed to stabilize the type. It
took so long, in part, because it involved a small breaking
change to previous Rust editions, which the compiler maintainers needed to
ensure did not impact much real code.

[$] Securely suspending LUKS-encrypted disks

Post Syndicated from daroc original https://lwn.net/Articles/1090568/

When a laptop is asleep, its memory is not unreadable. The right
tooling can attach to the computer’s memory bus and read out its contents, and

cold-boot attacks
can theoretically read values from memory for a short time
after the computer loses power. That
is really an unavoidable fact about the hardware, but some users would still
like to ensure that, even if this happens, their long-term encryption keys, such as
the key for full-disk encryption, remain unreadable. In June 2026, Ingo
Blechschmidt

discovered
that Linux kernel versions after 6.9 (released in
May 2024)
were not erasing disk-encryption keys when a laptop was put to sleep, even
when configured to do so. He quickly identified a potential fix, which has been
merged, but it was not a comprehensive solution.

[$] The “rnull” Rust block driver

Post Syndicated from daroc original https://lwn.net/Articles/1090378/

The
null block
driver
(null_blk)
is a small driver that is mostly useful for benchmarking block-layer
implementations. It accepts all requests and marks them complete as quickly as
possible, doing as little work as possible. In June 2026, Andreas Hindborg shared

a patch set
implementing the same functionality in Rust, in order to show
that a simple block driver is now possible to write using the kernel’s
Rust APIs and to enable comparisons between the C and Rust
implementations.
A minimal version of the “rnull” driver is already present in the mainline
kernel, but Hindborg’s patch set brings it up to feature parity with the C
version.

[$] How to be safe from quantum computing

Post Syndicated from daroc original https://lwn.net/Articles/1088305/

Practical quantum computers have been ten years away for the last several
decades. Now, however, it’s beginning to look as though they will be
possible in just a few years. Recent

research with obfuscated results
demonstrated much lower memory requirements to factor

ECDSA
keys on a quantum computer, with

work by other researchers in the open
more than halving memory use compared
to the state of the art in 2023.
At the same time, computer
manufacturers are

boasting
quantum processors that retain viable superpositions over longer periods.
Given how slowly software updates filter out to stable systems, it’s worth
looking at what configuration changes and protocol updates are needed to be safe
from quantum computers now.

[$] BPF, continuous testing, and stable kernels

Post Syndicated from daroc original https://lwn.net/Articles/1087823/

Ihor Solodrai and Shung-Hsi Yu wrapped up the BPF track at the 2026

Linux
Storage, Filesystem, Memory-Management, and BPF Summit
with a pair of
sessions related to testing.
Solodrai spoke about what has changed for BPF’s continuous-integration (CI)
testing. Yu spoke about what may be
needed to test BPF updates in stable kernels more thoroughly. The
BPF subsystem’s CI tests are in a good place, they said; even so, Solodrai and Yu have a
handful of possible avenues toward enabling better test coverage in the future.

Domas: Bypassing memory protection with AMD’s memory controllers

Post Syndicated from daroc original https://lwn.net/Articles/1088778/

Christopher Domas has
published a proof of concept with a description showing how to use AMD memory controllers’ bank swizzle mode to bypass memory protection and read or write arbitrary data, including CPU microcode definitions and memory belonging to the

platform security processor
. Among other things, this allows code running at the kernel level to directly manipulate the meaning of processor instructions, potentially bypassing other security measures such as memory encryption and virtual machine isolation.

This is not, strictly, unexpected behavior: it is

documented in AMD’s manual
(on page 113 of that PDF). But the fact that it can be used to access arbitrary memory and thereby rewrite supposedly immutable parts of the computer’s firmware without crashing the host machine seems like an unintentional side-effect of the design. Fortunately, since enabling bank swizzle mode requires kernel-level privileges, the vulnerability is not an immediate problem for most software. Still, it seems likely that this technique will end up being used for nefarious purposes eventually.

[$] Block-layer error injection

Post Syndicated from daroc original https://lwn.net/Articles/1086344/

Storage code has to cope with hardware that fails in inconvenient
ways, but coaxing a healthy disk into producing those failures on
demand, for testing, is usually not possible. The kernel
provides several ways to inject block-layer I/O errors, but none of those can select the
operation to fail, pick the status code to return, or target a disk
directly without employing a stacked device on top. Use of a stacked device means
the test runs against the mapper device, not the disk it was meant to
exercise. A patch
series
from Christoph Hellwig adds a configurable error-injection
interface that does all three things that the current error-injection code
lacks, controlled by a per-disk debugfs
file.

[$] Even more formal verification for BPF

Post Syndicated from daroc original https://lwn.net/Articles/1087069/

BPF offers useful safety guarantees, but Kumar Kartikeya Dwivedi wants BPF
programs to be even safer. At the 2026

Linux Storage, Filesystem,
Memory-Management, and BPF Summit
, he led a session
(slides)
discussing the possibility
of adding domain-specific invariants to BPF programs. It was not a discussion
intended to lead to the implementation of any particular kernel feature, but
rather an overview of why additional formal verification might be needed, and
how it could work with the existing BPF ecosystem.

[$] Examining other network namespaces using BPF

Post Syndicated from daroc original https://lwn.net/Articles/1085896/

Jordan Rife’s work involves writing BPF programs for

Cilium
that interface with

Kubernetes

networking. As part of that work, he wants to enable BPF programs with
appropriate permissions to iterate through the sockets of a different network
namespace. He led a session about the idea at the 2026

Linux Storage,
Filesystem, Memory-Management, and BPF Summit
where the BPF developers in
attendance were quick to suggest a number of related alternatives.

Another npm worm

Post Syndicated from daroc original https://lwn.net/Articles/1087108/


StepSecurity
is

reporting
the emergence of a new worm affecting npm packages.
The design of the worm is nothing new, but the rapidity with which it is
exploiting captured npm
packager credentials is noteworthy.

TL;DR: A self-propagating worm, which we are calling ChainDrop, is spreading rapidly through the npm ecosystem. So far 435 packages and more than 1,550 compromised versions have been flagged, starting with [email protected]. If you are using any of the packages listed below, assume your environment is compromised. We are still investigating the full scope; check back on this post for updates.

[$] The future of libraries in BPF

Post Syndicated from daroc original https://lwn.net/Articles/1084869/

Song Liu believes that the way that programmers assemble complex BPF programs
will be changing rapidly in the future.
At a session of the 2026

Linux Storage,
Filesystem, Memory-Management, and BPF Summit
, he shared his thoughts on what
that change could look like, though he did not have any concrete proposals for
what, if anything, the BPF maintainers should do. He anticipates an
ecosystem of Rust BPF packages developing, which is significant because BPF
does not really have a package manager at the moment.

[$] Debugging information for inlined functions

Post Syndicated from daroc original https://lwn.net/Articles/1083985/

BPF programs use

BPF type format
(BTF) debugging information in order to
determine how to interact with functions in the kernel. Specifically, tracing a
kernel function involves finding its address in the kernel’s BTF section — but
that doesn’t work for functions that have been inlined, and therefore don’t have
a single, specific address. Alan Maguire wants to add information about inlined
functions to BTF in order to allow them to be traced, and led a session on that
topic at the 2026

Linux Storage, Filesystem, Memory-Management, and BPF Summit
.

[$] Progress toward compiling Linux with gccrs

Post Syndicated from daroc original https://lwn.net/Articles/1083202/

The
gccrs project
, which is creating a Rust frontend for the GCC compiler, has
spent the first half of 2026 focusing on compiling the Linux
kernel. By testing the compiler against the kernel crates, the
development team has made significant progress toward generating correct code
for other Rust programs. As detailed in the project’s

weekly
and

monthly
reports, this effort has uncovered and resolved problems
in areas such as
attribute handling (described in the

report for February
), name resolution, and resource management (both

detailed in the May report
). Currently, the compiler can only handle simple
standalone programs, but that situation could change rapidly in the coming
months.

[$] An update on netkit and the use of BPF in user space

Post Syndicated from daroc original https://lwn.net/Articles/1083418/

Daniel Borkmann led a session at the 2026

Linux Filesystem, Memory-Management,
and BPF Summit
about the progress that has been made with netkit, the subsystem
that allows virtual machines (VMs) running on Linux to perform networking efficiently.
When that did not fill the full time, he went on to discuss his idea for
using BPF to live-patch user-space applications. While netkit is making
progress, and can now support zero-copy receipt of packets into a VM in a
network namespace, the idea of using BPF for patching user-space programs
remains entirely speculative.