[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130302180939.GA32596@redhat.com>
Date: Sat, 2 Mar 2013 19:09:39 +0100
From: Oleg Nesterov <oleg@...hat.com>
To: Anton Arapov <anton@...hat.com>
Cc: Srikar Dronamraju <srikar@...ux.vnet.ibm.com>,
LKML <linux-kernel@...r.kernel.org>,
Josh Stone <jistone@...hat.com>,
Frank Eigler <fche@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Ananth N Mavinakayanahalli <ananth@...ibm.com>
Subject: Re: [RFC PATCH v3 5/6] uretprobes: invoke return probe handlers
On 02/28, Anton Arapov wrote:
>
> @@ -1576,8 +1622,8 @@ static void handle_swbp(struct pt_regs *regs)
>
> if (!uprobe) {
> if (is_swbp > 0) {
> - /* No matching uprobe; signal SIGTRAP. */
> - send_sig(SIGTRAP, current, 0);
> + /* No matching uprobe; Try with uretprobe */
> + handle_uretprobe(regs);
Hmm. at least this looks certainly wrong.
You shifted send_sig(SIGSEGV) into handle_uretprobe(), but if nothing
else printk(KERN_ERR "uprobe: no instance found!") doesn't look nice
if we hit the regular breakoint.
In fact everything handle_uretprobe() does in this case looks wrong.
Including the fact that get_xol_area/get_utask can fail. And unwinding
looks bogus...
I think you need
if (bp_vaddr == rp_trampoline_vaddr)
handle_uretprobe()
like the previous version did.
Oleg.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists