From: Roland McGrath <roland@redhat.com>
To: Mike Frysinger <vapier@gentoo.org>
Cc: Oleg Nesterov <oleg@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracehook: add some self tests
Date: Mon, 15 Feb 2010 12:28:00 -0800 (PST) [thread overview]
Message-ID: <20100215202800.5192E1AD@magilla.sf.frob.com> (raw)
In-Reply-To: Mike Frysinger's message of Monday, 15 February 2010 01:15:53 -0500 <1266214553-29476-1-git-send-email-vapier@gentoo.org>
This is something of a misnomer, since asm/syscall.h is the only thing you
are testing.
As Oleg pointed out, not all arch definitions can be used without a proper
task_struct argument. Only ia64 actually needs the task as part of the
actual register access. But several others (including x86) look at the
task to decide whether to use the 32-bit or 64-bit interpretation of the
register values.
I'd make the more general point that this sort of "synthetic" test does not
seem very useful. At best, it can test the asm/syscall.h code for being
internally consistent--but that doesn't test whether it's really correct.
IMHO this is not worth having unless it's an "empirical" test. What I mean
by that is one that really uses the asm/syscall.h calls as specified, and
in the context specified. So, you'd have to fork a user process and use
ptrace on it to get it stopped at a syscall entry. Then you can fetch the
arguments, modify them, and look at the arguments it actually passes in to
the syscall.
Thanks,
Roland
next prev parent reply other threads:[~2010-02-15 20:28 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-15 6:15 Mike Frysinger
2010-02-15 19:39 ` Oleg Nesterov
2010-02-15 20:28 ` Mike Frysinger
2010-02-15 20:33 ` Roland McGrath
2010-02-15 20:28 ` Roland McGrath [this message]
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=20100215202800.5192E1AD@magilla.sf.frob.com \
--to=roland@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@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
all inboxes | Powered by JetHome®