linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Gustavo Romero <gromero@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [RFC] Fix si->si_code for guard page access on PowerPC
Date: Wed, 24 Feb 2016 20:39:23 +1100 (AEDT)	[thread overview]
Message-ID: <20160224093923.EC10314090A@ozlabs.org> (raw)
In-Reply-To: <56A25783.7040502@linux.vnet.ibm.com>

Hi Gustavo,

On Fri, 2016-22-01 at 16:23:31 UTC, Gustavo Romero wrote:
> Fix si->si_code for guard page access on PowerPC
> 
...
> 
> diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
> index a67c6d7..6954971 100644
> --- a/arch/powerpc/mm/fault.c
> +++ b/arch/powerpc/mm/fault.c
> @@ -431,8 +431,10 @@ good_area:
>             */
>            fault = handle_mm_fault(mm, vma, address, flags);
>            if (unlikely(fault & (VM_FAULT_RETRY|VM_FAULT_ERROR))) {
> -                  if (fault & VM_FAULT_SIGSEGV)
> +                  if (fault & VM_FAULT_SIGSEGV) {
> +                           code = SEGV_MAPERR;
>                              goto bad_area;
> +                  }
>                     rc = mm_fault_error(regs, address, fault);
>                     if (rc >= MM_FAULT_RETURN)
>                              goto bail;


As we discussed on IRC, I'd prefer if this case was handled in
mm_fault_error(). So please send a v2 which does that, or let us know if you
have problems.

cheers

      reply	other threads:[~2016-02-24  9:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-22 16:23 [RFC] Fix si->si_code for guard page access on PowerPC Gustavo Romero
2016-02-24  9:39 ` Michael Ellerman [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=20160224093923.EC10314090A@ozlabs.org \
    --to=mpe@ellerman.id.au \
    --cc=gromero@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.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).