.. | .. |
---|
410 | 410 | clear_thread_flag(TIF_32BIT_FPREGS); \ |
---|
411 | 411 | clear_thread_flag(TIF_HYBRID_FPREGS); \ |
---|
412 | 412 | clear_thread_flag(TIF_32BIT_ADDR); \ |
---|
| 413 | + current->personality &= ~READ_IMPLIES_EXEC; \ |
---|
413 | 414 | \ |
---|
414 | 415 | if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ |
---|
415 | 416 | __SET_PERSONALITY32(ex, state); \ |
---|
.. | .. |
---|
444 | 445 | |
---|
445 | 446 | #define ELF_PLATFORM __elf_platform |
---|
446 | 447 | extern const char *__elf_platform; |
---|
| 448 | + |
---|
| 449 | +#define ELF_BASE_PLATFORM __elf_base_platform |
---|
| 450 | +extern const char *__elf_base_platform; |
---|
447 | 451 | |
---|
448 | 452 | /* |
---|
449 | 453 | * See comments in asm-alpha/elf.h, this is the same thing |
---|
.. | .. |
---|
481 | 485 | extern int arch_setup_additional_pages(struct linux_binprm *bprm, |
---|
482 | 486 | int uses_interp); |
---|
483 | 487 | |
---|
| 488 | +#ifdef CONFIG_MIPS_FP_SUPPORT |
---|
| 489 | + |
---|
484 | 490 | struct arch_elf_state { |
---|
485 | 491 | int nan_2008; |
---|
486 | 492 | int fp_abi; |
---|
.. | .. |
---|
497 | 503 | .overall_fp_mode = -1, \ |
---|
498 | 504 | } |
---|
499 | 505 | |
---|
500 | | -/* Whether to accept legacy-NaN and 2008-NaN user binaries. */ |
---|
501 | | -extern bool mips_use_nan_legacy; |
---|
502 | | -extern bool mips_use_nan_2008; |
---|
503 | | - |
---|
504 | 506 | extern int arch_elf_pt_proc(void *ehdr, void *phdr, struct file *elf, |
---|
505 | 507 | bool is_interp, struct arch_elf_state *state); |
---|
506 | 508 | |
---|
507 | 509 | extern int arch_check_elf(void *ehdr, bool has_interpreter, void *interp_ehdr, |
---|
508 | 510 | struct arch_elf_state *state); |
---|
509 | 511 | |
---|
| 512 | +/* Whether to accept legacy-NaN and 2008-NaN user binaries. */ |
---|
| 513 | +extern bool mips_use_nan_legacy; |
---|
| 514 | +extern bool mips_use_nan_2008; |
---|
| 515 | + |
---|
510 | 516 | extern void mips_set_personality_nan(struct arch_elf_state *state); |
---|
511 | 517 | extern void mips_set_personality_fp(struct arch_elf_state *state); |
---|
512 | 518 | |
---|
| 519 | +#else /* !CONFIG_MIPS_FP_SUPPORT */ |
---|
| 520 | + |
---|
| 521 | +struct arch_elf_state; |
---|
| 522 | + |
---|
| 523 | +static inline void mips_set_personality_nan(struct arch_elf_state *state) |
---|
| 524 | +{ |
---|
| 525 | + /* no-op */ |
---|
| 526 | +} |
---|
| 527 | + |
---|
| 528 | +static inline void mips_set_personality_fp(struct arch_elf_state *state) |
---|
| 529 | +{ |
---|
| 530 | + /* no-op */ |
---|
| 531 | +} |
---|
| 532 | + |
---|
| 533 | +#endif /* !CONFIG_MIPS_FP_SUPPORT */ |
---|
| 534 | + |
---|
513 | 535 | #define elf_read_implies_exec(ex, stk) mips_elf_read_implies_exec(&(ex), stk) |
---|
514 | 536 | extern int mips_elf_read_implies_exec(void *elf_ex, int exstack); |
---|
515 | 537 | |
---|