From: none <ytrezq@sdf-eu.org>
To: Richard Weinberger <richard.weinberger@gmail.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
linux-x86_64@vger.kernel.org
Subject: Re: Getting the way a SIGSEGV append when catching a SIGSEGV from within
Date: Mon, 27 Mar 2017 20:55:00 +0200 [thread overview]
Message-ID: <e5e4ccc4b652ca65a9a02288060c46b9@mx.sdfeu.org> (raw)
In-Reply-To: <CAFLxGvzC_63RkxgTNnG8g2Hw5CUW7SVLuUMuE7_13Dw1bqHUUA@mail.gmail.com>
Le 2017-03-27 17:30, Richard Weinberger a écrit :
> On Mon, Mar 27, 2017 at 4:45 PM, none <ytrezq@sdf-eu.org> wrote:
>> Hello,
>>
>> There’s three way to perform an invalid memory access :
>>
>> The attempt to execute/jump at an invalid address.
>> The attempt to read at an invalid address.
>> The attempt to write at an invalid address.
>>
>> Determining the execute case with rt_sigaction is easy : the last
>> value of
>> eip match the value of the address which caused the segfault.
>>
>> But how to know if the SIGSEGV occurred by a read or by a write
>> attempt ? In
>> the same time shouldn’t that information belong in the mmu ?
>
> Did you look at the machine specific context of SIGSEGV?
> It will give you access to the error code and the trap number.
Sorry but so, in the case of x86_64, which is the struct member I need
to look at ?
next prev parent reply other threads:[~2017-03-27 18:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-27 14:45 none
2017-03-27 15:30 ` Richard Weinberger
2017-03-27 18:55 ` none [this message]
2017-03-27 19:20 ` Richard Weinberger
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=e5e4ccc4b652ca65a9a02288060c46b9@mx.sdfeu.org \
--to=ytrezq@sdf-eu.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-x86_64@vger.kernel.org \
--cc=richard.weinberger@gmail.com \
/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
all inboxes | Powered by JetHome®