• Arjan van de Ven's avatar
    [PATCH] Randomisation: mmap randomisation · 2fd35017
    Arjan van de Ven authored
    The patch below randomizes the starting point of the mmap area.
    
    This has the effect that all non-prelinked shared libaries and all bigger
    malloc()s will be randomized between various invocations of the binary. 
    Prelinked binaries get a address-hint from ld.so in their mmap and are thus
    exempt from this randomisation, in order to not break the prelink advantage.
    The randomisation range is 1 megabyte (this is bigger than the stack
    randomisation since the stack randomisation only needs 16 bytes alignment
    while the mmap needs page alignment, a 64kb range would not have given enough
    entropy to be effective)
    Signed-off-by: default avatarArjan van de Ven <arjan@infradead.org>
    Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    2fd35017
mmap.c 2.24 KB