diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-08-08 21:24:28 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-08-08 21:24:28 +0000 |
commit | c633e822b473e8135a36e413c5b79d7ce5a5d1fc (patch) | |
tree | e5df9cdd3adf75d668514db59074d3ec55442c2d | |
parent | edf63004732b28995411cf3dca34215cf2982901 (diff) | |
download | glibc-c633e822b473e8135a36e413c5b79d7ce5a5d1fc.tar.gz glibc-c633e822b473e8135a36e413c5b79d7ce5a5d1fc.tar.xz glibc-c633e822b473e8135a36e413c5b79d7ce5a5d1fc.zip |
* sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard):
Shift marked &errno down on big-endian instead of up. * elf/tst-stackguard1.c (do_test): Fix a typo. nptl/ * tst-stackguard1.c (do_test): Likewise.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | elf/tst-stackguard1.c | 2 | ||||
-rw-r--r-- | nptl/ChangeLog | 4 | ||||
-rw-r--r-- | nptl/tst-stackguard1.c | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/dl-osinfo.h | 2 |
5 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index e08224bbde..47151a3088 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,12 @@ +2005-08-08 Jakub Jelinek <jakub@redhat.com> + + * sysdeps/unix/sysv/linux/dl-osinfo.h (_dl_setup_stack_chk_guard): + Shift marked &errno down on big-endian instead of up. + * elf/tst-stackguard1.c (do_test): Fix a typo. + 2005-07-29 Jakub Jelinek <jakub@redhat.com> - * sysdeps/unix/sysv/dl-osinfo.h: Include errno.h, hp-timing.h, + * sysdeps/unix/sysv/linux/dl-osinfo.h: Include errno.h, hp-timing.h, endian.h. (_dl_setup_stack_chk_guard): Even without --enable-stackguard-randomization attempt to do some guard diff --git a/elf/tst-stackguard1.c b/elf/tst-stackguard1.c index ed1b5687a2..50739e5b2e 100644 --- a/elf/tst-stackguard1.c +++ b/elf/tst-stackguard1.c @@ -168,7 +168,7 @@ do_test (void) else if (child_stack_chk_guards[i] == default_guard) ndefaults++; else if (*(char *) &child_stack_chk_guards[i] == 0) - npartlyrandomized = 0; + npartlyrandomized++; } printf ("differences %d defaults %d partly randomized %d\n", diff --git a/nptl/ChangeLog b/nptl/ChangeLog index 38983a81d1..e14555dce5 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,7 @@ +2005-08-08 Jakub Jelinek <jakub@redhat.com> + + * tst-stackguard1.c (do_test): Likewise. + 2005-07-29 Jakub Jelinek <jakub@redhat.com> * tst-stackguard1.c (do_test): Don't fail if the poor man's diff --git a/nptl/tst-stackguard1.c b/nptl/tst-stackguard1.c index d9bbe206c3..77ebbfbd7e 100644 --- a/nptl/tst-stackguard1.c +++ b/nptl/tst-stackguard1.c @@ -198,7 +198,7 @@ do_test (void) else if (child_stack_chk_guards[i] == default_guard) ndefaults++; else if (*(char *) &child_stack_chk_guards[i] == 0) - npartlyrandomized = 0; + npartlyrandomized++; } printf ("differences %d defaults %d partly randomized %d\n", diff --git a/sysdeps/unix/sysv/linux/dl-osinfo.h b/sysdeps/unix/sysv/linux/dl-osinfo.h index fb885330f9..a8291c3c1c 100644 --- a/sysdeps/unix/sysv/linux/dl-osinfo.h +++ b/sysdeps/unix/sysv/linux/dl-osinfo.h @@ -203,7 +203,7 @@ _dl_setup_stack_chk_guard (void) #if __BYTE_ORDER == __LITTLE_ENDIAN stk <<= (__WORDSIZE - 29); #else - stk <<= (__WORDSIZE == 64 ? 24 : 5); + stk >>= 8; #endif ret ^= stk; return ret; |