Re: [RFC v3 13/13] kprobes: port blacklist kprobes to linker table
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
- Subject: Re: [RFC v3 13/13] kprobes: port blacklist kprobes to linker table
- From: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>
- Date: Thu, 28 Jul 2016 01:00:01 +0200
- Cc: "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx>, hpa@xxxxxxxxx, tglx@xxxxxxxxxxxxx, mingo@xxxxxxxxxx, bp@xxxxxxxxx, linux@xxxxxxxxxxxxxxxx, masami.hiramatsu.pt@xxxxxxxxxxx, jbaron@xxxxxxxxxx, heiko.carstens@xxxxxxxxxx, ananth@xxxxxxxxxxxxxxxxxx, anil.s.keshavamurthy@xxxxxxxxx, davem@xxxxxxxxxxxxx, realmz6@xxxxxxxxx, x86@xxxxxxxxxx, luto@xxxxxxxxxxxxxx, keescook@xxxxxxxxxxxx, torvalds@xxxxxxxxxxxxxxxxxxxx, gregkh@xxxxxxxxxxxxxxxxxxx, rusty@xxxxxxxxxxxxxxx, gnomes@xxxxxxxxxxxxxxxxxxx, alan@xxxxxxxxxxxxxxx, dwmw2@xxxxxxxxxxxxx, arnd@xxxxxxxx, ming.lei@xxxxxxxxxxxxx, linux-arch@xxxxxxxxxxxxxxx, benh@xxxxxxxxxxxxxxxxxxx, ananth@xxxxxxxxxx, pebolle@xxxxxxxxxx, fontana@xxxxxxxxxxxxxxx, ciaran.farrell@xxxxxxxx, christopher.denicolo@xxxxxxxx, david.vrabel@xxxxxxxxxx, konrad.wilk@xxxxxxxxxx, mcb30@xxxxxxxx, jgross@xxxxxxxx, andrew.cooper3@xxxxxxxxxx, andriy.shevchenko@xxxxxxxxxxxxxxx, paul.gortmaker@xxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxx, ak@xxxxxxxxxxxxxxx, pali.rohar@xxxxxxxxx, dvhart@xxxxxxxxxxxxx, platform-driver-x86@xxxxxxxxxxxxxxx, mmarek@xxxxxxxx, linux@xxxxxxxxxxxxxxxxxx, jkosina@xxxxxxx, korea.drzix@xxxxxxxxx, linux-kbuild@xxxxxxxxxxxxxxx, tony.luck@xxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, sparclinux@xxxxxxxxxxxxxxx, catalin.marinas@xxxxxxx, will.deacon@xxxxxxx, rostedt@xxxxxxxxxxx, jpoimboe@xxxxxxxxxx
- In-reply-to: <20160726002722.5011993d23c2bfeff7a14dee@kernel.org>
- List-id: <linux-ia64.vger.kernel.org>
- References: <1469222687-1600-1-git-send-email-mcgrof@kernel.org> <1469222687-1600-14-git-send-email-mcgrof@kernel.org> <20160726002722.5011993d23c2bfeff7a14dee@kernel.org>
- User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Jul 26, 2016 at 12:27:22AM +0900, Masami Hiramatsu wrote:
> On Fri, 22 Jul 2016 14:24:47 -0700
> "Luis R. Rodriguez" <mcgrof@xxxxxxxxxx> wrote:
>
> > kprobe makes use of two sections, the one dealing with the actual
> > kprobes was recently ported using the standard section range API.
> > The blacklist functionality of kprobes is still using a custom
> > section and declaring its custom section using the linker script
> > as follows:
> >
> > type Linux-section custom section name begin end
> > table .init.data _kprobe_blacklist __start_kprobe_blacklist __stop_kprobe_blacklist
> >
> > This ports the _kprobe_blacklist custom section to the standard
> > Linux linker table API allowing us remove all the custom blacklist
> > kprobe section declarations from the linker script.
> >
> > This has been tested by trying to register a kprobe on a blacklisted
> > symbol (these are declared with NOKPROBE_SYMBOL()), and confirms that
> > this fails to work as expected. This was tested with:
>
> This is OK for me, and if you would like to make sure, please use ftrace to probe
> (easier than making new module) and compare debugfs/blacklist which shows
> all blacklisted functions, so if all the function names are same it
> must be OK :).
Ah I see, sure thanks for the tip! I was actually hoping to write a unit
test that automates this testing, but that can be done and submitted later,
the approach you suggest should make writing a unit easier as well.
> Acked-by: Masami Hiramatsu <mhiramat@xxxxxxxxxx>
Great, thanks,
Luis
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]