projects
/
external
/
glibc.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
664e7d9
)
(_dl_map_object_from_fd): Add caller check.
author
Ulrich Drepper
<drepper@redhat.com>
Mon, 20 Sep 2004 15:15:23 +0000
(15:15 +0000)
committer
Ulrich Drepper
<drepper@redhat.com>
Mon, 20 Sep 2004 15:15:23 +0000
(15:15 +0000)
elf/dl-load.c
patch
|
blob
|
history
diff --git
a/elf/dl-load.c
b/elf/dl-load.c
index
fad456f
..
e4f85a9
100644
(file)
--- a/
elf/dl-load.c
+++ b/
elf/dl-load.c
@@
-35,6
+35,7
@@
#include <abi-tag.h>
#include <dl-osinfo.h>
#include <stackinfo.h>
+#include <caller.h>
#include <dl-dst.h>
@@
-1293,7
+1294,10
@@
cannot allocate TLS data structures for initial thread");
size_t s = (uintptr_t) &__stack_prot - p + sizeof (int);
__mprotect ((void *) p, s, PROT_READ|PROT_WRITE);
- __stack_prot |= PROT_EXEC;
+ if (__builtin_expect (__check_caller (RETURN_ADDRESS (0),
+ allow_ldso|allow_libc) == 0,
+ 0))
+ __stack_prot |= PROT_EXEC;
__mprotect ((void *) p, s, PROT_READ);
}
else