[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4926C838.8080105@redhat.com>
Date: Fri, 21 Nov 2008 09:39:52 -0500
From: Masami Hiramatsu <mhiramat@...hat.com>
To: Nikanth Karthikesan <knikanth@...e.de>
CC: linux-kernel@...r.kernel.org, ananth@...ibm.com,
davem@...emloft.net, contact@...lice.com, jbarnold@...lice.com,
tabbott@...lice.com, wdaher@...lice.com, andersk@...lice.com
Subject: Re: [RFC] kreplace: Rebootless kernel updates
Hi Nikanth,
Nikanth Karthikesan wrote:
> This RFC patch adds support for limited form of rebootless kernel patching
> even without building the entire kernel.
>
> When looking for a shortcut to avoid the rebuild/reboot cycle when hacking the
> kernel - the ksplice[1] was posted. This patch extends kprobes to do something
> similar, which would require even lesser time to _experiment_ with the running
> kernel.
>
> This small patch extends jprobes so that the jprobe's handler is executed but
> skips executing the actual function. But this has its own limitations such as
> Cannot access symbols not exported for modules (ofcourse hacks like
> pointers[2] can be used.), problems related to return values[3], etc... This
> is currently a x86_64 only _hack_.
Hmm,
Would you like to replace a function to another function?
If so, AFAIK, you can do that with kprobe and below pre_handler.
(see booster enabled path in setup_singlestep())
pre_handler(...)
{
reset_current_kprobe(); /* this kprobe doesn't need any more */
regs->ip = new_function; /* change IP to new function */
preempt_enable_no_resched(); /* recover preempt count */
return 1; /* No need to setup singlestep */
}
Thank you,
--
Masami Hiramatsu
Software Engineer
Hitachi Computer Products (America) Inc.
Software Solutions Division
e-mail: mhiramat@...hat.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