Re: [for-next][PATCH 12/16] kprobes: Initialize kprobes at postcore_initcall
From: Masami Hiramatsu
Date: Tue Jul 09 2019 - 08:51:31 EST
On Wed, 3 Jul 2019 10:25:04 -0400
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> On Wed, 3 Jul 2019 10:24:02 -0400
> Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
>
> > On Wed, 3 Jul 2019 15:08:32 +0100
> > Catalin Marinas <catalin.marinas@xxxxxxx> wrote:
> >
> >
> > > > +static int __init run_init_test_probes(void)
> > > > +{
> > > > + if (run_kprobe_tests)
> > > > + init_test_probes();
> > >
> > > A return 0 here.
> >
> > Will update (would have triggered a failure on my test suite anyway ;-)
> >
> > >
> > > > +}
> > > > +module_init(run_init_test_probes);
> > >
> > > This does the trick. I prefer your fix as it leaves the arch code
> > > unchanged. In case you need it:
> > >
> > > Tested-by: Catalin Marinas <catalin.marinas@xxxxxxx>
> > >
> >
>
> Masami,
>
> If you give me an Acked-by, I'll add it to my tree.
Sorry for late reply, but I want to keep the test running right after
initialization as the first user of kprobes at that timing, since
other user can start using kprobes right after init_kprobes().
So this issue must be fixed in moving the init_kprobes() itself
right after arch_initcall() (and that is subsys_initcall)
Catalin, Mark, could you ensure the below patch can fix your issue?
https://lore.kernel.org/lkml/20190625191545.245259106@xxxxxxxxxxx/
And if so, Steve, could you push above one (which seems already in your
tree) to next as a fix?
Thank you,
--
Masami Hiramatsu <mhiramat@xxxxxxxxxx>