Re: [PATCH] waitid system call

Roland McGrath
2004-08-16T02:10:32Z

> Are you sure you converted the new _rusage member properly
> in the 64->32bit siginfo converter? struct rusage uses long.

Aha! Indeed I did not. Thanks for pointing that out.

> Better use compat_alloc_user_space() for this. Otherwise it won't
> work for UML/x86-64. Also that will make it easier to port to other
> architectures.

I followed the model of sys32_rt_sigtimedwait and various compat_*
functions in kernel/compat.c. In fact, nothing in kernel/compat.c uses
compat_alloc_user_space--and most things in arch/x86_64/ia32/sys_ia32.c use
the direct stack method as well. To address your concerns, I imagine all
these places should be changed en masse.

>
> + /* 1 if group stopped since last SIGCONT, -1 if SIGCONT since report */
> + int stop_state;
>
> Can't this be merged into some other field? No need to waste memory
> unnecessarily.

I think it could be merged into group_stop_count. I just didn't really
want to perturb all that code for the first go-round. I can make an
attempt at that if all the other potential concerns with the patch are
ironed out. So far the patch doesn't really touch existing signal code
paths much at all, so it's easier to evaluate.

Thanks,
Roland