Re: [Qemu-devel] [PATCH] linux-user: SIGSEGV protection on host/guest signal masks

2012-09-25 Thread Alex Barcelo
>> + >> +/* >> + * Use SETSIGNAL and GETSIGNAL macros for SIGSEGV protection. >> + * >> + * This should protect SIGSEGV unconscious manipulations from guest apps >> + * (but we still do not let the emulated software play the signal game) >> + */ >> +#define SETSIGNAL(set) sigdelset( (set), SIGSEGV)

Re: [Qemu-devel] [PATCH] linux-user: SIGSEGV protection on host/guest signal masks

2012-09-24 Thread Peter Maydell
On 24 September 2012 12:23, Alex Barcelo wrote: > > There are some situations where the guest application changes the SIGSEGV and > messes with qemu-user way of handling self-modifying code. > > In case of qemu-system, this happens. Emulation of qemu-system inside > qemu-user doesn't work becaus

Re: [Qemu-devel] [PATCH] linux-user: SIGSEGV protection on host/guest signal masks

2012-09-24 Thread Alex Barcelo
Not related to this patch submission, but maybe interesting: I have been testing qemu-system inside qemu-user, and (once this patch is applied) the combination works and is capable to run a minimal linux (one that I found on qemu site for testing purposes). Awfully slow, and with lots of clock iss

[Qemu-devel] [PATCH] linux-user: SIGSEGV protection on host/guest signal masks

2012-09-24 Thread Alex Barcelo
There are some situations where the guest application changes the SIGSEGV and messes with qemu-user way of handling self-modifying code. In case of qemu-system, this happens. Emulation of qemu-system inside qemu-user doesn't work because of this. This patch doesn't aim to do a complete signal