2012/10/16 Masami Hiramatsu <masami.hiramatsu...@hitachi.com>: > (2012/10/16 18:02), Hyeoncheol Lee wrote: >> Event arguments except @SYM are supported. They are @ADDR, >> $stack, $stackN, $retval, and offs(arguments). >> >> Cc: Masami Hiramatsu <masami.hiramatsu...@hitachi.com> >> Cc: Srikar Dronamraju <sri...@linux.vnet.ibm.com> >> Signed-off-by: Hyeoncheol Lee <hyc....@gmail.com> >> --- > > [...] >> #define DEFINE_FETCH_stack(type) \ >> static __kprobes void FETCH_FUNC_NAME(stack, type)(struct pt_regs *regs,\ >> - void *offset, void *dest) \ >> + void *offset, void *dest, \ >> + bool kprobe) \ >> { \ >> - *(type *)dest = (type)regs_get_kernel_stack_nth(regs, \ >> + if (kprobe) \ >> + *(type *)dest = (type)regs_get_kernel_stack_nth(regs, \ >> (unsigned int)((unsigned long)offset)); \ >> + else \ >> + *(type *)dest = (type)regs_get_user_stack_nth(regs, \ >> + (unsigned int)((unsigned long)offset)); \ >> } > > > Hmm, I don't think this is a good way to do that. > If fetching user space objects is different from the kernel one, > we'd better introduce new fetch handlers for it, instead of checking > a bool flag every time, because it will be done on every events. > > Thank you, > > > -- > Masami HIRAMATSU > IT Management Research Dept. Linux Technology Center > Hitachi, Ltd., Yokohama Research Laboratory > E-mail: masami.hiramatsu...@hitachi.com > >
Yes Thank you for your comment -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/