RE: forkat(int pidfd), execveat(int pidfd), other awful things?

2021-02-02 Thread David Laight
From: Andy Lutomirski > Sent: 01 February 2021 18:30 ... > 2. A sane process creation API. It would be delightful to be able to > create a fully-specified process without forking. This might end up > being a fairly complicated project, though -- there are a lot of > inherited process properties

Re: forkat(int pidfd), execveat(int pidfd), other awful things?

2021-02-01 Thread Casey Schaufler
On 2/1/2021 9:47 AM, Jason A. Donenfeld wrote: > Hi Andy & others, > > I was reversing some NT stuff recently and marveling over how wild and > crazy things are over in Windows-land. A few things related to process > creation caught my interest: > > - It's possible to create a new process with an

Re: forkat(int pidfd), execveat(int pidfd), other awful things?

2021-02-01 Thread Andy Lutomirski
On Mon, Feb 1, 2021 at 9:47 AM Jason A. Donenfeld wrote: > > Hi Andy & others, > > I was reversing some NT stuff recently and marveling over how wild and > crazy things are over in Windows-land. A few things related to process > creation caught my interest: > > - It's possible to create a new

Re: forkat(int pidfd), execveat(int pidfd), other awful things?

2021-02-01 Thread Christian Brauner
On Mon, Feb 01, 2021 at 06:47:17PM +0100, Jason A. Donenfeld wrote: > Hi Andy & others, > > I was reversing some NT stuff recently and marveling over how wild and > crazy things are over in Windows-land. A few things related to process > creation caught my interest: > > - It's possible to create

Re: forkat(int pidfd), execveat(int pidfd), other awful things?

2021-02-01 Thread Jason A. Donenfeld
> int execve_parent(int parent_pidfd, int root_dirfd, int cgroup_fd, int > namespace_fd, const char *pathname, char *const argv[], char *const > envp[]); A variant on the same scheme would be: int execve_remote(int pidfd, int root_dirfd, int cgroup_fd, int namespace_fd, const char *pathname,

forkat(int pidfd), execveat(int pidfd), other awful things?

2021-02-01 Thread Jason A. Donenfeld
Hi Andy & others, I was reversing some NT stuff recently and marveling over how wild and crazy things are over in Windows-land. A few things related to process creation caught my interest: - It's possible to create a new process with an *arbitrary parent process*, which means it'll then inherit