lkml.org 
[lkml]   [2004]   [Aug]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] waitid system call
From
Date
Roland McGrath <roland@redhat.com> writes:

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

> +asmlinkage long sys32_waitid(int which, compat_pid_t pid,
> + siginfo_t32 __user *uinfo, int options)
> +{
> + siginfo_t info;
> + long ret;
> + mm_segment_t old_fs = get_fs();
> +
> + info.si_signo = 0;
> + set_fs (KERNEL_DS);
> + ret = sys_waitid(which, pid, (siginfo_t __user *) &info, options);
> + set_fs (old_fs);

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.

+ /* 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.

-Andi

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.105 / U:0.424 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site