Re: [PATCH 2/3] vmsplice: make vmsplice a trivial wrapper for preadv2/pwritev2
From: Linus Torvalds
Date: Fri Jun 05 2026 - 13:23:05 EST
On Fri, 5 Jun 2026 at 09:30, Florian Weimer <fweimer@xxxxxxxxxx> wrote:
>
> > Uhhuh. But that is only specific to 'bool', right?
>
> Also char and short.
That sounds like a complete ABI violation as far as I can tell.
Scary. Because I would not be surprised if we have code that assumes otherwise.
Now, the kernel *seldom* uses char/short types, and since compilers
are typically at least self-consistent in those cases and we don't
interact directly with untrusted sources.
The system call interface is special, but we wrap that for other
reasons so deeply these days that we'd not be impacted.
But we also do have various assembler code, and I certainly wasn't
aware that apparently compilers have been walking away from the old
ABI rules.
I did find assembler code that clearly uses just 8-bit register
accesses and function calls, but it was all _entirely_ within
assembler. The low-level debug printing in
arch/x86/kernel/relocate_kernel_64.S
puts the character values in %al and then calls pr_char_8250() or
pr_char_8250_mmio32() with it, but that is *all* in asm code.
I didn't find anything obvious that calls C code with that kind of
argument though (which makes sense - we typically call the other way:
C code calling into asm code, not the other way around).
So at a guess we're fine, but it's still somewhat unsettling.
And maybe others were aware of this, and it's just me that has old
32-bit x86 code in mind.
Linus