LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Gustavo Bueno Romero" <gromero@br.ibm.com>
To: Breno Leitao <brenohl@br.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: Different SIGSEGV codes (x86 and ppc64le)
Date: Tue, 19 Jan 2016 18:10:47 -0300	[thread overview]
Message-ID: <201601192111.u0JL8fng016210@mx0a-001b2d01.pphosted.com> (raw)
In-Reply-To: <569EA155.5070602@br.ibm.com>

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

Breno,

Just to complement what you said, the si->si_code value you get on Power
with the code you provided (SEGV_ACCERR 2) comes
from .../arch/powerpc/mm/fault.c, line 375: https://goo.gl/6K40Bv

Hence, changing that line to 'code = SEGV_MAPERR;' makes your code die with
SIGSEGV Code ID 1, not 2:

:~/stack$ uname -a
Linux gromero12 4.4.0 #3 SMP Tue Jan 19 15:46:14 EST 2016 ppc64le ppc64le
ppc64le GNU/Linux
:~/stack$ ./overflow
Got SIGSEGV(1) at address: 0x3fffcecefff0
Segmentation fault


Regards,
--
Gustavo Romero

[-- Attachment #2: Type: text/html, Size: 644 bytes --]

  reply	other threads:[~2016-01-19 21:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 20:49 Different SIGSEGV codes (x86 and ppc64le) Breno Leitao
2016-01-19 21:10 ` Gustavo Bueno Romero [this message]
2016-01-20  5:34 ` Michael Ellerman
2016-01-20 18:21   ` Linus Torvalds

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=201601192111.u0JL8fng016210@mx0a-001b2d01.pphosted.com \
    --to=gromero@br.ibm.com \
    --cc=brenohl@br.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