Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY

The SET_PERSONALITY macro is always called with a second argument of 0.
Remove the ibcs argument and the various tests to set the PER_SVR4
personality.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

+39 -47
+2 -2
arch/alpha/include/asm/elf.h
··· 144 144 : amask (AMASK_CIX) ? "ev6" : "ev67"); \ 145 145 }) 146 146 147 - #define SET_PERSONALITY(EX, IBCS2) \ 147 + #define SET_PERSONALITY(EX) \ 148 148 set_personality(((EX).e_flags & EF_ALPHA_32BIT) \ 149 - ? PER_LINUX_32BIT : (IBCS2) ? PER_SVR4 : PER_LINUX) 149 + ? PER_LINUX_32BIT : PER_LINUX) 150 150 151 151 extern int alpha_l1i_cacheshape; 152 152 extern int alpha_l1d_cacheshape;
+1 -1
arch/arm/include/asm/elf.h
··· 107 107 #define ELF_PLAT_INIT(_r, load_addr) (_r)->ARM_r0 = 0 108 108 109 109 extern void elf_set_personality(const struct elf32_hdr *); 110 - #define SET_PERSONALITY(ex, ibcs2) elf_set_personality(&(ex)) 110 + #define SET_PERSONALITY(ex) elf_set_personality(&(ex)) 111 111 112 112 #endif
+1 -1
arch/avr32/include/asm/elf.h
··· 103 103 104 104 #define ELF_PLATFORM (NULL) 105 105 106 - #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) 106 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) 107 107 108 108 #endif /* __ASM_AVR32_ELF_H */
+1 -1
arch/blackfin/include/asm/elf.h
··· 122 122 123 123 #define ELF_PLATFORM (NULL) 124 124 125 - #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 125 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 126 126 127 127 #endif
+1 -1
arch/h8300/include/asm/elf.h
··· 55 55 56 56 #define ELF_PLATFORM (NULL) 57 57 58 - #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) 58 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 59 59 60 60 #define R_H8_NONE 0 61 61 #define R_H8_DIR32 1
+1 -1
arch/ia64/ia32/binfmt_elf32.c
··· 41 41 #define elf_map elf32_map 42 42 43 43 #undef SET_PERSONALITY 44 - #define SET_PERSONALITY(ex, ibcs2) elf32_set_personality() 44 + #define SET_PERSONALITY(ex) elf32_set_personality() 45 45 46 46 #define elf_read_implies_exec(ex, have_pt_gnu_stack) (!(have_pt_gnu_stack)) 47 47
+2 -2
arch/ia64/ia32/ia32priv.h
··· 332 332 #define ELF_PLATFORM NULL 333 333 334 334 #ifdef __KERNEL__ 335 - # define SET_PERSONALITY(EX,IBCS2) \ 336 - (current->personality = (IBCS2) ? PER_SVR4 : PER_LINUX) 335 + # define SET_PERSONALITY(EX) \ 336 + (current->personality = PER_LINUX) 337 337 #endif 338 338 339 339 #define IA32_EFLAG 0x200
+1 -1
arch/ia64/include/asm/elf.h
··· 202 202 relevant until we have real hardware to play with... */ 203 203 #define ELF_PLATFORM NULL 204 204 205 - #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) 205 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 206 206 #define elf_read_implies_exec(ex, executable_stack) \ 207 207 ((executable_stack!=EXSTACK_DISABLE_X) && ((ex).e_flags & EF_IA_64_LINUX_EXECUTABLE_STACK) != 0) 208 208
+1 -1
arch/m68knommu/include/asm/elf.h
··· 105 105 106 106 #define ELF_PLATFORM (NULL) 107 107 108 - #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 108 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 109 109 110 110 #endif
+3 -7
arch/mips/include/asm/elf.h
··· 247 247 248 248 #ifdef CONFIG_32BIT 249 249 250 - #define SET_PERSONALITY(ex, ibcs2) \ 250 + #define SET_PERSONALITY(ex) \ 251 251 do { \ 252 - if (ibcs2) \ 253 - set_personality(PER_SVR4); \ 254 252 set_personality(PER_LINUX); \ 255 253 \ 256 254 current->thread.abi = &mips_abi; \ ··· 294 296 #define __SET_PERSONALITY32(ex) do { } while (0) 295 297 #endif 296 298 297 - #define SET_PERSONALITY(ex, ibcs2) \ 299 + #define SET_PERSONALITY(ex) \ 298 300 do { \ 299 301 clear_thread_flag(TIF_32BIT_REGS); \ 300 302 clear_thread_flag(TIF_32BIT_ADDR); \ ··· 304 306 else \ 305 307 current->thread.abi = &mips_abi; \ 306 308 \ 307 - if (ibcs2) \ 308 - set_personality(PER_SVR4); \ 309 - else if (current->personality != PER_LINUX32) \ 309 + if (current->personality != PER_LINUX32) \ 310 310 set_personality(PER_LINUX); \ 311 311 } while (0) 312 312
+1 -1
arch/parisc/kernel/binfmt_elf32.c
··· 85 85 * could set a processor dependent flag in the thread_struct. 86 86 */ 87 87 88 - #define SET_PERSONALITY(ex, ibcs2) \ 88 + #define SET_PERSONALITY(ex) \ 89 89 set_thread_flag(TIF_32BIT); \ 90 90 current->thread.map_base = DEFAULT_MAP_BASE32; \ 91 91 current->thread.task_size = DEFAULT_TASK_SIZE32 \
+2 -2
arch/powerpc/include/asm/elf.h
··· 232 232 #endif /* __powerpc64__ */ 233 233 234 234 #ifdef __powerpc64__ 235 - # define SET_PERSONALITY(ex, ibcs2) \ 235 + # define SET_PERSONALITY(ex) \ 236 236 do { \ 237 237 unsigned long new_flags = 0; \ 238 238 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ ··· 256 256 # define elf_read_implies_exec(ex, exec_stk) (test_thread_flag(TIF_32BIT) ? \ 257 257 (exec_stk != EXSTACK_DISABLE_X) : 0) 258 258 #else 259 - # define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 259 + # define SET_PERSONALITY(ex) set_personality(PER_LINUX) 260 260 #endif /* __powerpc64__ */ 261 261 262 262 extern int dcache_bsize;
+3 -5
arch/s390/include/asm/elf.h
··· 166 166 #define ELF_PLATFORM (elf_platform) 167 167 168 168 #ifndef __s390x__ 169 - #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 169 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 170 170 #else /* __s390x__ */ 171 - #define SET_PERSONALITY(ex, ibcs2) \ 171 + #define SET_PERSONALITY(ex) \ 172 172 do { \ 173 - if (ibcs2) \ 174 - set_personality(PER_SVR4); \ 175 - else if (current->personality != PER_LINUX32) \ 173 + if (current->personality != PER_LINUX32) \ 176 174 set_personality(PER_LINUX); \ 177 175 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ 178 176 set_thread_flag(TIF_31BIT); \
+1 -1
arch/sh/include/asm/elf.h
··· 189 189 } while (0) 190 190 #endif 191 191 192 - #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) 192 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) 193 193 struct task_struct; 194 194 extern int dump_task_regs (struct task_struct *, elf_gregset_t *); 195 195 extern int dump_task_fpu (struct task_struct *, elf_fpregset_t *);
+1 -1
arch/sparc/include/asm/elf_32.h
··· 137 137 138 138 #define ELF_PLATFORM (NULL) 139 139 140 - #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 140 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 141 141 142 142 #endif /* !(__ASMSPARC_ELF_H) */
+2 -4
arch/sparc/include/asm/elf_64.h
··· 195 195 196 196 #define ELF_PLATFORM (NULL) 197 197 198 - #define SET_PERSONALITY(ex, ibcs2) \ 198 + #define SET_PERSONALITY(ex) \ 199 199 do { unsigned long new_flags = current_thread_info()->flags; \ 200 200 new_flags &= _TIF_32BIT; \ 201 201 if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ ··· 208 208 else \ 209 209 clear_thread_flag(TIF_ABI_PENDING); \ 210 210 /* flush_thread will update pgd cache */ \ 211 - if (ibcs2) \ 212 - set_personality(PER_SVR4); \ 213 - else if (current->personality != PER_LINUX32) \ 211 + if (current->personality != PER_LINUX32) \ 214 212 set_personality(PER_LINUX); \ 215 213 } while (0) 216 214
+3 -3
fs/binfmt_elf.c
··· 683 683 * switch really is going to happen - do this in 684 684 * flush_thread(). - akpm 685 685 */ 686 - SET_PERSONALITY(loc->elf_ex, 0); 686 + SET_PERSONALITY(loc->elf_ex); 687 687 688 688 interpreter = open_exec(elf_interpreter); 689 689 retval = PTR_ERR(interpreter); ··· 734 734 goto out_free_dentry; 735 735 } else { 736 736 /* Executables without an interpreter also need a personality */ 737 - SET_PERSONALITY(loc->elf_ex, 0); 737 + SET_PERSONALITY(loc->elf_ex); 738 738 } 739 739 740 740 /* Flush all traces of the currently running executable */ ··· 748 748 749 749 /* Do this immediately, since STACK_TOP as used in setup_arg_pages 750 750 may depend on the personality. */ 751 - SET_PERSONALITY(loc->elf_ex, 0); 751 + SET_PERSONALITY(loc->elf_ex); 752 752 if (elf_read_implies_exec(loc->elf_ex, executable_stack)) 753 753 current->personality |= READ_IMPLIES_EXEC; 754 754
+1 -1
include/asm-cris/elf.h
··· 88 88 89 89 #define ELF_PLATFORM (NULL) 90 90 91 - #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 91 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 92 92 93 93 #endif
+1 -1
include/asm-frv/elf.h
··· 137 137 138 138 #define ELF_PLATFORM (NULL) 139 139 140 - #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 140 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 141 141 142 142 #endif
+1 -1
include/asm-m32r/elf.h
··· 129 129 intent than poking at uname or /proc/cpuinfo. */ 130 130 #define ELF_PLATFORM (NULL) 131 131 132 - #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) 132 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 133 133 134 134 #endif /* _ASM_M32R__ELF_H */
+1 -1
include/asm-m68k/elf.h
··· 114 114 115 115 #define ELF_PLATFORM (NULL) 116 116 117 - #define SET_PERSONALITY(ex, ibcs2) set_personality((ibcs2)?PER_SVR4:PER_LINUX) 117 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 118 118 119 119 #endif
+1 -1
include/asm-mn10300/elf.h
··· 141 141 #define ELF_PLATFORM (NULL) 142 142 143 143 #ifdef __KERNEL__ 144 - #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX) 144 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX) 145 145 #endif 146 146 147 147 #endif /* _ASM_ELF_H */
+1 -1
include/asm-parisc/elf.h
··· 236 236 237 237 #define ELF_PLATFORM ("PARISC\0") 238 238 239 - #define SET_PERSONALITY(ex, ibcs2) \ 239 + #define SET_PERSONALITY(ex) \ 240 240 current->personality = PER_LINUX; \ 241 241 current->thread.map_base = DEFAULT_MAP_BASE; \ 242 242 current->thread.task_size = DEFAULT_TASK_SIZE \
+1 -1
include/asm-um/elf-i386.h
··· 86 86 extern char * elf_aux_platform; 87 87 #define ELF_PLATFORM (elf_aux_platform) 88 88 89 - #define SET_PERSONALITY(ex, ibcs2) do { } while (0) 89 + #define SET_PERSONALITY(ex) do { } while (0) 90 90 91 91 extern unsigned long vsyscall_ehdr; 92 92 extern unsigned long vsyscall_end;
+1 -1
include/asm-um/elf-ppc.h
··· 5 5 extern long elf_aux_hwcap; 6 6 #define ELF_HWCAP (elf_aux_hwcap) 7 7 8 - #define SET_PERSONALITY(ex, ibcs2) do ; while(0) 8 + #define SET_PERSONALITY(ex) do ; while(0) 9 9 10 10 #define ELF_EXEC_PAGESIZE 4096 11 11
+1 -1
include/asm-um/elf-x86_64.h
··· 114 114 115 115 #define ELF_PLATFORM "x86_64" 116 116 117 - #define SET_PERSONALITY(ex, ibcs2) do ; while(0) 117 + #define SET_PERSONALITY(ex) do ; while(0) 118 118 119 119 #endif
+2 -2
include/asm-x86/elf.h
··· 186 186 set_fs(USER_DS); \ 187 187 } while (0) 188 188 189 - #define COMPAT_SET_PERSONALITY(ex, ibcs2) \ 189 + #define COMPAT_SET_PERSONALITY(ex) \ 190 190 do { \ 191 191 if (test_thread_flag(TIF_IA32)) \ 192 192 clear_thread_flag(TIF_ABI_PENDING); \ ··· 267 267 For the moment, we have only optimizations for the Intel generations, 268 268 but that could change... */ 269 269 270 - #define SET_PERSONALITY(ex, ibcs2) set_personality_64bit() 270 + #define SET_PERSONALITY(ex) set_personality_64bit() 271 271 272 272 /* 273 273 * An executable for which elf_read_implies_exec() returns TRUE will
+1 -1
include/asm-xtensa/elf.h
··· 189 189 #endif 190 190 } elf_xtregs_t; 191 191 192 - #define SET_PERSONALITY(ex, ibcs2) set_personality(PER_LINUX_32BIT) 192 + #define SET_PERSONALITY(ex) set_personality(PER_LINUX_32BIT) 193 193 194 194 struct task_struct; 195 195