lkml.org 
[lkml]   [2006]   [Apr]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC] PATCH 3/4 - Time virtualization : PTRACE_SYSCALL_MASK
    Hi!

    > Add PTRACE_SYSCALL_MASK, which allows system calls to be selectively
    > traced. It takes a bitmask and a length. A system call is traced
    > if its bit is one. Otherwise, it executes normally, and is
    > invisible to the ptracing parent.
    >
    > This is not just useful for UML - strace -e could make good use of it as well.

    > + if((current->syscall_mask != NULL) &&

    Please put space between if and (.

    > @@ -690,6 +693,11 @@ int do_syscall_trace(struct pt_regs *reg
    > if (!(current->ptrace & PT_PTRACED))
    > goto out;
    >
    > + if((current->syscall_mask != NULL) && ((long) regs->orig_eax != -1) &&
    > + !(current->syscall_mask[regs->orig_eax / (8 * sizeof(long))] &
    > + (1 << (regs->orig_eax % (8 * sizeof(long))))))
    > + goto out;
    > +

    Same here... and perhaps you can use __get_bit/__set_bit? (this
    applies to few more places).

    Are you going to fix non-i386, too?
    Pavel
    --
    Thanks for all the (sleeping) penguins.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-04-18 15:00    [W:3.476 / U:0.132 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site