On 22 March 2018 at 10:36, Laurent Vivier <laur...@vivier.eu> wrote: > Le 22/03/2018 à 02:52, Laurent Vivier a écrit : >> It seems this patch breaks something in linux-user mode emulation for >> m68k (32bit BE) on ppc (32bit BE). >> >> What I have: >> >> ~/chroot$ sudo QEMU_CPU=m68040 chroot m68k/sid/ >> I have no name!@localhost:/# ls >> bin debootstrap etc lib qemu-m68k run sys usr >> boot dev home proc root sbin tmp var >> qemu: uncaught target signal 11 (Segmentation fault) - core dumped >> ~/chroot$ >> >> It seems "bash" crashes on "ls" exit. >> >> My chroot has been installed with: >> >> ARCH=m68k >> TARGET=sid >> CHROOT=$HOME/chroot/m68k/sid/ >> REPOT=http://cdn-fastly.deb.debian.org/debian-ports/ >> debootstrap --arch=$ARCH --foreign --variant=minbase \ >> --no-check-gpg $TARGET $CHROOT $REPO >> >> I didn't investigate more. > > It goes wrong in this part: > > + */ > + if (is_write && info->si_signo == SIGSEGV && info->si_code == > SEGV_ACCERR && > + h2g_valid(address)) { > > Because, on ppc, si_code is SEGV_MAPERR and not SEGV_ACCERR > (on x86_64, si_code is SEGV_ACCERR as expected)
So on PPC if you have a page mapped, and you access it with the wrong permissions, you get SEGV_MAPERR? This seems like a host kernel bug to me. thanks -- PMM