From: Sadasivan Shaiju <sshaiju@mvista.com>
To: linux-rt-users@vger.kernel.org
Cc: shaiju_sada@yahoo.com
Subject: PATCH[2.6.32] kgdb patch
Date: Mon, 11 Aug 2014 14:33:59 -0700 [thread overview]
Message-ID: <fe0d3c9469ec5339a06a472ddc418ba8@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 1052 bytes --]
Hi,
I work for Montavista (Cavium Inc) as a Technical Lead . I want to
push some of the kernel patches to rt community (2.6.32 kernel 2.6.33
rt patch) , so that It will go to the main line These patches are
reviewed and approved by our system Architect. I request you to
include in the main line . These issues were reported by our
customer CISCO.
Problem Description:
If kprobes is enabled along with kgdb, kgdb gives a SIGHUP on the
host side.
Root Cause:
Inside the do_page_fault() (arch/mips/mm/fault.c) there is a call to
notify_die() when kprobes is enabled.
When kgdb is enabled the register_die_notifier() handler catches this
exception
(which is 3 - TLB miss on store) and says it does not know it and returns
it as
a SIGHUP.
How Solved:
Made kgdb ignore this particular die notification (cmd == DIE_PAGE_FAULT)
in its
handler.
I request you to include the above patch in to the main line kernel . If
any questions please contact me at sshaiju@mvista.com
(shaiju_sada@yahoo.com)
Regards,
Shaiju.
[-- Attachment #2: 4995-kgdb-Ignore-DIE_PAGE_FAULT-event-in-notify-handler.patch --]
[-- Type: application/octet-stream, Size: 1256 bytes --]
From 056caa9991512704cb39f65828e1ffea47830c6c Mon Sep 17 00:00:00 2001
From: sadasivan shaiju <shaiju@localhost.localdomain>
Date: Wed, 27 Jul 2011 14:54:39 -0700
Subject: [PATCH] kgdb: Ignore DIE_PAGE_FAULT event in notify handler
Source: MontaVista Software, LLC
MR: 45280
Type: Defect Fix
Disposition: Needs submitting to kernel.org
ChangeID: 5bec09f7ec0a4775169f5cba16976bc3a6b45598
Description:
Ignore notify_die() from do_pagefault(), in kgdb's register_die_notifier()
handler
Signed-off-by: Sadasivan <sshaiju@mvista.com>
Signed-off-by: Dale Farnsworth <dfarnsworth@mvista.com>
---
arch/mips/kernel/kgdb.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/arch/mips/kernel/kgdb.c b/arch/mips/kernel/kgdb.c
index 50c9bb8..3e4ae31 100644
--- a/arch/mips/kernel/kgdb.c
+++ b/arch/mips/kernel/kgdb.c
@@ -191,6 +191,11 @@ static int kgdb_mips_notify(struct notifier_block *self, unsigned long cmd,
struct pt_regs *regs = args->regs;
int trap = (regs->cp0_cause & 0x7c) >> 2;
+ /* ignore the notify_die() from do_page_fault(), which is meant for kprobes */
+
+ if(cmd == DIE_PAGE_FAULT)
+ return NOTIFY_DONE;
+
/* Userpace events, ignore. */
if (user_mode(regs))
return NOTIFY_DONE;
--
1.7.0.1
reply other threads:[~2014-08-11 21:34 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=fe0d3c9469ec5339a06a472ddc418ba8@mail.gmail.com \
--to=sshaiju@mvista.com \
--cc=linux-rt-users@vger.kernel.org \
--cc=shaiju_sada@yahoo.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;
as well as URLs for NNTP newsgroup(s).