Subject: Re: [bug#43591] [PATCH core-updates] gnu: glibc-final: Catch all cases of a glibc user not requesting 64-bit offsets and then using readdir.

From: Danny Milosavljevic <[email-masked]>
Date: Sat, 26 Sep 2020 12:50:28 +0200

Hi Andreas,

On Fri, 25 Sep 2020 22:03:23 +0200
Andreas Enge <[email-masked]> wrote:

> On Fri, Sep 25, 2020 at 01:11:18AM +0200, Marius Bakke wrote:
> > Arguably running code for foreign architectures through QEMU binfmt is
> > something of a hack.  Mandating that every package *must* be patched to
> > support it seems user-hostile.  I'm more in favor of dropping it on the
> > build farm  
> 
> Indeed it is weird we do not only compile packages natively on the build
> farm.

I'm sorry that my earlier analysis mentioned qemu at all.  qemu is not at fault
at all.  The same happens if you run 32 bit code on 64 bit hosts without using
qemu!  Except for one case: i686 on x86_64--where they have a compatibility
layer in the kernel that works around this problem (which I don't like
either--it obfuscates the problem).

For example a problem appears on:

- armhf on x86_64 host; fault not because of qemu
- armhf on aarch64 host; not using qemu in the first place

And it should appear also on (but I didn't test):

- i686 on aarch64 host; not using qemu in the first place

The problem always appears if the host is 64 bits and the guest is 32 bits,
no matter what cpus both are, except for the case "i686 on x86_64".