Re: [PATCH v5] ELF: implement AT_RANDOM for glibc PRNG seeding

From: Ulrich Drepper
Date: Sat Oct 18 2008 - 01:42:35 EST

On Fri, Oct 3, 2008 at 10:59 AM, Kees Cook <kees.cook@xxxxxxxxxxxxx> wrote:
> While discussing[1] the need for glibc to have access to random bytes
> during program load, it seems that an earlier attempt to implement
> AT_RANDOM got stalled. This implements a random 16 byte string, available
> to every ELF program via a new auxv AT_RANDOM vector.
> [1]
> Signed-off-by: Kees Cook <kees.cook@xxxxxxxxxxxxx>
> ---
> fs/binfmt_elf.c | 12 ++++++++++++
> include/linux/auxvec.h | 6 +++---
> 2 files changed, 15 insertions(+), 3 deletions(-)

This version is OK with me as long as the get_random_bytes call is
producing 16 reasonably random bytes. If the random data generation
is changed at some point I'd want to have very strong PRNG for
binaries which have AT_SECURE set.

Acked-by: Ulrich Drepper <drepper@xxxxxxxxxx>
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at