diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-17 17:47:04 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-26 02:46:08 -0500 |
commit | e72837e3e7bae3f182c4ac63c9424e86f1158dd0 (patch) | |
tree | 0d4d51e61aff21b3e6d3b1816b8cb52edcfbd39e | |
parent | 79f9f99ad1e3e19d4ac300573b51289e3ee8ba86 (diff) |
default SET_PERSONALITY() in linux/elf.h
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | arch/avr32/include/asm/elf.h | 3 | ||||
-rw-r--r-- | arch/blackfin/include/asm/elf.h | 3 | ||||
-rw-r--r-- | arch/c6x/include/asm/elf.h | 3 | ||||
-rw-r--r-- | arch/cris/include/asm/elf.h | 3 | ||||
-rw-r--r-- | arch/frv/include/asm/elf.h | 3 | ||||
-rw-r--r-- | arch/h8300/include/asm/elf.h | 3 | ||||
-rw-r--r-- | arch/hexagon/include/asm/elf.h | 5 | ||||
-rw-r--r-- | arch/ia64/include/asm/elf.h | 3 | ||||
-rw-r--r-- | arch/m32r/include/asm/elf.h | 3 | ||||
-rw-r--r-- | arch/m68k/include/asm/elf.h | 3 | ||||
-rw-r--r-- | arch/mn10300/include/asm/elf.h | 5 | ||||
-rw-r--r-- | arch/openrisc/include/asm/elf.h | 3 | ||||
-rw-r--r-- | arch/powerpc/include/asm/elf.h | 2 | ||||
-rw-r--r-- | arch/s390/include/asm/elf.h | 5 | ||||
-rw-r--r-- | arch/score/include/asm/elf.h | 5 | ||||
-rw-r--r-- | arch/sparc/include/asm/elf_32.h | 3 | ||||
-rw-r--r-- | include/linux/elf.h | 4 |
17 files changed, 5 insertions, 54 deletions
diff --git a/arch/avr32/include/asm/elf.h b/arch/avr32/include/asm/elf.h index e2c328739808..d232888b99d5 100644 --- a/arch/avr32/include/asm/elf.h +++ b/arch/avr32/include/asm/elf.h | |||
@@ -102,7 +102,4 @@ typedef struct user_fpu_struct elf_fpregset_t; | |||
102 | 102 | ||
103 | #define ELF_PLATFORM (NULL) | 103 | #define ELF_PLATFORM (NULL) |
104 | 104 | ||
105 | #define SET_PERSONALITY(ex) \ | ||
106 | set_personality(PER_LINUX_32BIT | (current->personality & (~PER_MASK))) | ||
107 | |||
108 | #endif /* __ASM_AVR32_ELF_H */ | 105 | #endif /* __ASM_AVR32_ELF_H */ |
diff --git a/arch/blackfin/include/asm/elf.h b/arch/blackfin/include/asm/elf.h index 14bc98ff668f..d15cb9b5d52c 100644 --- a/arch/blackfin/include/asm/elf.h +++ b/arch/blackfin/include/asm/elf.h | |||
@@ -132,7 +132,4 @@ do { \ | |||
132 | 132 | ||
133 | #define ELF_PLATFORM (NULL) | 133 | #define ELF_PLATFORM (NULL) |
134 | 134 | ||
135 | #define SET_PERSONALITY(ex) \ | ||
136 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
137 | |||
138 | #endif | 135 | #endif |
diff --git a/arch/c6x/include/asm/elf.h b/arch/c6x/include/asm/elf.h index 32b997126adf..9a4dfc5eb249 100644 --- a/arch/c6x/include/asm/elf.h +++ b/arch/c6x/include/asm/elf.h | |||
@@ -77,9 +77,6 @@ do { \ | |||
77 | 77 | ||
78 | #define ELF_PLATFORM (NULL) | 78 | #define ELF_PLATFORM (NULL) |
79 | 79 | ||
80 | #define SET_PERSONALITY(ex) \ | ||
81 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
82 | |||
83 | /* C6X specific section types */ | 80 | /* C6X specific section types */ |
84 | #define SHT_C6000_UNWIND 0x70000001 | 81 | #define SHT_C6000_UNWIND 0x70000001 |
85 | #define SHT_C6000_PREEMPTMAP 0x70000002 | 82 | #define SHT_C6000_PREEMPTMAP 0x70000002 |
diff --git a/arch/cris/include/asm/elf.h b/arch/cris/include/asm/elf.h index 8182f2dc89d0..30ded8fbf592 100644 --- a/arch/cris/include/asm/elf.h +++ b/arch/cris/include/asm/elf.h | |||
@@ -86,7 +86,4 @@ typedef unsigned long elf_fpregset_t; | |||
86 | 86 | ||
87 | #define ELF_PLATFORM (NULL) | 87 | #define ELF_PLATFORM (NULL) |
88 | 88 | ||
89 | #define SET_PERSONALITY(ex) \ | ||
90 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
91 | |||
92 | #endif | 89 | #endif |
diff --git a/arch/frv/include/asm/elf.h b/arch/frv/include/asm/elf.h index 9ccbc80f0b11..2bac6446db41 100644 --- a/arch/frv/include/asm/elf.h +++ b/arch/frv/include/asm/elf.h | |||
@@ -137,7 +137,4 @@ do { \ | |||
137 | 137 | ||
138 | #define ELF_PLATFORM (NULL) | 138 | #define ELF_PLATFORM (NULL) |
139 | 139 | ||
140 | #define SET_PERSONALITY(ex) \ | ||
141 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
142 | |||
143 | #endif | 140 | #endif |
diff --git a/arch/h8300/include/asm/elf.h b/arch/h8300/include/asm/elf.h index 41193c396bff..6db71248a82f 100644 --- a/arch/h8300/include/asm/elf.h +++ b/arch/h8300/include/asm/elf.h | |||
@@ -54,9 +54,6 @@ typedef unsigned long elf_fpregset_t; | |||
54 | 54 | ||
55 | #define ELF_PLATFORM (NULL) | 55 | #define ELF_PLATFORM (NULL) |
56 | 56 | ||
57 | #define SET_PERSONALITY(ex) \ | ||
58 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
59 | |||
60 | #define R_H8_NONE 0 | 57 | #define R_H8_NONE 0 |
61 | #define R_H8_DIR32 1 | 58 | #define R_H8_DIR32 1 |
62 | #define R_H8_DIR32_28 2 | 59 | #define R_H8_DIR32_28 2 |
diff --git a/arch/hexagon/include/asm/elf.h b/arch/hexagon/include/asm/elf.h index 1ba4b3bff5ed..1f14e082588e 100644 --- a/arch/hexagon/include/asm/elf.h +++ b/arch/hexagon/include/asm/elf.h | |||
@@ -216,11 +216,6 @@ do { \ | |||
216 | */ | 216 | */ |
217 | #define ELF_PLATFORM (NULL) | 217 | #define ELF_PLATFORM (NULL) |
218 | 218 | ||
219 | #ifdef __KERNEL__ | ||
220 | #define SET_PERSONALITY(ex) \ | ||
221 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
222 | #endif | ||
223 | |||
224 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 | 219 | #define ARCH_HAS_SETUP_ADDITIONAL_PAGES 1 |
225 | struct linux_binprm; | 220 | struct linux_binprm; |
226 | extern int arch_setup_additional_pages(struct linux_binprm *bprm, | 221 | extern int arch_setup_additional_pages(struct linux_binprm *bprm, |
diff --git a/arch/ia64/include/asm/elf.h b/arch/ia64/include/asm/elf.h index b5298eb09adb..5a83c5cc3dc8 100644 --- a/arch/ia64/include/asm/elf.h +++ b/arch/ia64/include/asm/elf.h | |||
@@ -201,9 +201,6 @@ extern void ia64_elf_core_copy_regs (struct pt_regs *src, elf_gregset_t dst); | |||
201 | relevant until we have real hardware to play with... */ | 201 | relevant until we have real hardware to play with... */ |
202 | #define ELF_PLATFORM NULL | 202 | #define ELF_PLATFORM NULL |
203 | 203 | ||
204 | #define SET_PERSONALITY(ex) \ | ||
205 | set_personality((current->personality & ~PER_MASK) | PER_LINUX) | ||
206 | |||
207 | #define elf_read_implies_exec(ex, executable_stack) \ | 204 | #define elf_read_implies_exec(ex, executable_stack) \ |
208 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) | 205 | ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) |
209 | 206 | ||
diff --git a/arch/m32r/include/asm/elf.h b/arch/m32r/include/asm/elf.h index 70896161c636..8acc9da9a15e 100644 --- a/arch/m32r/include/asm/elf.h +++ b/arch/m32r/include/asm/elf.h | |||
@@ -128,7 +128,4 @@ typedef elf_fpreg_t elf_fpregset_t; | |||
128 | intent than poking at uname or /proc/cpuinfo. */ | 128 | intent than poking at uname or /proc/cpuinfo. */ |
129 | #define ELF_PLATFORM (NULL) | 129 | #define ELF_PLATFORM (NULL) |
130 | 130 | ||
131 | #define SET_PERSONALITY(ex) \ | ||
132 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
133 | |||
134 | #endif /* _ASM_M32R__ELF_H */ | 131 | #endif /* _ASM_M32R__ELF_H */ |
diff --git a/arch/m68k/include/asm/elf.h b/arch/m68k/include/asm/elf.h index f83c1d0a87cf..b1c26de438be 100644 --- a/arch/m68k/include/asm/elf.h +++ b/arch/m68k/include/asm/elf.h | |||
@@ -113,7 +113,4 @@ typedef struct user_m68kfp_struct elf_fpregset_t; | |||
113 | 113 | ||
114 | #define ELF_PLATFORM (NULL) | 114 | #define ELF_PLATFORM (NULL) |
115 | 115 | ||
116 | #define SET_PERSONALITY(ex) \ | ||
117 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
118 | |||
119 | #endif | 116 | #endif |
diff --git a/arch/mn10300/include/asm/elf.h b/arch/mn10300/include/asm/elf.h index 4ebd6b3a0a1e..f592d7a9f032 100644 --- a/arch/mn10300/include/asm/elf.h +++ b/arch/mn10300/include/asm/elf.h | |||
@@ -150,9 +150,4 @@ do { \ | |||
150 | */ | 150 | */ |
151 | #define ELF_PLATFORM (NULL) | 151 | #define ELF_PLATFORM (NULL) |
152 | 152 | ||
153 | #ifdef __KERNEL__ | ||
154 | #define SET_PERSONALITY(ex) \ | ||
155 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
156 | #endif | ||
157 | |||
158 | #endif /* _ASM_ELF_H */ | 153 | #endif /* _ASM_ELF_H */ |
diff --git a/arch/openrisc/include/asm/elf.h b/arch/openrisc/include/asm/elf.h index f4aa8a542a22..d334e204bbdd 100644 --- a/arch/openrisc/include/asm/elf.h +++ b/arch/openrisc/include/asm/elf.h | |||
@@ -62,7 +62,4 @@ extern void dump_elf_thread(elf_greg_t *dest, struct pt_regs *pt); | |||
62 | 62 | ||
63 | #define ELF_PLATFORM (NULL) | 63 | #define ELF_PLATFORM (NULL) |
64 | 64 | ||
65 | #define SET_PERSONALITY(ex) \ | ||
66 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
67 | |||
68 | #endif | 65 | #endif |
diff --git a/arch/powerpc/include/asm/elf.h b/arch/powerpc/include/asm/elf.h index 6abf0a163233..ac9790fc3836 100644 --- a/arch/powerpc/include/asm/elf.h +++ b/arch/powerpc/include/asm/elf.h | |||
@@ -103,8 +103,6 @@ do { \ | |||
103 | # define elf_read_implies_exec(ex, exec_stk) (is_32bit_task() ? \ | 103 | # define elf_read_implies_exec(ex, exec_stk) (is_32bit_task() ? \ |
104 | (exec_stk == EXSTACK_DEFAULT) : 0) | 104 | (exec_stk == EXSTACK_DEFAULT) : 0) |
105 | #else | 105 | #else |
106 | # define SET_PERSONALITY(ex) \ | ||
107 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
108 | # define elf_read_implies_exec(ex, exec_stk) (exec_stk == EXSTACK_DEFAULT) | 106 | # define elf_read_implies_exec(ex, exec_stk) (exec_stk == EXSTACK_DEFAULT) |
109 | #endif /* __powerpc64__ */ | 107 | #endif /* __powerpc64__ */ |
110 | 108 | ||
diff --git a/arch/s390/include/asm/elf.h b/arch/s390/include/asm/elf.h index 178ff966a8ba..1bfdf24b85a2 100644 --- a/arch/s390/include/asm/elf.h +++ b/arch/s390/include/asm/elf.h | |||
@@ -180,10 +180,7 @@ extern unsigned long elf_hwcap; | |||
180 | extern char elf_platform[]; | 180 | extern char elf_platform[]; |
181 | #define ELF_PLATFORM (elf_platform) | 181 | #define ELF_PLATFORM (elf_platform) |
182 | 182 | ||
183 | #ifndef CONFIG_64BIT | 183 | #ifdef CONFIG_64BIT |
184 | #define SET_PERSONALITY(ex) \ | ||
185 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
186 | #else /* CONFIG_64BIT */ | ||
187 | #define SET_PERSONALITY(ex) \ | 184 | #define SET_PERSONALITY(ex) \ |
188 | do { \ | 185 | do { \ |
189 | if (personality(current->personality) != PER_LINUX32) \ | 186 | if (personality(current->personality) != PER_LINUX32) \ |
diff --git a/arch/score/include/asm/elf.h b/arch/score/include/asm/elf.h index 5d566c7a0af2..6a9421c693ca 100644 --- a/arch/score/include/asm/elf.h +++ b/arch/score/include/asm/elf.h | |||
@@ -52,11 +52,6 @@ typedef elf_fpreg_t elf_fpregset_t; | |||
52 | #define ELF_DATA ELFDATA2LSB | 52 | #define ELF_DATA ELFDATA2LSB |
53 | #define ELF_ARCH EM_SCORE7 | 53 | #define ELF_ARCH EM_SCORE7 |
54 | 54 | ||
55 | #define SET_PERSONALITY(ex) \ | ||
56 | do { \ | ||
57 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))); \ | ||
58 | } while (0) | ||
59 | |||
60 | struct task_struct; | 55 | struct task_struct; |
61 | struct pt_regs; | 56 | struct pt_regs; |
62 | 57 | ||
diff --git a/arch/sparc/include/asm/elf_32.h b/arch/sparc/include/asm/elf_32.h index ac74a2c98e6d..a24e41fcdde1 100644 --- a/arch/sparc/include/asm/elf_32.h +++ b/arch/sparc/include/asm/elf_32.h | |||
@@ -128,7 +128,4 @@ typedef struct { | |||
128 | 128 | ||
129 | #define ELF_PLATFORM (NULL) | 129 | #define ELF_PLATFORM (NULL) |
130 | 130 | ||
131 | #define SET_PERSONALITY(ex) \ | ||
132 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
133 | |||
134 | #endif /* !(__ASMSPARC_ELF_H) */ | 131 | #endif /* !(__ASMSPARC_ELF_H) */ |
diff --git a/include/linux/elf.h b/include/linux/elf.h index 8c9048e33463..40a3c0e01b2b 100644 --- a/include/linux/elf.h +++ b/include/linux/elf.h | |||
@@ -10,6 +10,10 @@ | |||
10 | Override in asm/elf.h as needed. */ | 10 | Override in asm/elf.h as needed. */ |
11 | # define elf_read_implies_exec(ex, have_pt_gnu_stack) 0 | 11 | # define elf_read_implies_exec(ex, have_pt_gnu_stack) 0 |
12 | #endif | 12 | #endif |
13 | #ifndef SET_PERSONALITY | ||
14 | #define SET_PERSONALITY(ex) \ | ||
15 | set_personality(PER_LINUX | (current->personality & (~PER_MASK))) | ||
16 | #endif | ||
13 | 17 | ||
14 | #if ELF_CLASS == ELFCLASS32 | 18 | #if ELF_CLASS == ELFCLASS32 |
15 | 19 | ||