[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m3zl95l2oz.fsf@pobox.com>
Date: Tue, 08 Sep 2009 13:19:08 -0500
From: Nathan Lynch <ntl@...ox.com>
To: Sukadev Bhattiprolu <sukadev@...ux.vnet.ibm.com>
Cc: linux-kernel@...r.kernel.org,
Containers <containers@...ts.linux-foundation.org>,
"Eric W. Biederman" <ebiederm@...ssion.com>, hpa@...or.com,
mingo@...e.hu, torvalds@...ux-foundation.org,
Alexey Dobriyan <adobriyan@...il.com>,
Pavel Emelyanov <xemul@...nvz.org>
Subject: Re: [RFC][v5][PATCH 8/8]: Define clone_with_pids() syscall
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?
--
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