[<prev] [next>] [day] [month] [year] [list]
Message-ID: <787b0d920910260238o2c3d2647k6c4ec16052307d3f@mail.gmail.com>
Date: Mon, 26 Oct 2009 05:38:54 -0400
From: Albert Cahalan <acahalan@...il.com>
To: sukadev@...ux.vnet.ibm.com,
linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [RFC][v8][PATCH 0/10] Implement clone3() system call
Sukadev Bhattiprolu writes:
> struct clone_struct {
> u64 flags;
> u64 child_stack;
> u32 nr_pids;
> u32 reserved1;
> u64 parent_tid;
> u64 child_tid;
> u64 reserved2;
> };
>
> sys_clone3(struct clone_struct __user *cs, pid_t __user *pids)
We'll be needing a clone4() for ia64 if you don't include the
stack_size parameter.
You have a prime opportunity to fix a portability problem that
has been quite a pain for some time. There are currently 3 cases
that userspace has to suffer with:
1. specify one end of the stack with clone
2. specify the other end of the stack with clone (HP PA-RISC)
3. specify the base and size with clone2 (IA-64)
Portable code ends up with an icky #ifdef mess.
BTW, the extra stack info is also useful for other purposes.
It's information that could appear in /proc/*/maps data.
With an extra flag, thread stacks could be freed on thread exit
so that other threads don't have to babysit an exiting thread.
--
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