Messages in this thread | | | Date | Tue, 18 Apr 2006 14:57:28 +0200 | From | Pavel Machek <> | Subject | Re: [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/
| |