[PATCH v15 04/10] arm64: Kprobes with single stepping support
Masami Hiramatsu
mhiramat at kernel.org
Mon Aug 8 15:49:40 PDT 2016
On Mon, 8 Aug 2016 10:29:05 -0400
David Long <dave.long at linaro.org> wrote:
> >> @@ -489,20 +477,15 @@ int __kprobes setjmp_pre_handler(struct kprobe
> >> *p, struct pt_regs *regs)
> >> {
> >> struct jprobe *jp = container_of(p, struct jprobe, kp);
> >> struct kprobe_ctlblk *kcb = get_kprobe_ctlblk();
> >> - long stack_ptr = kernel_stack_pointer(regs);
> >>
> >> kcb->jprobe_saved_regs = *regs;
> >> /*
> >> - * As Linus pointed out, gcc assumes that the callee
> >> - * owns the argument space and could overwrite it, e.g.
> >> - * tailcall optimization. So, to be absolutely safe
> >> - * we also save and restore enough stack bytes to cover
> >> - * the argument area.
> >> + * Since we can't be sure where in the stack frame "stacked"
> >> + * pass-by-value arguments are stored we just don't try to
> >> + * duplicate any of the stack.
> > > ...
> >> Do not use jprobes on functions
> >> that
> >> + * use more than 64 bytes (after padding each to an 8 byte boundary)
> >> + * of arguments, or pass individual arguments larger than 16 bytes.
> >
> > I like this wording. So much so that it really would be great to repeat
> > this in the Documentation/. Could this be included in the list of
> > architecture support/restrictions?
> >
>
> Are you thinking specifically of the "5. Kprobes Features and
> Limitations" section in Documentation/kprobes.txt?
OK, That's a good idea :)
If you update the patch for that, please feel free to add my Ack.
Thank you,
--
Masami Hiramatsu <mhiramat at kernel.org>
More information about the linux-arm-kernel
mailing list