[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <534CED5B.2090100@hitachi.com>
Date: Tue, 15 Apr 2014 17:27:07 +0900
From: Masami Hiramatsu <masami.hiramatsu.pt@...achi.com>
To: Zhan Jianyu <nasa4836@...il.com>
Cc: ananth@...ibm.com, anil.s.keshavamurthy@...el.com,
davem@...emloft.net, rdunlap@...radead.org,
linux-doc@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
"yrl.pp-manager.tt@...achi.com" <yrl.pp-manager.tt@...achi.com>
Subject: Re: [PATCH] kprobes: be more permissive when user specifies both
symbol name and address
(2014/04/15 17:11), Zhan Jianyu wrote:
> On Mon, Apr 14, 2014 at 11:00 PM, Masami Hiramatsu
> <masami.hiramatsu.pt@...achi.com> wrote:
>> if (p->addr) {
>> if (p->symbol) {
>> sym = kallsyms_lookup(p->addr, ... &offs ...);
>> if (strcmp(sym,p->symbol) != 0 || offs != p->offset) {
>> pr_warning("Error! ...");
>> goto fail;
>> }
>> }
>> } else if (p->symbol) {
>> kprobe_lookup_name(p->symbol_name, addr);
>> if (!addr)
>> goto fail;
>> } else
>> goto fail;
>
>
> Hmm, let's clasify all conditions.
>
> 1. Only symbol, check it, if not found, fail.
> 2. Only address, check it, if not found, fail.
> 3. Both, check address,
> 3.1 not found, fail, because some symbols might have muplitple instances,
> we don't bother to check symbol name.
> 3.2 found, check if symbol mismatch, if yes, fail.
Plus, if the p->offset and offs are different, fail too.
> Is this reasonable? Next mail is a renewed patch following this priciple.
OK, let me see. :)
Thank you,
--
Masami HIRAMATSU
Software Platform Research Dept. Linux Technology Center
Hitachi, Ltd., Yokohama Research Laboratory
E-mail: masami.hiramatsu.pt@...achi.com
--
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