From 967423e87f9979166e815f9c281943325637b05e Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Fri, 4 Mar 2005 17:24:44 -0800 Subject: [PATCH] Randomisation: infrastructure The patch below introduces get_random_int() and randomize_range(), two helpers used in later patches in the series. get_random_int() shares the tcp/ip random number stuff so the CONFIG_INET ifdef needs to move slightly, and to reduce the damange due to that, secure_ip_id() needs to move inside random.c From: Frank Sorenson Acked-By: Jeff Dike The stack randomization patches that went into 2.6.11-rc3-mm1 broke compilation of ARCH=um. This patch fixes compiling by adding arch_align_stack back in. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Frank Sorenson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/random.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/linux/random.h') diff --git a/include/linux/random.h b/include/linux/random.h index c6f95fc1de13..3ebd44b239f5 100644 --- a/include/linux/random.h +++ b/include/linux/random.h @@ -70,6 +70,9 @@ extern __u32 secure_tcpv6_sequence_number(__u32 *saddr, __u32 *daddr, extern struct file_operations random_fops, urandom_fops; #endif +unsigned int get_random_int(void); +unsigned long randomize_range(unsigned long start, unsigned long end, unsigned long len); + #endif /* __KERNEL___ */ #endif /* _LINUX_RANDOM_H */ -- cgit v1.2.3