qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: David Gibson <david@gibson.dropbear.id.au>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org,
	Anton Blanchard <anton@au1.ibm.com>
Subject: Re: [Qemu-devel] [PATCH] ppc: Fix catching some segfaults in user mode
Date: Thu, 4 Aug 2016 12:03:40 +1000	[thread overview]
Message-ID: <20160804020340.GC9189@voom.fritz.box> (raw)
In-Reply-To: <1470210923.12584.67.camel@kernel.crashing.org>

[-- Attachment #1: Type: text/plain, Size: 1196 bytes --]

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 <benh@kernel.crashing.org>

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

      reply	other threads:[~2016-08-04  3:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  7:55 [Qemu-devel] [PATCH] ppc: Fix catching some segfaults in user mode Benjamin Herrenschmidt
2016-08-04  2:03 ` David Gibson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160804020340.GC9189@voom.fritz.box \
    --to=david@gibson.dropbear.id.au \
    --cc=anton@au1.ibm.com \
    --cc=benh@kernel.crashing.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).