lkml.org 
[lkml]   [2008]   [Aug]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2.6.27-rc1-git5 2/26] mdb: correct kprobes int3 trap
On Tue, Aug 5, 2008 at 11:56 AM,  <jmerkey@wolfmountaingroup.com> wrote:
> @@ -850,6 +871,10 @@
> #ifdef CONFIG_KPROBES
> void __kprobes do_int3(struct pt_regs *regs, long error_code)
> {
> +#ifdef CONFIG_MDB
> + if (mdb(BREAKPOINT_EXCEPTION, error_code, regs))
> + return;
> +#endif // CONFIG_MDB
> trace_hardirqs_fixup();
>
> if (notify_die(DIE_INT3, "int3", regs, error_code, 3, SIGTRAP)
> @@ -865,6 +890,16 @@
> }
> #endif

If the mdb() call modifies the IF flag in regs, then it should
probably be called after trace_hardirqs_fixup. Best to keep it behind
notify_die() ensuring that kprobes handles all breakpoints first.
Otherwise at least the mdb function (and others in its call chain)
should be marked as __kprobes.

-- Abhishek Sagar


\
 
 \ /
  Last update: 2008-08-06 14:25    [W:0.142 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site