All of lore.kernel.org
 help / color / mirror / Atom feed
From: Prasanna S Panchamukhi <prasanna@in.ibm.com>
To: Stas Sergeev <stsp@aknet.ru>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: [patch] kprobes: dont steal interrupts from vm86
Date: Tue, 7 Dec 2004 11:23:48 +0530	[thread overview]
Message-ID: <20041207055348.GA1305@in.ibm.com> (raw)
In-Reply-To: <41B1FD4B.9000208@aknet.ru>

Hi Stas,

> I've found yet another bug in this
> very same piece of code. Now I can
> reproduce the interrupt theft without
> using either vm86() or modify_ldt().

The patch below should fix this problem. Please
let me know if you any issues.

Regards
Prasanna



Stas repoted that kprobes steals int3 exceptions when not in 
virtual-8086 mode. This patch fixes the problem by returning 0,
if the int3 exceptions does not belong to kprobes.

Signed-off-by: Prasanna S Panchamukhi <prasanna@in.ibm.com>


---

 linux-2.6.10-rc3-prasanna/arch/i386/kernel/kprobes.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff -puN arch/i386/kernel/kprobes.c~kprobes-steals-int3 arch/i386/kernel/kprobes.c
--- linux-2.6.10-rc3/arch/i386/kernel/kprobes.c~kprobes-steals-int3	2004-12-07 11:20:33.000000000 +0530
+++ linux-2.6.10-rc3-prasanna/arch/i386/kernel/kprobes.c	2004-12-07 11:20:34.000000000 +0530
@@ -127,10 +127,10 @@ static inline int kprobe_handler(struct 
 			 * The breakpoint instruction was removed right
 			 * after we hit it.  Another cpu has removed
 			 * either a probepoint or a debugger breakpoint
-			 * at this address.  In either case, no further
-			 * handling of this interrupt is appropriate.
+			 * at this address. In either case, kprobes
+			 * need not handle it.
 			 */
-			ret = 1;
+			ret = 0;
 		}
 		/* Not one of ours: let kernel handle it */
 		goto no_kprobe;

_
-- 

Prasanna S Panchamukhi
Linux Technology Center
India Software Labs, IBM Bangalore
Ph: 91-80-25044636
<prasanna@in.ibm.com>

  reply	other threads:[~2004-12-07  5:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20041109130407.6d7faf10.akpm@osdl.org>
2004-11-10 10:49 ` [patch] kprobes: dont steal interrupts from vm86 Prasanna S Panchamukhi
2004-11-10 18:53   ` Stas Sergeev
2004-11-17 13:15     ` Prasanna S Panchamukhi
2004-11-18 14:55       ` Stas Sergeev
2004-12-02 19:28       ` Stas Sergeev
2004-12-06 15:28         ` Prasanna S Panchamukhi
2004-12-04 18:09       ` Stas Sergeev
2004-12-07  5:53         ` Prasanna S Panchamukhi [this message]
2004-12-07 18:44           ` Stas Sergeev
2004-12-09 12:47             ` Prasanna S Panchamukhi
2004-12-09 19:28               ` Stas Sergeev
2005-01-07 11:37                 ` Prasanna S Panchamukhi
2005-01-07 12:59                   ` Andi Kleen
2005-01-13  8:10                     ` Prasanna S Panchamukhi
2005-01-07 22:44                   ` Stas Sergeev
2004-11-09 19:01 Stas Sergeev

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=20041207055348.GA1305@in.ibm.com \
    --to=prasanna@in.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stsp@aknet.ru \
    /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.