qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] ppc: Fix catching some segfaults in user mode


From: David Gibson
Subject: Re: [Qemu-devel] [PATCH] ppc: Fix catching some segfaults in user mode
Date: Thu, 4 Aug 2016 12:03:40 +1000
User-agent: Mutt/1.6.2 (2016-07-01)

On Wed, Aug 03, 2016 at 05:55:23PM +1000, Benjamin Herrenschmidt wrote:
> The usermode "translate" code generates an error code value that
> has the "is_write" bit set, which causes our switch/case to miss
> and display "Invalid segfault errno" and a spurrious second state
> dump. Fix it.
> 
> Signed-off-by: Benjamin Herrenschmidt <address@hidden>

Applied to ppc-for-2.8, thanks.

> ---
>  linux-user/main.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/linux-user/main.c b/linux-user/main.c
> index 24f34e6..eb9975c 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -1656,6 +1656,7 @@ void cpu_loop(CPUPPCState *env)
>              /* XXX: check this. Seems bugged */
>              switch (env->error_code & 0xFF000000) {
>              case 0x40000000:
> +            case 0x42000000:
>                  info.si_signo = TARGET_SIGSEGV;
>                  info.si_errno = 0;
>                  info.si_code = TARGET_SEGV_MAPERR;
> 

-- 
David Gibson                    | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au  | minimalist, thank you.  NOT _the_ _other_
                                | _way_ _around_!
http://www.ozlabs.org/~dgibson

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]