linux-c-programming.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* stack -> PROT_EXEC/why?
@ 2002-08-05  1:22 kkonaka
  2002-08-05 11:10 ` Glynn Clements
  0 siblings, 1 reply; 3+ messages in thread
From: kkonaka @ 2002-08-05  1:22 UTC (permalink / raw)
  To: linux-c-programming

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-08-05 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-05  1:22 stack -> PROT_EXEC/why? kkonaka
2002-08-05 11:10 ` Glynn Clements
2002-08-05 14:21   ` kkonaka

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).