From: "bbb arc" <arcbbb@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: problem with userland exec()
Date: Thu, 27 Mar 2008 01:55:47 +0800 [thread overview]
Message-ID: <cdac42810803261055wdfef4c7ifb3ec0266bbd9ac0@mail.gmail.com> (raw)
In-Reply-To: <93517968-4587-4045-853a-70d2702f11a3@d21g2000prf.googlegroups.com>
i am trying grugq's userland exec() [1]
but is unable to run with my simple static linked hello world program
[2]
because of the random stack start address,I tried added the following
three lines in the
save.c:ul_setup_stack():
stack_top = mmap(0,0x16000, PROT_WRITE |PROT_READ,
MAP_PRIVATE|MAP_ANONYMOUS|MAP_GROWSDOWN,-1,0);// test
stack_top +=0x16000;
the program still segmentation fault at memcpy: 0x804d95f: rep
movsl %ds:(%esi),%es:(%edi)
Does anyone have ideas about it?
Kind Regards,
arcbbb
[1] http://www.phrack.org/issues.html?issue=62&id=8
[2] my simple hello world compiled with gcc -g -static
#include <unistd.h>
#define hello "Hello World!\n"
int
main(void)
{
write(1, hello, 13);
return (0);
}
parent reply other threads:[~2008-03-26 17:56 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <93517968-4587-4045-853a-70d2702f11a3@d21g2000prf.googlegroups.com>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cdac42810803261055wdfef4c7ifb3ec0266bbd9ac0@mail.gmail.com \
--to=arcbbb@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®