[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8bd0f97a1002151228r2a589047gddc1d998d52c969c@mail.gmail.com>
Date: Mon, 15 Feb 2010 15:28:29 -0500
From: Mike Frysinger <vapier.adi@...il.com>
To: Oleg Nesterov <oleg@...hat.com>
Cc: Roland McGrath <roland@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tracehook: add some self tests
On Mon, Feb 15, 2010 at 14:39, Oleg Nesterov wrote:
> 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.
is there some task available while the kernel is initializing ? i.e.
the test is compiled in ?
if current is valid, i'll just [ab]use that ...
-mike
--
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