[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090310220241.GC30475@elte.hu>
Date: Tue, 10 Mar 2009 23:02:41 +0100
From: Ingo Molnar <mingo@...e.hu>
To: Renzo Davoli <renzo@...unibo.it>
Cc: Américo Wang <xiyou.wangcong@...il.com>,
linux-kernel@...r.kernel.org, Jeff Dike <jdike@...toit.com>,
user-mode-linux-devel@...ts.sourceforge.net
Subject: Re: [PATCH 2/2] ptrace_vm: ptrace for syscall emulation virtual
machines
* Renzo Davoli <renzo@...unibo.it> wrote:
> +/* test thread code. This thread is started only to test
> + * which features are provided by the linux kernel */
> +static int sysptvm_child(void *arg)
> +{
> + int *featurep=arg;
> + int p[2]={-1,-1};
> + pid_t pid=os_getpid();
> + if(ptrace(PTRACE_TRACEME, 0, 0, 0) < 0){
> + perror("ptrace test_ptracemulti");
> + kill(pid, SIGKILL);
> + }
> + kill(pid, SIGSTOP);
> + *featurep=0;
> + os_getpid();
> + /* if it reaches this point in 1 stop it means that
> + * PTRACE_SYSCALL_SKIPEXIT works */
> + *featurep=PTRACE_SYSCALL_SKIPEXIT;
> + pipe(p);
> + /* if after a PTRACE_SYSCALL_SKIPCALL p[0] is already <0
> + * pipe has been really skipped */
> + if (p[0] < 0)
> + *featurep=PTRACE_SYSCALL_SKIPCALL;
> + else { /* clean up everything */
> + close(p[0]);
> + close(p[1]);
> + }
> + return 0;
Please check Documentation/CodingStyle. Every second line above
violates it. scripts/checkpatch.pl can help out with the more
obvious ones.
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists