public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: Roland McGrath <roland@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracehook: add some self tests
Date: Mon, 15 Feb 2010 20:39:48 +0100	[thread overview]
Message-ID: <20100215193948.GA28419@redhat.com> (raw)
In-Reply-To: <1266214553-29476-1-git-send-email-vapier@gentoo.org>

On 02/15, Mike Frysinger wrote:
>
> +static int __init syscall_test(void)
> +{
> +	struct pt_regs _regs, *regs = &_regs;
> +	long _args[8];
> +	long *args = _args + 1;
> +	long *sys_args[6], *sa;
> +	unsigned int i, n, s;
> +
> +	/*
> +	 * First find each system register in pt_regs.  We have to assume
> +	 * syscall_set_arguments() works with very basic arguments.
> +	 */
> +	pr_info("TEST: asm/syscall.h: arg offsets: { ");
> +
> +	for (s = 0; s < 6; ++s)
> +		args[s] = s;
> +	memset(regs, 0xad, sizeof(*regs));
> +	syscall_set_arguments(NULL, regs, 0, 6, args);
                              ^^^^

I am not sure ia64 can tolerate task == NULL. Hmm, even x86 checks
task_thread_info(task)->status.

Probably CONFIG_TRACEHOOK_SELF_TEST needs more attention ?

Otherwise, I convinced myself I understand what this code does, and
it looks good ;)

Oleg.


  reply	other threads:[~2010-02-15 19:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-15  6:15 [PATCH] tracehook: add some self tests Mike Frysinger
2010-02-15 19:39 ` Oleg Nesterov [this message]
2010-02-15 20:28   ` Mike Frysinger
2010-02-15 20:33     ` Roland McGrath
2010-02-15 20:28 ` Roland McGrath
2010-02-15 21:11   ` Mike Frysinger

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=20100215193948.GA28419@redhat.com \
    --to=oleg@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=roland@redhat.com \
    --cc=vapier@gentoo.org \
    /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