qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] failed kpartx on qemu-aarch64-static


From: Peter Maydell
Subject: Re: [Qemu-devel] failed kpartx on qemu-aarch64-static
Date: Mon, 4 Jul 2016 16:49:40 +0100

On 2 July 2016 at 19:23, Peter Maydell <address@hidden> wrote:
> On 2 July 2016 at 17:25, Chanho Park <address@hidden> wrote:
>> I've got a kpartx crash frin qemu-aarch64 user emulation.
>> The version of qemu-aarch64-static is 2.5.0 and it was also occurred
>> on 2.5.1 version.
>>
>> /usr/bin/qemu-aarch64-static --version
>> qemu-aarch64 version 2.5.0 (Debian 1:2.5+dfsg-5ubuntu10.1), Copyright
>> (c) 2003-2008 Fabrice Bellard
>>
>> == Bug report ==
>> kpartx -a -v test.img
>> Unsupported ioctl: cmd=0x4c82
>
> That's QEMU saying we don't support the ioctl, which is
> LOOP_CTL_GET_FREE.
>
>> *** stack smashing detected ***: /usr/sbin/kpartx terminated
>> ======= Backtrace: =========
>> /lib64/libc.so.6(+0x6e334)[0x400091d334]
>> /lib64/libc.so.6(__fortify_fail+0x48)[0x400099dd60]
>> /lib64/libc.so.6(+0xeed14)[0x400099dd14]
>> /usr/sbin/kpartx[0x40385c]
>> /usr/sbin/kpartx(read_gpt_pt+0x40)[0x404710]
>> /usr/sbin/kpartx[0x402794]
>> /lib64/libc.so.6(__libc_start_main+0xe8)[0x40008ce810]
>> /usr/sbin/kpartx[0x403100]
>
> This might be the result of kpartx's error handling
> code not reacting well to the ioctl failing, or it might
> be a different problem.

I got round to testing this with current master myself.
It turns out to be a bug in our handling of the BSGSSZGET
ioctl; we were using the wrong type for it which meant
we would write to more memory than we should have if the
guest was a 64-bit one. I'll send a patch in a moment.

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]