From: kkonaka@mac.com
To: linux-c-programming@vger.kernel.org
Subject: stack -> PROT_EXEC/why?
Date: Sun, 04 Aug 2002 21:22:33 -0400 [thread overview]
Message-ID: <sqby9bmnlpi.wl@nue.mac.com> (raw)
hi,
casually looking at files like this:
glibc-2.2.3/linuxthreads/manager.c
| res_addr = mmap(map_addr, stacksize + guardsize,
| PROT_READ | PROT_WRITE | PROT_EXEC,
| MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
it appears PROT_EXEC is also given to the per thread
stack(?) pages -- why is it the case? that is - if we
consider things like buffer overflow (security)
problems, isn't it better not give PROT_EXEC unless
abslutely necessary? [so -- maybe there *is* some
absolute necessity I'm not aware of,... :(]
(stepping back) is PROT_EXEC also given to ordinally
stack segment of single threaded programs? was there
any API to retrieve page protection bits given only
arbitrary VM addresses?
regards,
kenji
next reply other threads:[~2002-08-05 1:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-05 1:22 kkonaka [this message]
2002-08-05 11:10 ` stack -> PROT_EXEC/why? Glynn Clements
2002-08-05 14:21 ` kkonaka
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=sqby9bmnlpi.wl@nue.mac.com \
--to=kkonaka@mac.com \
--cc=linux-c-programming@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;
as well as URLs for NNTP newsgroup(s).