On Fri, Apr 28, 2023 at 1:40 AM David Laight <David.Laight@xxxxxxxxxx> wrote: > > It is definitely architecture dependant. > x86-64 and arm-64 will return two 64bit values in registers. > x86-32 and arm-32 return two 32bit values on stack. Yes, but I think the "return value in two registers" is the generic thing. At least gcc has very special code to deal with a two-register return value. And yes, those registers will then obviously be different sizes on different architectures, but a tuple like a '(ptr,fd)' thing will fit regardless. We very much do depend on this kind of pattern generating reasonable code in some parts of the kernel. Linus