mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Renzo Davoli <renzo@cs.unibo.it>
Cc: "Américo Wang" <xiyou.wangcong@gmail.com>,
	linux-kernel@vger.kernel.org, "Jeff Dike" <jdike@addtoit.com>,
	user-mode-linux-devel@lists.sourceforge.net
Subject: Re: [PATCH 2/2] ptrace_vm: ptrace for syscall emulation virtual machines
Date: Tue, 10 Mar 2009 23:02:41 +0100	[thread overview]
Message-ID: <20090310220241.GC30475@elte.hu> (raw)
In-Reply-To: <20090310214456.GE5213@cs.unibo.it>


* Renzo Davoli <renzo@cs.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

  reply	other threads:[~2009-03-10 22:03 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-04  8:02 Renzo Davoli
2009-03-10 21:44 ` Renzo Davoli
2009-03-10 22:02   ` Ingo Molnar [this message]
2009-03-11 13:41     ` Renzo Davoli
2009-03-16  8:15       ` Américo Wang
2009-03-16 12:17         ` Renzo Davoli
2009-03-18 14:39           ` Américo Wang
2009-03-24 23:20             ` Renzo Davoli
2009-03-29 16:11               ` Américo Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090310220241.GC30475@elte.hu \
    --to=mingo@elte.hu \
    --cc=jdike@addtoit.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=renzo@cs.unibo.it \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome