lkml.org 
[lkml]   [2016]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/3] arch/powerpc : optprobes for powerpc core
    Hi Anju,

    On Fri, 9 Sep 2016 16:19:41 +0530
    Anju T Sudhakar <anju@linux.vnet.ibm.com> wrote:
    > >> +void arch_unoptimize_kprobe(struct optimized_kprobe *op)
    > >> +{
    > >> + arch_arm_kprobe(&op->kp);
    > >> +}
    > >> +
    > >> +void arch_unoptimize_kprobes(struct list_head *oplist,
    > >> + struct list_head *done_list)
    > >> +{
    > >> + struct optimized_kprobe *op;
    > >> + struct optimized_kprobe *tmp;
    > >> +
    > >> + list_for_each_entry_safe(op, tmp, oplist, list) {
    > >> + arch_unoptimize_kprobe(op);
    > >> + list_move(&op->list, done_list);
    > >> + }
    > >> +}
    > >> +
    > >> +int arch_within_optimized_kprobe(struct optimized_kprobe *op,
    > >> + unsigned long addr)
    > >> +{
    > >> + return 0;
    > > Here, please check the address range as same as arm32 optprobe implementation.
    > >
    > > e.g.
    > > return ((unsigned long)op->kp.addr <= addr &&
    > > (unsigned long)op->kp.addr + RELATIVEJUMP_SIZE > addr);
    > >
    > >
    > > Thank you,
    >
    > Do we really need this? The only case this check will succeed is if
    > kp.addr is not a multiple of 4, which is not a valid address at all
    > onPower. So should we again check here for that?

    Yes, since that is exported function, which means it can be used from
    other part, other usage (e.g. for debug reason someone wants to use it).
    Please do not optimize the code only for current implementation, but
    for generic use case.

    Thank you,

    --
    Masami Hiramatsu <mhiramat@kernel.org>

    \
     
     \ /
      Last update: 2016-09-17 09:59    [W:2.234 / U:0.164 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site