From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:51478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzGE9-0006ya-6F for qemu-devel@nongnu.org; Thu, 28 Feb 2019 02:35:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzGE8-00008M-3c for qemu-devel@nongnu.org; Thu, 28 Feb 2019 02:35:33 -0500 Received: from mail-oln040092072075.outbound.protection.outlook.com ([40.92.72.75]:21570 helo=EUR03-VE1-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gzGE7-0008Sw-IZ for qemu-devel@nongnu.org; Thu, 28 Feb 2019 02:35:32 -0500 From: =?iso-8859-1?Q?Fernando_Casas_Sch=F6ssow?= Date: Thu, 28 Feb 2019 07:35:23 +0000 Message-ID: References: <28e6b4ed-9afd-3a79-6267-86c7385c23ce@redhat.com> <20190223124940.48ff504b@ncopa-desktop.copa.dup.pw> <63bf2219-08ee-1741-49d6-856fca0e8d2c@redhat.com> In-Reply-To: <63bf2219-08ee-1741-49d6-856fca0e8d2c@redhat.com> Content-Language: en-US MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] [Qemu-block] Guest unresponsive after Virtqueue size exceeded error List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Natanael Copa , Stefan Hajnoczi , Richard Henderson , qemu-devel Just wanted to share a small update on the situation after updating QEMU to= the new Alpine package patched with Natanael's patch. So far so good, moreover I switched a few other guests from SATA to VirtIO = SCSI and after two days no issues. Unless I find any problem I will report back with an update in a week from = now. Thanks everyone for all you did to help find a solution to this issue. On mar, feb 26, 2019 at 2:30 PM, Paolo Bonzini wrote: On 23/02/19 12:49, Natanael Copa wrote: I suspect this happens due to the Alpine toolchain will enable _FORTIFY_SOU= RCE=3D2 by default and the way this is implemented via fortify-headers: htt= p://git.2f30.org/fortify-headers/file/include/string.h.html#l39 The call to __orig_memcpy is the culprit there, is there any reason not to = do something like _FORTIFY_FN(memcpy) void *__memcpy_chk(void *__od, const = void *__os, size_t __n) { size_t __bd =3D __builtin_object_size(__od, 0); s= ize_t __bs =3D __builtin_object_size(__os, 0); char *__d =3D (char *)__od; = const char *__s =3D (const char *)__os; /* trap if pointers are overlapping= but not if dst =3D=3D src. * gcc seems to like to generate code that relie= s on dst =3D=3D src */ if ((__d < __s && __d + __n > __s) || (__s < __d && = __s + __n > __d)) __builtin_trap(); if (__n > __bd || __n > __bs) __builtin= _trap(); return memcpy(__od, __os, __n); } #define memcpy __memcpy_chk ? Th= at is, getting rid of _FORTIFY_ORIG altogether. Paolo