Re: execve-type memory-based function, possible?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/23/06, "Jørgen P. Tjernø" <jorgen@xxxxxxxxxx> wrote:
Jørgen P. Tjernø wrote:
 > [ .. a lot of stuff .. ]

It might've been a bit unclear, so here goes:

I'm thinking something like if you read the contents of the file
"/bin/ls" into a buffer, and then want to execute that.
Wouldn't that require that you allocate the memory, do relocation, set
the correct memory page protection (to execute for code, etc), etcetera?

Jørgen,

(now I got it)  Looks like you'd want to implement some kind of
userland exec.  In this case the following archive will be useful:
http://www.graegert.com/code/ul_exec-v1.1.tar.gz.  Although quite
dated it illustrates basic concepts.

If you have questions about the code or the general approach, feel
free to contact me privately.

	\Steve

--

Steve Grägert <steve@xxxxxxxxxxxx>
Jabber    xmpp://graegerts@xxxxxxxxxx
Internet  http://eth0.graegert.com, http://blog.graegert.com
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Assembler]     [Git]     [Kernel List]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [C Programming]     [Yosemite Campsites]     [Yosemite News]     [GCC Help]

  Powered by Linux