OSDN Git Service

stack protector: use AT_RANDOM
authorNick Kralevich <nnk@google.com>
Mon, 14 Jan 2013 22:46:26 +0000 (14:46 -0800)
committerNick Kralevich <nnk@google.com>
Wed, 16 Jan 2013 18:09:52 +0000 (10:09 -0800)
commite3a49a8661125f24aec8a1453e54b3b78005e21e
treea6a1be7dbdf1901db051fcfa1bd19f823e7a7f2b
parent14e1975e13c197180ed0481f305f83a362b16a24
stack protector: use AT_RANDOM

Populate the stack canaries from the kernel supplied
AT_RANDOM value, which doesn't involve any system calls.
This is slightly faster (6 fewer syscalls) and avoids
unnecessarily reading /dev/urandom, which depletes entropy.

Bug: 7959813

Change-Id: If2b43100a2a9929666df3de56b6139fed969e0f1
libc/bionic/libc_init_common.c
libc/bionic/libc_init_static.c
libc/private/bionic_ssp.h
libc/private/bionic_tls.h
linker/linker.cpp
tests/stack_protector_test.cpp