Messages in this thread | | | Date | Wed, 6 Aug 2008 17:51:15 +0530 | From | "Abhishek Sagar" <> | Subject | Re: [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
| |