Paul Burton
774c105ed8
binfmt_elf: allow arch code to examine PT_LOPROC ... PT_HIPROC headers
...
MIPS is introducing new variants of its O32 ABI which differ in their
handling of floating point, in order to enable a gradual transition
towards a world where mips32 binaries can take advantage of new hardware
features only available when configured for certain FP modes. In order
to do this ELF binaries are being augmented with a new section that
indicates, amongst other things, the FP mode requirements of the binary.
The presence & location of such a section is indicated by a program
header in the PT_LOPROC ... PT_HIPROC range.
In order to allow the MIPS architecture code to examine the program
header & section in question, pass all program headers in this range
to an architecture-specific arch_elf_pt_proc function. This function
may return an error if the header is deemed invalid or unsuitable for
the system, in which case that error will be returned from
load_elf_binary and upwards through the execve syscall.
A means is required for the architecture code to make a decision once
it is known that all such headers have been seen, but before it is too
late to return from an execve syscall. For this purpose the
arch_check_elf function is added, and called once, after all PT_LOPROC
to PT_HIPROC headers have been passed to arch_elf_pt_proc but before
the code which invoked execve has been lost. This enables the
architecture code to make a decision based upon all the headers present
in an ELF binary and its interpreter, as is required to forbid
conflicting FP ABI requirements between an ELF & its interpreter.
In order to allow data to be stored throughout the calls to the above
functions, struct arch_elf_state is introduced.
Finally a variant of the SET_PERSONALITY macro is introduced which
accepts a pointer to the struct arch_elf_state, allowing it to act
based upon state observed from the architecture specific program
headers.
Signed-off-by: Paul Burton <paul.burton@imgtec.com >
Cc: linux-mips@linux-mips.org
Cc: Alexander Viro <viro@zeniv.linux.org.uk >
Cc: linux-fsdevel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7679/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org >
2014-11-24 07:45:02 +01:00
..
2014-09-24 10:25:52 +01:00
2014-09-30 13:17:14 -04:00
2014-11-18 13:23:31 +01:00
2014-10-14 12:57:02 -07:00
2014-10-15 07:05:03 +02:00
2014-08-08 15:57:26 -07:00
2014-10-15 20:31:05 +05:30
2014-09-22 16:48:47 +09:00
2014-10-09 14:58:15 -04:00
2014-08-09 09:15:07 -07:00
2014-08-25 21:47:22 +01:00
2014-11-24 07:44:59 +01:00
2014-09-09 16:01:09 -04:00
2014-11-10 15:22:02 +00:00
2014-10-06 01:04:15 -04:00
2014-10-19 12:29:23 -07:00
2014-10-03 14:18:17 +02:00
2014-10-21 13:46:03 -07:00
2014-09-15 22:20:21 +02:00
2014-09-04 19:21:45 +02:00
2014-10-19 12:50:44 -07:00
2014-10-28 03:30:21 +01:00
2014-10-13 13:05:58 +02:00
2014-09-24 11:53:39 -07:00
2014-10-18 18:11:04 -07:00
2014-10-08 12:51:44 -04:00
2014-10-28 17:26:19 -04:00
2014-10-24 11:21:43 -07:00
2014-09-16 16:28:34 -06:00
2014-08-16 08:35:34 -04:00
2014-08-23 13:05:08 -04:00
2014-09-08 10:54:03 +02:00
2014-09-09 13:58:58 +02:00
2014-08-13 10:31:57 +02:00
2014-10-22 16:14:03 -06:00
2014-09-08 10:00:43 -06:00
2014-10-09 22:26:01 -04:00
2014-10-03 15:28:18 -06:00
2014-11-16 09:55:39 +01:00
2014-10-14 09:00:44 -06:00
2014-10-18 11:53:51 -07:00
2014-11-02 14:39:35 -08:00
2014-11-13 16:17:06 -08:00
2014-09-26 15:05:15 -04:00
2014-10-01 22:12:48 -04:00
2014-09-04 22:04:42 -04:00
2014-09-24 14:23:34 +08:00
2014-09-19 09:29:32 -04:00
2014-09-27 12:52:33 -07:00
2014-09-27 12:52:33 -07:00
2014-10-15 07:05:03 +02:00
2014-10-22 16:14:03 -06:00
2014-10-27 13:00:55 +01:00
2014-09-29 14:36:26 -04:00
2014-10-09 22:25:54 -04:00
2014-10-28 11:03:40 +01:00
2014-10-28 11:03:40 +01:00
2014-09-18 16:22:27 -07:00
2014-10-21 00:51:01 +02:00
2014-10-21 00:51:01 +02:00
2014-08-28 08:58:57 -04:00
2014-10-10 07:24:40 -04:00
2014-10-22 16:14:04 -06:00
2014-09-27 09:14:59 -06:00
2014-10-12 17:09:06 -04:00
2014-09-23 22:53:15 -07:00
2014-10-15 07:23:49 +02:00
2014-08-26 07:39:13 +02:00
2014-10-18 18:11:04 -07:00
2014-10-02 12:12:25 +02:00
2014-10-03 14:55:48 -07:00
2014-09-29 00:04:55 -04:00
2014-10-03 18:41:03 +01:00
2014-11-24 07:45:02 +01:00
2014-09-05 17:47:02 -07:00
2014-09-05 12:12:20 -07:00
2014-09-23 11:10:20 -07:00
2014-09-26 15:05:15 -04:00
2014-09-08 09:51:30 +09:00
2014-10-09 11:35:48 +03:00
2014-10-08 16:01:41 -04:00
2014-10-31 06:33:26 -04:00
2014-09-03 18:02:55 -05:00
2014-10-15 21:31:27 +05:30
2014-08-09 17:33:44 -07:00
2014-09-10 10:48:45 -04:00
2014-10-09 22:25:52 -04:00
2014-10-14 17:03:53 -04:00
2014-10-09 22:25:55 -04:00
2014-09-13 11:24:03 -07:00
2014-10-06 23:34:40 +02:00
2014-10-09 22:25:57 -04:00
2014-09-25 16:07:15 +02:00
2014-09-11 12:21:18 +02:00
2014-09-29 15:37:01 -04:00
2014-08-11 12:16:51 -07:00
2014-09-04 22:26:14 -07:00
2014-09-09 10:28:43 -04:00
2014-11-14 17:08:58 -05:00
2014-09-07 16:27:34 -07:00
2014-09-01 13:48:59 +02:00
2014-10-15 07:23:49 +02:00
2014-09-04 14:41:43 -06:00
2014-09-23 23:13:13 -07:00
2014-09-13 18:38:15 +02:00
2014-09-01 13:48:51 +02:00
2014-10-09 16:07:43 -04:00
2014-09-18 00:58:12 -04:00
2014-09-12 13:59:03 -07:00
2014-08-10 09:00:16 +02:00
2014-11-16 10:04:18 +01:00
2014-10-23 14:45:09 -07:00
2014-10-14 15:05:34 -04:00
2014-10-14 02:18:21 +02:00
2014-09-16 17:36:08 +01:00
2014-09-09 10:34:56 +02:00
2014-10-22 16:14:04 -06:00
2014-10-29 16:33:14 -07:00
2014-10-24 13:30:47 +02:00
2014-08-29 16:35:53 +02:00
2014-09-12 14:01:54 -07:00
2014-09-23 10:02:31 -04:00
2014-10-14 02:18:13 +02:00
2014-10-13 15:51:40 +02:00
2014-10-08 10:39:41 +05:30
2014-10-08 10:39:41 +05:30
2014-09-29 11:56:02 -04:00
2014-10-29 16:33:15 -07:00
2014-10-09 22:25:52 -04:00
2014-10-22 16:14:04 -06:00
2014-10-09 22:25:56 -04:00
2014-10-10 15:35:13 -04:00
2014-10-09 22:26:01 -04:00
2014-10-29 16:33:14 -07:00
2014-10-09 22:25:58 -04:00
2014-09-24 14:07:58 +02:00
2014-11-13 16:17:05 -08:00
2014-10-14 02:18:28 +02:00
2014-10-24 00:14:36 +02:00
2014-10-01 12:21:23 -06:00
2014-08-13 10:32:03 +02:00
2014-10-15 12:11:00 -04:00
2014-09-26 18:42:31 +02:00
2014-08-25 10:45:28 +02:00
2014-09-30 16:24:56 -04:00
2014-09-30 16:24:56 -04:00
2014-10-18 11:53:51 -07:00
2014-08-22 18:04:43 -04:00
2014-11-12 14:22:51 -05:00
2014-10-14 02:18:27 +02:00
2014-09-30 17:08:40 -06:00
2014-09-30 17:08:57 -06:00
2014-10-29 16:33:14 -07:00
2014-11-04 10:19:48 +00:00
2014-09-18 09:53:25 -07:00
2014-10-21 23:44:21 +02:00
2014-11-13 16:17:05 -08:00
2014-10-09 22:26:01 -04:00
2014-09-12 20:09:52 -06:00
2014-10-15 06:58:16 +02:00
2014-11-05 13:06:16 -07:00
2014-10-09 15:03:49 -04:00
2014-09-08 09:51:29 +09:00
2014-08-26 13:45:56 -04:00
2014-11-23 12:36:06 -05:00
2014-09-02 14:46:05 -04:00
2014-08-24 08:11:09 -03:00
2014-10-07 13:06:45 -04:00
2014-08-23 11:39:09 -07:00
2014-10-08 10:39:33 +05:30
2014-11-11 22:28:44 +01:00
2014-09-25 01:18:33 +02:00
2014-10-07 01:18:12 +02:00
2014-10-19 20:22:32 +03:00
2014-10-28 03:30:19 +01:00
2014-08-13 15:13:44 +10:00
2014-09-17 16:33:11 -04:00
2014-09-08 09:51:30 +09:00
2014-08-24 18:36:01 -07:00
2014-10-14 02:18:21 +02:00
2014-10-28 18:25:17 -04:00
2014-09-07 16:27:35 -07:00
2014-09-26 00:00:06 -07:00
2014-09-03 20:56:32 -07:00
2014-11-10 16:45:43 -05:00
2014-10-09 22:25:57 -04:00
2014-09-13 12:30:26 -04:00
2014-08-13 10:32:03 +02:00
2014-08-08 15:57:26 -07:00
2014-10-13 16:23:15 +02:00
2014-10-09 22:26:04 -04:00
2014-09-03 14:58:17 -07:00
2014-10-12 10:13:55 -04:00
2014-09-19 12:35:16 +02:00
2014-08-28 11:59:38 +05:30
2014-09-29 18:20:38 -07:00
2014-09-26 18:01:56 +02:00
2014-08-08 15:57:26 -07:00
2014-08-08 15:57:31 -07:00
2014-10-14 02:18:20 +02:00
2014-10-30 19:58:30 -04:00
2014-10-09 22:25:51 -04:00
2014-10-09 22:25:50 -04:00
2014-09-19 12:35:15 +02:00
2014-11-05 15:52:45 -05:00
2014-08-13 10:32:38 +02:00
2014-10-14 02:18:26 +02:00
2014-10-24 12:33:32 -07:00
2014-09-30 21:06:07 +02:00
2014-10-09 22:25:59 -04:00
2014-09-26 15:05:14 -04:00
2014-09-27 09:14:59 -06:00
2014-10-08 21:40:54 -04:00
2014-10-10 14:02:25 +08:00
2014-09-26 08:15:29 +01:00
2014-10-14 03:47:00 +02:00
2014-10-09 22:25:51 -04:00
2014-09-16 13:41:06 -07:00
2014-09-10 10:48:46 -04:00
2014-09-23 21:19:35 -07:00
2014-09-25 12:17:25 +02:00
2014-09-01 21:36:28 -07:00
2014-10-02 21:35:54 -07:00
2014-10-09 02:39:03 -04:00
2014-10-22 16:14:04 -06:00
2014-09-23 21:40:48 -07:00
2014-09-25 17:05:12 +02:00
2014-09-18 19:21:20 -04:00
2014-09-16 15:02:55 -06:00
2014-10-15 10:25:01 +10:30
2014-10-15 10:24:56 +10:30
2014-10-09 22:26:01 -04:00
2014-10-13 16:23:15 +02:00
2014-10-20 20:46:25 +02:00
2014-09-13 05:13:08 +09:00
2014-08-08 15:57:26 -07:00
2014-10-09 22:26:02 -04:00