All posts by corbet

[$] Checked-size array parameters in C

Post Syndicated from corbet original https://lwn.net/Articles/1046840/

There are many possible programmer mistakes that are not caught by the
minimal checks specified by the C language; among those is passing an array
of the wrong size to a function. A recent attempt to add some safety
around array parameters within the crypto layer involved the use of some
clever tricks, but it turns out that clever tricks are unnecessary in this
case. There is an obscure C feature that can cause this checking to
happen, and it is already in use in a few places within the kernel.

[$] Some 6.18 development statistics

Post Syndicated from corbet original https://lwn.net/Articles/1046966/

Linus Torvalds released
the 6.18 kernel as expected on November 30, closing the last full
development cycle of 2025. It was another busy cycle, featuring a record
number of developers. The time has come for a look at where the code came
from for this kernel release, but also for the year-long long-term-support
cycle which has also reached its conclusion with this release.

The 6.18 kernel has been released

Post Syndicated from corbet original https://lwn.net/Articles/1048703/

Linus has released the 6.18 kernel, as expected.

So I’ll have to admit that I’d have been happier with slightly less
bugfixing noise in this last week of the release, but while there’s
a few more fixes than I would hope for, there was nothing that made
me feel like this needs more time to cook. So 6.18 is tagged and
pushed out.

Headline changes in this release include
the ability
to manage namespaces with file handles,
support for the AccECN
congestion-control protocol,
initial support for signing of BPF
programs,
improved memory management with sheaves,
the Rust binder driver,
better control over transparent huge
pages
,
and a lot more.
This release also saw the removal
of the bcachefs filesystem
.

See the LWN merge-window summaries
(part 1, part 2)
and the KernelNewbies 6.18
page
for more information.

Landlock-ing Linux (prizrak.me)

Post Syndicated from corbet original https://lwn.net/Articles/1048704/

The prizrak.me blog is carrying an introduction to the
Landlock security module
.

Landlock shines when an application has a predictable set of files
or directories it needs. For example, a web server could restrict
itself to accessing only /var/www/html and /tmp.

Unlike SELinux or AppArmor, Landlock policies don’t require
administrator involvement or system-wide configuration. Developers
can embed policies directly in application code, making sandboxing
a natural part of the development process.

Kernel prepatch 6.18-rc7

Post Syndicated from corbet original https://lwn.net/Articles/1047578/

Linus has released 6.18-rc7, probably the
last -rc before the 6.18 release.

So the rc6 kernel wasn’t great: we had a last-minute core VM
regression that caused people problems.

That’s not a great thing late in the release cycle like that, but
it was a fairly trivial fix, and the cause wasn’t some horrid bug,
just a latent gotcha that happened to then bite a late VM fix. So
while not great, it also doesn’t make me worry about the state of
6.18. We’re still on track for a final release next weekend unless
some big new problem rears its ugly head.

Improving GCC Buffer Overflow Detection for C Flexible Array Members (Oracle)

Post Syndicated from corbet original https://lwn.net/Articles/1047547/

The Oracle blog has a
lengthy article
on enhancements to GCC to help detect overflows of
flexible array members (FAMs) in C programs.

We describe here two new GNU extensions which specify size
information for FAMs. These are a new attribute,
counted_by” and a new builtin function,
__builtin_counted_by_ref“. Both extensions can be used in
GNU C applications to specify size information for FAMs, improving
the buffer overflow detection for FAMs in general.

This work has been covered on LWN as well.

The 2025 Linux Foundation Technical Advisory Board election

Post Syndicated from corbet original https://lwn.net/Articles/1047546/

The call for
candidates
for the 2025 election for the Linux Foundation Technical
Advisory Board has been posted.

The TAB exists to provide advice from the kernel community to the
Linux Foundation and holds a seat on the LF’s board of directors;
it also serves to facilitate interactions both within the community
and with outside entities. Over the last year, the TAB has
overseen the organization of the Linux Plumbers Conference, advised
on the setup of the kernel CVE numbering authority, worked behind
the scenes to help resolve a number of contentious community
discussions, worked with the Linux Foundation on community
conference planning, and more.

Nominations close on December 13.

PHP 8.5.0 released

Post Syndicated from corbet original https://lwn.net/Articles/1047429/

Version
8.5.0
of the PHP language has been released. Changes include a new
|>” operator that, for some reason, makes these two lines
equivalent:

    $result = strlen("Hello world");
    $result = "Hello world" |> strlen(...);

Other changes include a new function attribute, “#[\NoDiscard]” to
indicate that the return value should be used, attributes on constants, and
more; see the
migration guide
for details.

[$] BPF and io_uring, two different ways

Post Syndicated from corbet original https://lwn.net/Articles/1046950/

BPF allows programs uploaded from user space to be run, safely, within the
kernel. The io_uring subsystem, too, can be thought of as a way of loading
programs in the kernel, though the programs in question are mostly a
sequence of I/O-related system calls. It has sometimes seemed inevitable
that io_uring would, like many other parts of the kernel, gain BPF
capabilities as a way of providing more flexibility to user space. That
has not yet happened, but there are currently two patches sets under
consideration that take different approaches to the problem.

[$] LWN.net Weekly Edition for November 20, 2025

Post Syndicated from corbet original https://lwn.net/Articles/1046323/

Inside this week’s LWN.net Weekly Edition:

  • Front: Hardware architectures; Fedora Flatpaks; Debian hardware support; sockaddr structure; NUMA nodes; Homebrew.
  • Briefs: LightDM security; Debian Libre Live; Xubuntu postmortem; Blender 5.0; Git 2.52.0; Rust in Android; Thunderbird 145; Quotes; …
  • Announcements: Newsletters, conferences, security updates, patches, and more.

[$] Hot-page migration and specific-purpose NUMA nodes

Post Syndicated from corbet original https://lwn.net/Articles/1046249/

For better or for worse, the NUMA node is the abstraction used by the
kernel to keep track of different types of memory. How that abstraction is
used, though, is still an active area of development. Two patch sets
focused on this problem are currently under review; one addresses the
perennial problem of promoting heavily used folios from slower to faster
memory, while the other aims to improve the kernel’s handling of nodes
containing special memory installed for a specific purpose.

[$] A struct sockaddr sequel

Post Syndicated from corbet original https://lwn.net/Articles/1045453/

One of the many objectives of the Linux
Kernel Self-Protection Project (KSPP)
, which just completed ten years of
work
, is to ensure that all array references can be bounds-checked,
even in the case of flexible array members, the size of which is not known
at compile time. One of the most challenging flexible array members in the
kernel is not even declared as such. Almost exactly one year ago, LWN looked at the effort to increase safety around
the networking subsystem’s heavily used sockaddr structure. One
year later, Kees Cook is still looking for a way to bring this work to a
close.

Rust in Android: move fast and fix things (Google Security Blog)

Post Syndicated from corbet original https://lwn.net/Articles/1046397/

The Google Security Blog has a
new post
on just how well the use of Rust is working out for the
Android project.

We adopted Rust for its security and are seeing a 1000x reduction
in memory safety vulnerability density compared to Android’s C and
C++ code. But the biggest surprise was Rust’s impact on software
delivery. With Rust changes having a 4x lower rollback rate and
spending 25% less time in code review, the safer path is now also
the faster one.

Public-inbox 2.0.0 released

Post Syndicated from corbet original https://lwn.net/Articles/1045965/

Version 2.0.0 of public-inbox, the mail archiving system behind
lore.kernel.org and LWN’s email archive, has been released. “This
release includes several new features and fixes; mostly around improved
integration between inboxes and coderepos for solver. Portability and
reliability is also improved, especially in the internal process management
of lei.

A proposed kernel policy for LLM-generated contributions

Post Syndicated from corbet original https://lwn.net/Articles/1045806/

The kernel community is currently reviewing a
proposed policy
for contributors who are using large language models to
assist in the creation of their patches; the primary focus is on disclosure
of the use of those tools. “The goal here is to clarify community
expectations around tools. This lets everyone become more productive while
also maintaining high degrees of trust between submitters and
reviewers.

Freedesktop.org now hosts the Filesystem Hierarchy Standard

Post Syndicated from corbet original https://lwn.net/Articles/1045405/

The future of the Filesystem Hierarchy Standard (FHS) has been under discussion for some time; now,
Neal Gompa has announced
that the FHS is “hosted and stewarded” by Freedesktop.org.

For those who are unaware, the Filesystem Hierarchy Standard (FHS)
is the definition for POSIX operating systems to organize system
and user data. It is broadly adopted by Linux, BSD, and other
operating systems that follow POSIX-like conventions.

See this
page
for the specification’s new home.