lkml.org 
[lkml]   [2010]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] tracehook: add some self tests
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.



\
 
 \ /
  Last update: 2010-02-15 20:43    [W:0.062 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site