mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nikanth K" <nikanth@gmail.com>
To: "Masami Hiramatsu" <mhiramat@redhat.com>
Cc: "Nikanth Karthikesan" <knikanth@suse.de>,
	linux-kernel@vger.kernel.org, ananth@in.ibm.com,
	davem@davemloft.net, contact@ksplice.com, jbarnold@ksplice.com,
	tabbott@ksplice.com, wdaher@ksplice.com, andersk@ksplice.com
Subject: Re: [RFC] kreplace: Rebootless kernel updates
Date: Wed, 26 Nov 2008 08:18:02 +0530	[thread overview]
Message-ID: <807b3a220811251848w384298dp393691173e603fc2@mail.gmail.com> (raw)
In-Reply-To: <492AC522.4020202@redhat.com>

Hi Masami

On Mon, Nov 24, 2008 at 8:45 PM, Masami Hiramatsu <mhiramat@redhat.com> wrote:
> Nikanth Karthikesan wrote:
>> On Friday 21 November 2008 20:09:52 Masami Hiramatsu wrote:
>>> Hi Nikanth,
>>>
>>> Nikanth Karthikesan wrote:
>>
>>> 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 */
>>> }
>>>
>>>
>>
>> So, am I seeing worries to enable something, which is already possible, but
>> just not documented?
>
> Actually, you can do this with kprobes, but not documented,
> because the regs->ip setup depends on arch. (above code is only for
> x86/x86-64).
>
> I think it's easier to just provide above pre_handler for each arch than
> jprobe-based kreplace approach.
>

I thought jprobes would provide easy access to function parameters.

Thanks
Nikanth

  reply	other threads:[~2008-11-26  2:48 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-21 11:50 Nikanth Karthikesan
2008-11-21 13:38 ` Ananth N Mavinakayanahalli
2008-11-21 16:04   ` Balbir Singh
2008-11-21 17:29     ` Chris Friesen
2008-11-24 11:07     ` Nikanth Karthikesan
2008-11-24 11:07   ` Nikanth Karthikesan
2008-11-21 14:39 ` Masami Hiramatsu
2008-11-24 11:07   ` Nikanth Karthikesan
2008-11-24 15:15     ` Masami Hiramatsu
2008-11-26  2:48       ` Nikanth K [this message]
2008-11-21 20:19 ` Anders Kaseorg
2008-11-22  3:46 ` Jeff Arnold
2008-11-23 19:39   ` Andi Kleen
2008-11-23 20:53     ` Jeff Arnold
2008-11-24 11:07   ` Nikanth Karthikesan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=807b3a220811251848w384298dp393691173e603fc2@mail.gmail.com \
    --to=nikanth@gmail.com \
    --cc=ananth@in.ibm.com \
    --cc=andersk@ksplice.com \
    --cc=contact@ksplice.com \
    --cc=davem@davemloft.net \
    --cc=jbarnold@ksplice.com \
    --cc=knikanth@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhiramat@redhat.com \
    --cc=tabbott@ksplice.com \
    --cc=wdaher@ksplice.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®