Re: [Qemu-devel] [RESEND PATCH] target-arm/abi32: check for segfault in do_kernel_trap

2017-01-06 Thread Peter Maydell
On 6 January 2017 at 14:35, Seraphime Kirkovski wrote: > In terms of implementation, I find it would be better to extract the > __kernel_cmpxchg code in a separate function. On the one hand, this > would avoid code duplication or strange gotos and make do_kernel_trap > more readable. On the other

Re: [Qemu-devel] [RESEND PATCH] target-arm/abi32: check for segfault in do_kernel_trap

2017-01-06 Thread Seraphime Kirkovski
,qemu-arm Bcc: Subject: Re: [Qemu-devel] [RESEND PATCH] target-arm/abi32: check for segfault in do_kernel_trap Reply-To: In-Reply-To: Hi Peter, thanks for the feedback. On Thu, Jan 05, 2017 at 02:42:38PM +, Peter Maydell wrote: > If you compare what happens with this segv code w

Re: [Qemu-devel] [RESEND PATCH] target-arm/abi32: check for segfault in do_kernel_trap

2017-01-05 Thread Peter Maydell
On 2 January 2017 at 12:44, Seraphime Kirkovski wrote: > Currently, the cmpxchg implementation tests whether the destination address > is readable: > - if it is, we read the value and continue with the comparison > - if isn't, i.e. access to addr would segfault, we assume that src != dest >

[Qemu-devel] [RESEND PATCH] target-arm/abi32: check for segfault in do_kernel_trap

2017-01-02 Thread Seraphime Kirkovski
Currently, the cmpxchg implementation tests whether the destination address is readable: - if it is, we read the value and continue with the comparison - if isn't, i.e. access to addr would segfault, we assume that src != dest rather than queuing a SIGSEGV. The same problem exists in the c