Re: Rust kernel policy

Linus Torvalds
2025-02-26T19:33:06Z

On Wed, 26 Feb 2025 at 08:06, Jason Gunthorpe <jgg@nvidia.com> wrote:
>
> 2) Does Linus accept a PR from the maintainer? This is what I think
> Laurent is driving at. AFAIK Linus accepting a PR at least
> requires it passes your build test and boots your test machine(s).

I don't think I can give any black-and-white answers.

I refuse pulls relatively seldom, but there are no hard-and-fast rules
for when it happens.

The most common situation is that something doesn't build for me, and
that's because my build testing is actually fairly limited.

My build testing is trying to be wide-ranging in the sense that yes, I
do an allmodconfig build on x86-64 (which is likely to be the config
that compiles the *most* code). And I do a more limited - but real -
"local config" build too fairly regularly.

But at the same time, my build testing is *very* limited in the
configuration sense, so if something fails to build for me, I think
it's a pretty big failure.

Now, 99% of the time, the failure is on the pull requesters side:
_almost_ always it's just that the stuff I was asked to pull was never
in linux-next to begin with, or it was in linux-next, problems were
reported, and the maintainer in question then ignored the problems for
some reason.

Very rarely does it turn out that it was all in linux-next, but I
happened to hit something nobody else did. Yes, it happened with the
Rust 'bindgen' thing. Once. Not enough to make it very much of a
pattern.

Sometimes I find problems not in the build, but in the running of the
code. That actually happens distressingly often, considering that my
test-cases tend to be fairly limited. So when I hit a "this doesn't
work for me", it clearly got very little real-life testing. Usually
it's something that no amount of automated testing bots would ever
find, because it's hardware-related and the test farms don't have or
don't test that side (typically it's GPU or wireless networking,
occasionally bluetooth that fails for me).

But that tends to be after I've done the pull and often pushed out, so
then it's too late.

Honestly, the most common reason for refusing pulls is just that
there's something in there that I fundamentally don't like. The
details will differ. Wildly.

Linus