[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20100215202800.5192E1AD@magilla.sf.frob.com>
Date: Mon, 15 Feb 2010 12:28:00 -0800 (PST)
From: Roland McGrath <roland@...hat.com>
To: Mike Frysinger <vapier@...too.org>
Cc: Oleg Nesterov <oleg@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tracehook: add some self tests
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
--
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