[Toybox] [Nommu] Week ending June 27ish.

Christopher Covington cov at codeaurora.org
Thu Jul 2 07:44:26 PDT 2015


Hi Rob,

On 06/29/2015 04:26 PM, Rob Landley wrote:
> On 06/28/2015 09:57 PM, Rich Felker wrote:

>> but the latter could be dangerous not to have setup right.
>> I *think* (this needs checking) the new thread created manually by
>> clone will use the same TLS pointer as the thread that called clone.
>> In this case, libc internals will potentially be reading and writing
>> the same data, without any synchronization.
> 
> See "decided to just use fork(), which means re-exec /proc/self/exe as
> necessary because exec(NULL) doesn't re-exec yourself despite multiple
> proposals over the year that the kernel just DO that since the kernel
> knows the right inode even if proc isn't mounted"...

Is the following much different from the desired exec(NULL) behavior you're
describing?

> For example, if you have an open file descriptor on an executable file, you
> can execute it by calling execveat(), passing the file descriptor, an empty
> path, and the AT_EMPTY_PATH flag.

https://lwn.net/Articles/649115/

Chris

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


More information about the Toybox mailing list