Re: Bug#776999: broken 32-bit userland on 64-bit kernel
On Thu, Feb 05, 2015 at 02:58:03AM +0100, Adam Borowski wrote:
> Time to RTFK then.
> Thus: on Debian's kernels, any i386 or x32 process will get a 32-bit field.
> Ie, my version of the patch is needed. On kernels compiled without
> CONFIG_COMPAT, Peter Jones' version (reading uname -m) is correct.
> So... how exactly can we divine the value of this define?
I see two ways:
* use cooked rather than raw files
* on little-endian, assume the first four bytes of data won't ever be zero.
Is this a safe assumption? If so, this lets us determine the width, as
the kernel's limit of DataSize is 1024, a good deal below 4GB.
Big-endian EFI is probably "don't bother", but in that case the first four
bytes being zeroes mean it's a 64-bit field.
Does this sound sane to you? If so, should I prepare a patch doing this?
// If you believe in so-called "intellectual property", please immediately
// cease using counterfeit alphabets. Instead, contact the nearest temple
// of Amon, whose priests will provide you with scribal services for all
// your writing needs, for Reasonable and Non-Discriminatory prices.