[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150116174811.GA7817@home.goodmis.org>
Date: Fri, 16 Jan 2015 12:48:11 -0500
From: Steven Rostedt <rostedt@...dmis.org>
To: Wang Nan <wangnan0@...wei.com>
Cc: linux@....linux.org.uk, mingo@...hat.com, x86@...nel.org,
masami.hiramatsu.pt@...achi.com, anil.s.keshavamurthy@...el.com,
davem@...emloft.net, ananth@...ibm.com, dave.long@...aro.org,
tixy@...aro.org, lizefan@...wei.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 00/11] Early kprobe: enable kprobes at very early
On Wed, Jan 07, 2015 at 03:34:46PM +0800, Wang Nan wrote:
>
> Patch 10 enables cmdline option 'ekprobe=', allows setup probe at
> cmdline. However, currently the kprobe handler is only a simple printk.
>
> Patch 11 introduces required Kconfig options to actually enable early
> kprobes.
>
> Usage of early kprobe is as follow:
>
> Booting kernel with cmdline 'ekprobe=', like:
>
> ... rdinit=/sbin/init ekprobe=0xc00f3c2c ekprobe=__free_pages ...
Perhaps you should specify what the probe will do. For now it is only printk.
For example:
ekprobe=printk,__free_pages
That is, here you are attaching a printk to __free_pages.
Later, when you implement tracing, you could have:
ekprobe=trace,__free_pages
where it will be sent to the ring buffer.
This will maintain backward compatibility when you add new features. Instead
of getting something like printk working now, and people use it for such,
and then when you switch it over to tracing, it breaks the printk version.
Also, if you plan on converting early kprobes to normal kprobes during boot,
then it should just be kprobes=..., why add the 'e'. It being early is just
an implementation detail, not something that should be expressed by the users
of the facility.
-- Steve
>
> During boot, kernel will print trace using printk:
>
> ...
> Hit early kprobe at __alloc_pages_nodemask+0x4
> Hit early kprobe at __free_pages+0x0
> Hit early kprobe at __alloc_pages_nodemask+0x4
> Hit early kprobe at __free_pages+0x0
> Hit early kprobe at __free_pages+0x0
> Hit early kprobe at __alloc_pages_nodemask+0x4
> ...
--
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