<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/mips/include/asm/elf.h, branch linux-4.8.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.8.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-08-02T07:29:27Z</updated>
<entry>
<title>MIPS: non-exec stack &amp; heap when non-exec PT_GNU_STACK is present</title>
<updated>2016-08-02T07:29:27Z</updated>
<author>
<name>Paul Burton</name>
</author>
<published>2016-07-08T10:06:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1a770b85c1f1c1ee37afd7cef5237ffc4c970f04'/>
<id>urn:sha1:1a770b85c1f1c1ee37afd7cef5237ffc4c970f04</id>
<content type='text'>
The stack and heap have both been executable by default on MIPS until
now. This patch changes the default to be non-executable, but only for
ELF binaries with a non-executable PT_GNU_STACK header present. This
does apply to both the heap &amp; the stack, despite the name PT_GNU_STACK,
and this matches the behaviour of other architectures like ARM &amp; x86.

Current MIPS toolchains do not produce the PT_GNU_STACK header, which
means that we can rely upon this patch not changing the behaviour of
existing binaries. The new default will only take effect for newly
compiled binaries once toolchains are updated to support PT_GNU_STACK,
and since those binaries are newly compiled they can be compiled
expecting the change in default behaviour. Again this matches the way in
which the ARM &amp; x86 architectures handled their implementations of
non-executable memory.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Cc: Leonid Yegoshin &lt;leonid.yegoshin@imgtec.com&gt;
Cc: Maciej Rozycki &lt;maciej.rozycki@imgtec.com&gt;
Cc: Faraz Shahbazker &lt;faraz.shahbazker@imgtec.com&gt;
Cc: Raghu Gandham &lt;raghu.gandham@imgtec.com&gt;
Cc: Matthew Fortune &lt;matthew.fortune@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13765/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO</title>
<updated>2016-07-28T10:06:16Z</updated>
<author>
<name>James Hogan</name>
</author>
<published>2016-07-25T15:59:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=233b2ca181f20674ecad11be90b00814911ce345'/>
<id>urn:sha1:233b2ca181f20674ecad11be90b00814911ce345</id>
<content type='text'>
AT_VECTOR_SIZE_ARCH should be defined with the maximum number of
NEW_AUX_ENT entries that ARCH_DLINFO can contain, but it wasn't defined
for MIPS at all even though ARCH_DLINFO will contain one NEW_AUX_ENT for
the VDSO address.

This shouldn't be a problem as AT_VECTOR_SIZE_BASE includes space for
AT_BASE_PLATFORM which MIPS doesn't use, but lets define it now and add
the comment above ARCH_DLINFO as found in several other architectures to
remind future modifiers of ARCH_DLINFO to keep AT_VECTOR_SIZE_ARCH up to
date.

Fixes: ebb5e78cc634 ("MIPS: Initial implementation of a VDSO")
Signed-off-by: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-arch@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/13823/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: ELF: Unify ABI classification macros</title>
<updated>2016-05-13T13:30:25Z</updated>
<author>
<name>Maciej W. Rozycki</name>
</author>
<published>2016-05-13T06:21:40Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c9babb1926852d88ebee3c27f2b8bac848560c0e'/>
<id>urn:sha1:c9babb1926852d88ebee3c27f2b8bac848560c0e</id>
<content type='text'>
Remove a duplicate o32 `elf_check_arch' implementation, move all macro
variants to &lt;asm/elf.h&gt; and define them unconditionally under indvidual
names, substituting alias `elf_check_arch' definitions in variant code.

Signed-off-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13245/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: ELF: Unify __MIPS_O32_FP64_MUST_BE_ZERO definitions</title>
<updated>2016-05-13T13:30:25Z</updated>
<author>
<name>Maciej W. Rozycki</name>
</author>
<published>2016-05-13T06:20:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4a60ad51d660200adcb8bfecda472f0179ff22ec'/>
<id>urn:sha1:4a60ad51d660200adcb8bfecda472f0179ff22ec</id>
<content type='text'>
Signed-off-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13244/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: ELF: Deconditionalise ABI flags definitions</title>
<updated>2016-05-13T13:30:25Z</updated>
<author>
<name>Maciej W. Rozycki</name>
</author>
<published>2016-05-13T06:20:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=de704161aa05a594fcd596cb7f50e231c384355e'/>
<id>urn:sha1:de704161aa05a594fcd596cb7f50e231c384355e</id>
<content type='text'>
Move the `mips_elf_abiflags_v0' structure and FP ABI flag macros outside
#ifndef ELF_ARCH.  These are public interfaces.

Signed-off-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13243/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: ELF: Restructure personality macros</title>
<updated>2016-05-13T12:02:11Z</updated>
<author>
<name>Maciej W. Rozycki</name>
</author>
<published>2015-11-13T00:48:39Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2e5832ab589459265e70163a7dea3abdc1429eb7'/>
<id>urn:sha1:2e5832ab589459265e70163a7dea3abdc1429eb7</id>
<content type='text'>
Update the ELF personality macros used for individual ABIs to make
actions in the same order across all of them and match formatting too.

Signed-off-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Matthew Fortune &lt;Matthew.Fortune@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Support R_MIPS_PC{21,26} rela-style relocs</title>
<updated>2016-05-13T12:01:54Z</updated>
<author>
<name>Paul Burton</name>
</author>
<published>2016-02-04T13:05:04Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ad8319ea4647c897c837643a611714a83d8f6a0f'/>
<id>urn:sha1:ad8319ea4647c897c837643a611714a83d8f6a0f</id>
<content type='text'>
MIPS64 code uses rela-style relocs, and MIPS64r6 modules may include the
new R_MIPS_PC21 &amp; R_MIPS_PC26 relocations. We thus need to support these
relocations in order to load MIPS64r6 kernel modules. They are similar
to the existing R_MIPS_PC16 relocation but applying to a wider field.
Implement support for them by genericising the existing R_MIPS_PC16
implementation such that it can be used for different field widths, and
calling it for all 3 reloc types.

Signed-off-by: Paul Burton &lt;paul.burton@imgtec.com&gt;
Cc: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Cc: Kees Cook &lt;keescook@chromium.org&gt;
Cc: James Hogan &lt;james.hogan@imgtec.com&gt;
Cc: Alex Smith &lt;alex.smith@imgtec.com&gt;
Cc: Steven J. Hill &lt;sjhill@realitydiluted.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/12434/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>mips: Differentiate between 32 and 64 bit ELF header</title>
<updated>2016-02-11T10:38:22Z</updated>
<author>
<name>Daniel Wagner</name>
</author>
<published>2016-02-10T09:21:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f4d3d504198d464e406171cfa554a59bd4773d79'/>
<id>urn:sha1:f4d3d504198d464e406171cfa554a59bd4773d79</id>
<content type='text'>
Depending on the configuration either the 32 or 64 bit version of
elf_check_arch() is defined. parse_crash_elf{32|64}_headers() does
some basic verification of the ELF header via
vmcore_elf{32|64}_check_arch() which happen to map to elf_check_arch().
Since the implementation 32 and 64 bit version of elf_check_arch()
differ, we use the wrong type:

   In file included from include/linux/elf.h:4:0,
                    from fs/proc/vmcore.c:13:
   fs/proc/vmcore.c: In function 'parse_crash_elf64_headers':
&gt;&gt; arch/mips/include/asm/elf.h:228:23: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
     struct elfhdr *__h = (hdr);     \
                          ^
   include/linux/crash_dump.h:41:37: note: in expansion of macro 'elf_check_arch'
    #define vmcore_elf64_check_arch(x) (elf_check_arch(x) || vmcore_elf_check_arch_cross(x))
                                        ^
   fs/proc/vmcore.c:1015:4: note: in expansion of macro 'vmcore_elf64_check_arch'
      !vmcore_elf64_check_arch(&amp;ehdr) ||
       ^

Therefore, we rather define vmcore_elf{32|64}_check_arch() as a
basic machine check and use it also in binfm_elf?32.c as well.

Signed-off-by: Daniel Wagner &lt;daniel.wagner@bmw-carit.de&gt;
Suggested-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Reviewed-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Reported-by: Fengguang Wu &lt;fengguang.wu@intel.com&gt;
Cc: linux-kernel@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/12529/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: Add IEEE Std 754 conformance mode selection</title>
<updated>2016-01-19T23:39:20Z</updated>
<author>
<name>Maciej W. Rozycki</name>
</author>
<published>2015-11-13T00:48:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=503943e0e52bd3fbf014aa1d838ced37adb43121'/>
<id>urn:sha1:503943e0e52bd3fbf014aa1d838ced37adb43121</id>
<content type='text'>
Add an `ieee754=' kernel parameter to control IEEE Std 754 conformance
mode.

Use separate flags copied from the respective CPU feature flags, and
adjusted according to the conformance mode selected, to make binaries
requesting individual NaN encoding modes accepted or rejected as needed.
Update the initial setting for FCSR and, in the full FPU emulation mode,
its read-only mask accordingly.  Accept the mode selection requested for
legacy processors as well.

As with the EF_MIPS_NAN2008 ELF file header flag adjust both ABS2008 and
NAN2008 bits at the same time, to match the choice made for hardware
currently implemented.

Signed-off-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Matthew Fortune &lt;Matthew.Fortune@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11481/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
<entry>
<title>MIPS: ELF: Interpret the NAN2008 file header flag</title>
<updated>2016-01-19T23:39:20Z</updated>
<author>
<name>Maciej W. Rozycki</name>
</author>
<published>2015-11-13T00:48:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2b5e869ecfcb3112f7e1267cb0328f3ff6d49b18'/>
<id>urn:sha1:2b5e869ecfcb3112f7e1267cb0328f3ff6d49b18</id>
<content type='text'>
Handle the EF_MIPS_NAN2008 ELF file header flag and refuse execution
where there is no support in the FPU for the NaN encoding mode requested
by a binary invoked.  Ensure that the setting of the bit in the binary
matches one in any intepreter used.  Set the thread's initial FCSR
contents according to the value of the EF_MIPS_NAN2008.

Set the values of the FCSR ABS2008 and NAN2008 bits both to the same
value if possible, to take the approach taken with existing FPU hardware
into account.  As of now all implementations have both bits hardwired to
the same value, that is both are fixed at 0 or both are fixed at 1, even
though the architecture allows for implementations where the amount of
control implemented with each of these two individual bits is
independent of each other.

Signed-off-by: Maciej W. Rozycki &lt;macro@imgtec.com&gt;
Cc: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Cc: Matthew Fortune &lt;Matthew.Fortune@imgtec.com&gt;
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/11479/
Signed-off-by: Ralf Baechle &lt;ralf@linux-mips.org&gt;
</content>
</entry>
</feed>
