From: David Mosberger <davidm@napali.hpl.hp.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] fix for siginfo.si_addr on NaT page triggered SIGSEGV
Date: Thu, 06 Mar 2003 21:26:35 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590709805988@msgid-missing> (raw)
The patch below fixes a bug which caused si_addr to be set to the
faulting IP instead of the faulting data address when a SIGSEGV got
triggered by the NaT page. The patch is relative to 2.5, but I
believe it applies on 2.4 as well.
--david
=== arch/ia64/kernel/traps.c 1.25 vs edited ==--- 1.25/arch/ia64/kernel/traps.c Tue Feb 4 17:06:16 2003
+++ edited/arch/ia64/kernel/traps.c Thu Mar 6 11:44:58 2003
@@ -486,19 +486,23 @@
case 26: /* NaT Consumption */
if (user_mode(regs)) {
+ void *addr;
+
if (((isr >> 4) & 0xf) = 2) {
/* NaT page consumption */
sig = SIGSEGV;
code = SEGV_ACCERR;
+ addr = (void *) ifa;
} else {
/* register NaT consumption */
sig = SIGILL;
code = ILL_ILLOPN;
+ addr = (void *) (regs->cr_iip + ia64_psr(regs)->ri);
}
siginfo.si_signo = sig;
siginfo.si_code = code;
siginfo.si_errno = 0;
- siginfo.si_addr = (void *) (regs->cr_iip + ia64_psr(regs)->ri);
+ siginfo.si_addr = addr;
siginfo.si_imm = vector;
siginfo.si_flags = __ISR_VALID;
siginfo.si_isr = isr;
reply other threads:[~2003-03-06 21:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=marc-linux-ia64-105590709805988@msgid-missing \
--to=davidm@napali.hpl.hp.com \
--cc=linux-ia64@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.