[lkml]   [2018]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
On Fri, Mar 30, 2018 at 12:58:02PM +0200, Ingo Molnar wrote:
> * John Paul Adrian Glaubitz <> wrote:
> > On 03/27/2018 12:40 PM, Linus Torvalds wrote:
> > > On Mon, Mar 26, 2018 at 4:37 PM, John Paul Adrian Glaubitz
> > > <> wrote:
> > >>
> > >> What about a tarball with a minimal Debian x32 chroot? Then you can
> > >> install interesting packages you would like to test yourself.

> Here's the direct download link:
> $ wget

> Seems to work fine here (on a distro kernel) even if I extract all the files as a
> non-root user and do:
> ~/s/debian-x32-unstable> fakechroot /usr/sbin/chroot . /usr/bin/dpkg -l | tail -2
> ERROR: object '' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
> ii util-linux:x32 2.31.1-0.5 x32 miscellaneous system utilities
> ii zlib1g:x32 1:1.2.8.dfsg-5 x32 compression library - runtime

> So that 'dpkg' instance appears to be running inside the chroot environment and is
> listing x32 installed packages.

> Although I did get this warning:
> ERROR: object '' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
> Even with that warning, is still still a sufficiently complex test of x32 syscall
> code paths?

Instead of mucking with fakechroot which would require installing its :x32
part inside the guest, or running the test as root, what about using any
random static binary? For example, a shell like sash or bash-static would
have a decentish syscall coverage even by itself.

I've extracted sash from
and placed at

$ sha256sum sash.x32
de24097c859b313fa422af742b648c9d731de6b33b98cb995658d1da16398456 sash.x32

Obviously, you can compile a static binary that uses whatever syscalls you
want. Without a native chroot, you can "gcc -mx32" although you'd need some
kind of libc unless your program is stand-alone.

It might be worth mentioning my "arch-test:
Because of many toolchain pieces it needs, you want a prebuilt copy:
-- while it has _extremely_ small coverage of syscalls (just write() and
_exit(), enough to check endianness and pointer width), concentrating on
instruction set inadequacies (broken SWP on arm, POWER7 vs POWER8, powerpc
vs powerpcspe, etc), it provides minimal test binaries for a wide range of

⣾⠁⢰⠒⠀⣿⡁ I was born a dumb, ugly and work-loving kid, then I got swapped on
⢿⡄⠘⠷⠚⠋⠀ the maternity ward.
[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2018-03-30 17:56    [W:6.206 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site