From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N0fJC-00036D-Jq for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:49:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N0fJ8-00034e-S4 for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:49:14 -0400 Received: from [199.232.76.173] (port=54283 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N0fJ8-00034C-4q for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:49:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53748) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N0fJ6-0001eU-Iq for qemu-devel@nongnu.org; Wed, 21 Oct 2009 13:49:09 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id n9LHn5eq010273 for ; Wed, 21 Oct 2009 13:49:05 -0400 Date: Wed, 21 Oct 2009 19:46:51 +0200 From: "Michael S. Tsirkin" Message-ID: <20091021174651.GA25166@redhat.com> References: <20091008203740.GA20727@redhat.com> <1256063981.27918.6.camel@blaa> <4ADE0809.2050500@redhat.com> <20091021154234.GA24913@redhat.com> <4ADF44D6.5040207@redhat.com> <20091021173516.GA25112@redhat.com> <4ADF486E.9080807@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4ADF486E.9080807@redhat.com> Subject: [Qemu-devel] Re: [PATCH] qemu: work around for "posix-aio-compat" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Mark McLoughlin , qemu-devel@nongnu.org On Wed, Oct 21, 2009 at 07:44:14PM +0200, Paolo Bonzini wrote: > >>> I suggest trying to make the sigset_t static, since that generates >>> exactly the same code as the "nohang" case, and exactly the same stack >>> layout as the "hang" case. > > (In case this wasn't clear: the sigfillset of a static sigset_t should > hang, proving that it's stack layout that comes to the rescue). > >>> The next obvious step would be placing a >>> watchpoint somewhere. >> >> Yes, but where? > > At every word of the sigset (using gdb commands to disable/enable the > watchpoints around the sigfillset, you avoid spurious triggers). Not sure how do you mean. When would I enable the watchpoint? > One of > those words will be overwritten if an overrun would have smashed the > stack. If it does not fire, s/sigfillset/sigemptyset/ in case it was > writing 0xffffffff. If it still does not fire, dunno. :-( > > Paolo