lkml.org 
[lkml]   [2009]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][v5][PATCH 8/8]: Define clone_with_pids() syscall
From
Date
Suka,

I ran across an issue with this on ppc64.

> +static pid_t *copy_target_pids(void __user *upid_setp)
> +{
> + int j;
> + int rc;
> + int size;
> + int unum_pids; /* # of pids specified by user */
> + int knum_pids; /* # of pids needed in kernel */
> + pid_t *target_pids;
> + struct pid_set pid_set;
> +
> + if (!upid_setp)
> + return NULL;
> +
> + rc = copy_from_user(&pid_set, upid_setp, sizeof(pid_set));

This doesn't work on a 64-bit kernel when the process is 32-bit and uses
the definition of struct pid_set provided in types.h:

+struct pid_set {
+ int num_pids;
+ pid_t *pids;
+};

Shouldn't the pids field be u64 or some other type of fixed size?


\
 
 \ /
  Last update: 2009-09-08 20:21    [W:0.078 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site