[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu
From: |
Blue Swirl |
Subject: |
Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort() |
Date: |
Wed, 17 Mar 2010 21:50:57 +0200 |
On 3/17/10, Paolo Bonzini <address@hidden> wrote:
> On 03/16/2010 06:55 PM, Jamie Lokier wrote:
>
> > A guest program is also allowed to trap SIGABRT with a signal handler,
> > and that does have some uses. E.g. cleaning up temporary files and
> > shmem segments following a crash when calling 3rd party code.
> >
> > Whatever the guest does with SIGABRT, it should not result in_QEMU_
> > crashing - whether due to abort() returning, or QEMU's control flow
> > jumping to the guest's signal handler from an unexpected location.
> >
>
> That's very hard to ensure however if QEMU was already in unstable state,
> as witnessed by its call to abort(). Things can only go downhill.
>
> Maybe there should be a qemu_abort wrapper (and a QEMU_ASSERT companion)
> that does simply abort/assert under system emulation, but under user-mode
> emulation does
>
> signal (SIGABRT, SIG_DFL);
> abort ();
Fine, we cover this obscure corner case. But what if in addition to
this, the user process forked and the other process ptraced the QEMU
process, and when QEMU attempts to install the default signal handler,
the call is instead diverted to somewhere else with ptrace?
- [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), (continued)
- [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Paolo Bonzini, 2010/03/15
- [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Blue Swirl, 2010/03/15
- [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Paolo Bonzini, 2010/03/15
- [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Blue Swirl, 2010/03/15
- [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Markus Armbruster, 2010/03/15
- Re: [Qemu-devel] [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Markus Armbruster, 2010/03/15
- [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Paolo Bonzini, 2010/03/16
- Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Markus Armbruster, 2010/03/16
- Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Jamie Lokier, 2010/03/16
- Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Paolo Bonzini, 2010/03/17
- Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(),
Blue Swirl <=
- Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Jamie Lokier, 2010/03/18
- Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Blue Swirl, 2010/03/19
- Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Markus Armbruster, 2010/03/18
- Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Jamie Lokier, 2010/03/16
- Re: [Qemu-devel] Re: [PATCH, RFC] Replace assert(0) with abort() or cpu_abort(), Markus Armbruster, 2010/03/16