From 8ec0defa78358ecae2b24146666e384af30950b5 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Fri, 4 Mar 2005 17:25:55 -0800 Subject: [PATCH] Randomisation: add ADDR_NO_RANDOMIZE personality Introduce a personality that disables randomisation, so that users can use setarch and related commands to run specific applications without randomisation. Signed-off-by: Arjan van de Ven Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/linux/personality.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/linux/personality.h b/include/linux/personality.h index 7cef4670ac05..80d780e5a8f5 100644 --- a/include/linux/personality.h +++ b/include/linux/personality.h @@ -18,6 +18,7 @@ extern int __set_personality(unsigned long); * These occupy the top three bytes. */ enum { + ADDR_NO_RANDOMIZE = 0x0040000, /* disable randomization of VA space */ FDPIC_FUNCPTRS = 0x0080000, /* userspace function ptrs point to descriptors * (signal handling) */ @@ -35,7 +36,7 @@ enum { * Security-relevant compatibility flags that must be * cleared upon setuid or setgid exec: */ -#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC) +#define PER_CLEAR_ON_SETID (READ_IMPLIES_EXEC|ADDR_NO_RANDOMIZE) /* * Personality types. -- cgit v1.2.3