forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'work.elf-compat' of git://git.kernel.org/pub/scm/linux/…
…kernel/git/viro/vfs Pull ELF compat updates from Al Viro: "Sanitizing ELF compat support, especially for triarch architectures: - X32 handling cleaned up - MIPS64 uses compat_binfmt_elf.c both for O32 and N32 now - Kconfig side of things regularized Eventually I hope to have compat_binfmt_elf.c killed, with both native and compat built from fs/binfmt_elf.c, with -DELF_BITS={64,32} passed by kbuild, but that's a separate story - not included here" * 'work.elf-compat' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: get rid of COMPAT_ELF_EXEC_PAGESIZE compat_binfmt_elf: don't bother with undef of ELF_ARCH Kconfig: regularize selection of CONFIG_BINFMT_ELF mips compat: switch to compat_binfmt_elf.c mips: don't bother with ELF_CORE_EFLAGS mips compat: don't bother with ELF_ET_DYN_BASE mips: KVM_GUEST makes no sense for 64bit builds... mips: kill unused definitions in binfmt_elf[on]32.c mips binfmt_elf*32.c: use elfcore-compat.h x32: make X32, !IA32_EMULATION setups able to execute x32 binaries [amd64] clean PRSTATUS_SIZE/SET_PR_FPVALID up properly elf_prstatus: collect the common part (everything before pr_reg) into a struct binfmt_elf: partially sanitize PRSTATUS_SIZE and SET_PR_FPVALID
- Loading branch information
Showing
27 changed files
with
129 additions
and
339 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef _ASM_MIPS_ELFCORE_COMPAT_H | ||
#define _ASM_MIPS_ELFCORE_COMPAT_H | ||
|
||
/* | ||
* On mips we have two 32bit ABIs - o32 and n32. The latter | ||
* has bigger registers, so we use it for compat_elf_regset_t. | ||
* The former uses o32_elf_prstatus and PRSTATUS_SIZE/SET_PR_FPVALID | ||
* are used to choose the size and location of ->pr_fpvalid of | ||
* the layout actually used. | ||
*/ | ||
typedef elf_gregset_t compat_elf_gregset_t; | ||
|
||
struct o32_elf_prstatus | ||
{ | ||
struct compat_elf_prstatus_common common; | ||
unsigned int pr_reg[ELF_NGREG]; | ||
compat_int_t pr_fpvalid; | ||
}; | ||
|
||
#define PRSTATUS_SIZE \ | ||
(!test_thread_flag(TIF_32BIT_REGS) \ | ||
? sizeof(struct compat_elf_prstatus) \ | ||
: sizeof(struct o32_elf_prstatus)) | ||
#define SET_PR_FPVALID(S) \ | ||
(*(!test_thread_flag(TIF_32BIT_REGS) \ | ||
? &(S)->pr_fpvalid \ | ||
: &((struct o32_elf_prstatus *)(S))->pr_fpvalid) = 1) | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.