From: Oleg Nesterov <oleg@redhat.com>
To: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>,
Ingo Molnar <mingo@elte.hu>,
Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>,
Namhyung Kim <namhyung@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] uprobes: Add uprobe_task->dup_work/dup_addr
Date: Mon, 11 Nov 2013 17:55:43 +0100 [thread overview]
Message-ID: <20131111165543.GA12233@redhat.com> (raw)
In-Reply-To: <20131111071151.GA2559@linux.vnet.ibm.com>
On 11/11, Srikar Dronamraju wrote:
>
> * Oleg Nesterov <oleg@redhat.com> [2013-11-08 20:00:03]:
>
> > uprobe_task->vaddr is a bit strange. First of all it is not really
> > needed, we can move it into arch_uprobe_task. The generic code uses
> > it only to pass the additional argument to arch_uprobe_pre_xol(),
> > and since it is always equal to instruction_pointer() this looks
> > even more strange.
> >
>
> While the code changes look good, I would disagree with the above
> statement. uprobe_task->vaddr is a bit strange only in
> uprobe_copy_process() and not in arch_uprobe_pre_xol() context.
> uprobe_task->vaddr was used to refer to the actual instruction pointer
Yes, and it is always equal to regs->ip when pre_ssout() is called,
> and do the necessary fixups after single stepping out of line.
Exactly. So it is write-only (and meaningless) to the generic uprobe
code. We can (and perhaps should) move it into autask->saved_vaddr,
arch_uprobe_pre_xol() can initialize it.
> The casual reading of this commit message, one can get an impression
> that vaddr is never needed.
See above. The changelog doesn't say we can simply remove it, it says
"move it".
> Your change still retains it.
Of course we can't kill utas->vaddr until we change x86/powerpc. And
just in case, of course I understand that this is minor and even
subjective.
But at least this patch logically "joins" autask and vaddr, and I
believe this is good because they are always used together, because,
well, logically vaddr belongs to autask ;)
> So can we
> modify the commit message accordingly?
Well, I'll try... but perhaps you can help? I mean, I am not sure
about how I can improve it. Could you suggest a better wording?
> Otherwise
> Acked-by: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Thanks!
> > @@ -72,14 +73,24 @@ enum uprobe_task_state {
> > */
> > struct uprobe_task {
> > enum uprobe_task_state state;
> > - struct arch_uprobe_task autask;
> >
> > - struct return_instance *return_instances;
> > - unsigned int depth;
> > - struct uprobe *active_uprobe;
> > + union {
> > + struct {
> > + struct arch_uprobe_task autask;
> > + unsigned long vaddr;
> > + };
> > +
> > + struct {
> > + struct callback_head dup_work;
> > + unsigned long dup_addr;
>
> Nit:
> Can we rename dup_addr to mean that it refers to the xol; something like
> dup_xol_addr or even xol_addr. So that its more clear what address it
> refers to.
OK. How about dup_xol_work/dup_xol_vaddr ?
Oleg.
next prev parent reply other threads:[~2013-11-11 16:59 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-08 19:00 [PATCH] uprobes: Add uprobe_task->dup_work/dup_addr Oleg Nesterov
2013-11-10 15:43 ` Masami Hiramatsu
2013-11-10 17:28 ` Oleg Nesterov
2013-11-11 1:37 ` Masami Hiramatsu
2013-11-11 1:43 ` Masami Hiramatsu
2013-11-11 7:11 ` Srikar Dronamraju
2013-11-11 16:55 ` Oleg Nesterov [this message]
2013-11-11 17:59 ` Oleg Nesterov
2013-11-12 17:43 ` Srikar Dronamraju
2013-11-12 19:20 ` [PATCH v2] " Oleg Nesterov
2013-11-13 5:22 ` Srikar Dronamraju
2013-11-24 8:19 ` Masami Hiramatsu
2013-11-25 12:10 ` Oleg Nesterov
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=20131111165543.GA12233@redhat.com \
--to=oleg@redhat.com \
--cc=ananth@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=masami.hiramatsu.pt@hitachi.com \
--cc=mingo@elte.hu \
--cc=namhyung@kernel.org \
--cc=rostedt@goodmis.org \
--cc=srikar@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).