* 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
@ 2015-01-16 17:59 Manuel Lauss
2015-01-16 18:06 ` Manuel Lauss
0 siblings, 1 reply; 13+ messages in thread
From: Manuel Lauss @ 2015-01-16 17:59 UTC (permalink / raw)
To: Paul Burton, Linux-MIPS; +Cc: Ralf Baechle, Matthew Fortune
Hi Paul,
Your patch commit 90cee759f08a6b7a8daab9977d3e163ebbcac220
("MIPS: ELF: Set FP mode according to .MIPS.abiflags") completely
breaks my pure soft-float o32 userland:
[...]
Freeing unused kernel memory: 244K (80993000 - 809d0000)
Failed to execute /usr/lib/systemd/systemd (error -84). Attempting defaults...
Starting init: /sbin/init exists but couldn't execute it (error -84)
sh: cannot set terminal process group (-1): Inappropriate ioctl for device
sh: no job control in this shell
sh-4.3# ls
sh: /bin/ls: Accessing a corrupted shared library
sh-4.3#
I've recently rebuilt bash, ncurses, readline and glibc-2.20 (with
binutils 2.25+)
to track down another userland issue, so that may explain why at least
sh is able to run.
Reverting the patch fixes it for me.
Thanks!
Manuel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-16 17:59 3.18+: soft-float userland unusable due to .MIPS.abiflags patch Manuel Lauss
@ 2015-01-16 18:06 ` Manuel Lauss
2015-01-16 19:12 ` Matthew Fortune
0 siblings, 1 reply; 13+ messages in thread
From: Manuel Lauss @ 2015-01-16 18:06 UTC (permalink / raw)
To: Paul Burton, Linux-MIPS; +Cc: Ralf Baechle, Matthew Fortune
On Fri, Jan 16, 2015 at 6:59 PM, Manuel Lauss <manuel.lauss@gmail.com> wrote:
> Hi Paul,
>
> Your patch commit 90cee759f08a6b7a8daab9977d3e163ebbcac220
> ("MIPS: ELF: Set FP mode according to .MIPS.abiflags") completely
> breaks my pure soft-float o32 userland:
>
> [...]
> Freeing unused kernel memory: 244K (80993000 - 809d0000)
> Failed to execute /usr/lib/systemd/systemd (error -84). Attempting defaults...
> Starting init: /sbin/init exists but couldn't execute it (error -84)
> sh: cannot set terminal process group (-1): Inappropriate ioctl for device
> sh: no job control in this shell
> sh-4.3# ls
> sh: /bin/ls: Accessing a corrupted shared library
> sh-4.3#
>
> I've recently rebuilt bash, ncurses, readline and glibc-2.20 (with
> binutils 2.25+)
> to track down another userland issue, so that may explain why at least
> sh is able to run.
Although ls and all its dependencies have the following soft-float abi tag:
Displaying notes found at file offset 0x00000164 with length 0x00000020:
Owner Data size Description
GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
OS: Linux, ABI: 2.6.32
Attribute Section: gnu
File Attributes
Tag_GNU_MIPS_ABI_FP: Soft float
Manuel
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-16 18:06 ` Manuel Lauss
@ 2015-01-16 19:12 ` Matthew Fortune
2015-01-16 20:01 ` Manuel Lauss
0 siblings, 1 reply; 13+ messages in thread
From: Matthew Fortune @ 2015-01-16 19:12 UTC (permalink / raw)
To: Manuel Lauss, Paul Burton, Linux-MIPS; +Cc: Ralf Baechle
> On Fri, Jan 16, 2015 at 6:59 PM, Manuel Lauss <manuel.lauss@gmail.com>
> wrote:
> > Hi Paul,
> >
> > Your patch commit 90cee759f08a6b7a8daab9977d3e163ebbcac220
> > ("MIPS: ELF: Set FP mode according to .MIPS.abiflags") completely
> > breaks my pure soft-float o32 userland:
> >
> > [...]
> > Freeing unused kernel memory: 244K (80993000 - 809d0000) Failed to
> > execute /usr/lib/systemd/systemd (error -84). Attempting defaults...
> > Starting init: /sbin/init exists but couldn't execute it (error -84)
> > sh: cannot set terminal process group (-1): Inappropriate ioctl for
> > device
> > sh: no job control in this shell
> > sh-4.3# ls
> > sh: /bin/ls: Accessing a corrupted shared library sh-4.3#
> >
> > I've recently rebuilt bash, ncurses, readline and glibc-2.20 (with
> > binutils 2.25+) to track down another userland issue, so that may
> > explain why at least sh is able to run.
>
> Although ls and all its dependencies have the following soft-float abi
> tag:
> Displaying notes found at file offset 0x00000164 with length 0x00000020:
> Owner Data size Description
> GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
> OS: Linux, ABI: 2.6.32
> Attribute Section: gnu
> File Attributes
> Tag_GNU_MIPS_ABI_FP: Soft float
Can you provide the output of readelf -hl for 'ls', 'init' and whatever is
listed as the interpreter for those executables in the header output shown
like:
INTERP 0x0000000000000238 0x0000000000400238 0x0000000000400238
0x000000000000001c 0x000000000000001c R 1
[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
Thanks,
Matthew
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-16 19:12 ` Matthew Fortune
@ 2015-01-16 20:01 ` Manuel Lauss
2015-01-16 20:04 ` Manuel Lauss
0 siblings, 1 reply; 13+ messages in thread
From: Manuel Lauss @ 2015-01-16 20:01 UTC (permalink / raw)
To: Matthew Fortune; +Cc: Paul Burton, Linux-MIPS, Ralf Baechle
On Fri, Jan 16, 2015 at 8:12 PM, Matthew Fortune
<Matthew.Fortune@imgtec.com> wrote:
>> On Fri, Jan 16, 2015 at 6:59 PM, Manuel Lauss <manuel.lauss@gmail.com>
>> wrote:
>> > Hi Paul,
>> >
>> > Your patch commit 90cee759f08a6b7a8daab9977d3e163ebbcac220
>> > ("MIPS: ELF: Set FP mode according to .MIPS.abiflags") completely
>> > breaks my pure soft-float o32 userland:
>> >
>> > [...]
>> > Freeing unused kernel memory: 244K (80993000 - 809d0000) Failed to
>> > execute /usr/lib/systemd/systemd (error -84). Attempting defaults...
>> > Starting init: /sbin/init exists but couldn't execute it (error -84)
>> > sh: cannot set terminal process group (-1): Inappropriate ioctl for
>> > device
>> > sh: no job control in this shell
>> > sh-4.3# ls
>> > sh: /bin/ls: Accessing a corrupted shared library sh-4.3#
>> >
>> > I've recently rebuilt bash, ncurses, readline and glibc-2.20 (with
>> > binutils 2.25+) to track down another userland issue, so that may
>> > explain why at least sh is able to run.
>>
>> Although ls and all its dependencies have the following soft-float abi
>> tag:
>> Displaying notes found at file offset 0x00000164 with length 0x00000020:
>> Owner Data size Description
>> GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
>> OS: Linux, ABI: 2.6.32
>> Attribute Section: gnu
>> File Attributes
>> Tag_GNU_MIPS_ABI_FP: Soft float
>
> Can you provide the output of readelf -hl for 'ls', 'init' and whatever is
> listed as the interpreter for those executables in the header output shown
> like:
>
> INTERP 0x0000000000000238 0x0000000000400238 0x0000000000400238
> 0x000000000000001c 0x000000000000001c R 1
> [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
Here's the output, identical on all tested binaries and libs:
# readelf -hl /bin/ls
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: EXEC (Executable file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x403f20
Start of program headers: 52 (bytes into file)
Start of section headers: 131784 (bytes into file)
Flags: 0x50001005, noreorder, cpic, o32, mips32
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 9
Size of section headers: 40 (bytes)
Number of section headers: 33
Section header string table index: 32
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000034 0x00400034 0x00400034 0x00120 0x00120 R E 0x4
INTERP 0x000154 0x00400154 0x00400154 0x0000d 0x0000d R 0x1
[Requesting program interpreter: /lib/ld.so.1]
REGINFO 0x000184 0x00400184 0x00400184 0x00018 0x00018 R 0x4
LOAD 0x000000 0x00400000 0x00400000 0x1d290 0x1d290 R E 0x10000
LOAD 0x01e000 0x0042e000 0x0042e000 0x00378 0x00fb0 RW 0x10000
DYNAMIC 0x00019c 0x0040019c 0x0040019c 0x00140 0x00140 R 0x4
NOTE 0x000164 0x00400164 0x00400164 0x00020 0x00020 R 0x4
GNU_EH_FRAME 0x01cb30 0x0041cb30 0x0041cb30 0x0002c 0x0002c R 0x4
NULL 0x000000 0x00000000 0x00000000 0x00000 0x00000 0x4
Section to Segment mapping:
Segment Sections...
00
01 .interp
02 .reginfo
03 .interp .note.ABI-tag .reginfo .dynamic .hash .dynsym
.dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .text
.MIPS.stubs .fini .rodata .eh_frame_hdr .eh_frame .plt
04 .init_array .fini_array .jcr .got.plt .data .rld_map .got .sdata .bss
05 .dynamic
06 .note.ABI-tag
07 .eh_frame_hdr
08
# readelf -hl /usr/lib/systemd/systemd
ELF Header:
Magic: 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00
Class: ELF32
Data: 2's complement, little endian
Version: 1 (current)
OS/ABI: UNIX - System V
ABI Version: 0
Type: DYN (Shared object file)
Machine: MIPS R3000
Version: 0x1
Entry point address: 0x165a0
Start of program headers: 52 (bytes into file)
Start of section headers: 1574780 (bytes into file)
Flags: 0x50001005, noreorder, cpic, o32, mips32
Size of this header: 52 (bytes)
Size of program headers: 32 (bytes)
Number of program headers: 10
Size of section headers: 40 (bytes)
Number of section headers: 32
Section header string table index: 31
Program Headers:
Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align
PHDR 0x000034 0x00000034 0x00000034 0x00140 0x00140 R 0x4
INTERP 0x000174 0x00000174 0x00000174 0x0000d 0x0000d R 0x1
[Requesting program interpreter: /lib/ld.so.1]
LOAD 0x000000 0x00000000 0x00000000 0x148bf8 0x148bf8 R E 0x10000
LOAD 0x14ef68 0x0015ef68 0x0015ef68 0x1a788 0x1b06c RW 0x10000
NULL 0x000000 0x00000000 0x00000000 0x00000 0x00000 0
DYNAMIC 0x15feb0 0x0016feb0 0x0016feb0 0x00150 0x00150 RW 0x4
NOTE 0x000184 0x00000184 0x00000184 0x00020 0x00020 R 0x4
GNU_EH_FRAME 0x148bd4 0x00148bd4 0x00148bd4 0x00024 0x00024 R 0x4
TLS 0x14ef68 0x0015ef68 0x0015ef68 0x00008 0x00061 R 0x8
GNU_RELRO 0x14ef68 0x0015ef68 0x0015ef68 0x11098 0x11098 RW 0x8
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-16 20:01 ` Manuel Lauss
@ 2015-01-16 20:04 ` Manuel Lauss
2015-01-16 20:36 ` Matthew Fortune
0 siblings, 1 reply; 13+ messages in thread
From: Manuel Lauss @ 2015-01-16 20:04 UTC (permalink / raw)
To: Matthew Fortune; +Cc: Paul Burton, Linux-MIPS, Ralf Baechle
On Fri, Jan 16, 2015 at 9:01 PM, Manuel Lauss <manuel.lauss@gmail.com> wrote:
> On Fri, Jan 16, 2015 at 8:12 PM, Matthew Fortune
> <Matthew.Fortune@imgtec.com> wrote:
>>> On Fri, Jan 16, 2015 at 6:59 PM, Manuel Lauss <manuel.lauss@gmail.com>
>>> wrote:
>>> > Hi Paul,
>>> >
>>> > Your patch commit 90cee759f08a6b7a8daab9977d3e163ebbcac220
>>> > ("MIPS: ELF: Set FP mode according to .MIPS.abiflags") completely
>>> > breaks my pure soft-float o32 userland:
>>> >
>>> > [...]
>>> > Freeing unused kernel memory: 244K (80993000 - 809d0000) Failed to
>>> > execute /usr/lib/systemd/systemd (error -84). Attempting defaults...
>>> > Starting init: /sbin/init exists but couldn't execute it (error -84)
>>> > sh: cannot set terminal process group (-1): Inappropriate ioctl for
>>> > device
>>> > sh: no job control in this shell
>>> > sh-4.3# ls
>>> > sh: /bin/ls: Accessing a corrupted shared library sh-4.3#
>>> >
>>> > I've recently rebuilt bash, ncurses, readline and glibc-2.20 (with
>>> > binutils 2.25+) to track down another userland issue, so that may
>>> > explain why at least sh is able to run.
>>>
>>> Although ls and all its dependencies have the following soft-float abi
>>> tag:
>>> Displaying notes found at file offset 0x00000164 with length 0x00000020:
>>> Owner Data size Description
>>> GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag)
>>> OS: Linux, ABI: 2.6.32
>>> Attribute Section: gnu
>>> File Attributes
>>> Tag_GNU_MIPS_ABI_FP: Soft float
>>
>> Can you provide the output of readelf -hl for 'ls', 'init' and whatever is
>> listed as the interpreter for those executables in the header output shown
>> like:
>>
>> INTERP 0x0000000000000238 0x0000000000400238 0x0000000000400238
>> 0x000000000000001c 0x000000000000001c R 1
>> [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
I noticed that /bin/sh does have a .MIPS.abiflags section while systemd
and ls do not. Maybe that's the issue here?
Section to Segment mapping:
Segment Sections...
00
01 .interp
02 .MIPS.abiflags
Manuel
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-16 20:04 ` Manuel Lauss
@ 2015-01-16 20:36 ` Matthew Fortune
2015-01-17 16:38 ` Aaro Koskinen
0 siblings, 1 reply; 13+ messages in thread
From: Matthew Fortune @ 2015-01-16 20:36 UTC (permalink / raw)
To: Manuel Lauss; +Cc: Paul Burton, Linux-MIPS, Ralf Baechle
Manuel Lauss <manuel.lauss@gmail.com> writes:
> On Fri, Jan 16, 2015 at 9:01 PM, Manuel Lauss <manuel.lauss@gmail.com>
> wrote:
> > On Fri, Jan 16, 2015 at 8:12 PM, Matthew Fortune
> > <Matthew.Fortune@imgtec.com> wrote:
> >>> On Fri, Jan 16, 2015 at 6:59 PM, Manuel Lauss
> >>> <manuel.lauss@gmail.com>
> >>> wrote:
> >>> > Hi Paul,
> >>> >
> >>> > Your patch commit 90cee759f08a6b7a8daab9977d3e163ebbcac220
> >>> > ("MIPS: ELF: Set FP mode according to .MIPS.abiflags") completely
> >>> > breaks my pure soft-float o32 userland:
> >>> >
> >>> > [...]
> >>> > Freeing unused kernel memory: 244K (80993000 - 809d0000) Failed to
> >>> > execute /usr/lib/systemd/systemd (error -84). Attempting
> defaults...
> >>> > Starting init: /sbin/init exists but couldn't execute it (error
> >>> > -84)
> >>> > sh: cannot set terminal process group (-1): Inappropriate ioctl
> >>> > for device
> >>> > sh: no job control in this shell
> >>> > sh-4.3# ls
> >>> > sh: /bin/ls: Accessing a corrupted shared library sh-4.3#
> >>> >
> >>> > I've recently rebuilt bash, ncurses, readline and glibc-2.20 (with
> >>> > binutils 2.25+) to track down another userland issue, so that may
> >>> > explain why at least sh is able to run.
> >>>
> >>> Although ls and all its dependencies have the following soft-float
> >>> abi
> >>> tag:
> >>> Displaying notes found at file offset 0x00000164 with length
> 0x00000020:
> >>> Owner Data size Description
> >>> GNU 0x00000010 NT_GNU_ABI_TAG (ABI version
> tag)
> >>> OS: Linux, ABI: 2.6.32
> >>> Attribute Section: gnu
> >>> File Attributes
> >>> Tag_GNU_MIPS_ABI_FP: Soft float
> >>
> >> Can you provide the output of readelf -hl for 'ls', 'init' and
> >> whatever is listed as the interpreter for those executables in the
> >> header output shown
> >> like:
> >>
> >> INTERP 0x0000000000000238 0x0000000000400238
> 0x0000000000400238
> >> 0x000000000000001c 0x000000000000001c R 1
> >> [Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]
>
>
> I noticed that /bin/sh does have a .MIPS.abiflags section while systemd
> and ls do not. Maybe that's the issue here?
>
> Section to Segment mapping:
> Segment Sections...
> 00
> 01 .interp
> 02 .MIPS.abiflags
It is the ABIFLAGS program header that I am focussed on but the presence of
a .MIPS.abiflags section is a strong indicator that there will be an
ABIFLAGS pheader. The key is in the readelf output for the interpreter i.e.
/lib/ld.so.1. I would expect it has the ABIFLAGS header too given you
said that you recently rebuilt glibc.
You are right that it is the .MIPS.abiflags patch that is causing your
trouble. For a long time I had to put a restriction in the ABI plan that
soft-float binaries without an ABIFLAGS pheader could not be linked against
soft-float binaries with an ABIFLAGS pheader. We have since found a way to
relax that restriction without reducing the effectiveness of the new
compatibility checks. I would need to check the code in the kernel but I
suspect that is the issue. Markos has done a significant update to this
piece of code which he posted earlier today. That updated version should
allow the combination of soft-float without ABIFLAGS and soft-float with
ABIFLAGS.
Matthew
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-16 20:36 ` Matthew Fortune
@ 2015-01-17 16:38 ` Aaro Koskinen
2015-01-17 19:00 ` Matthew Fortune
0 siblings, 1 reply; 13+ messages in thread
From: Aaro Koskinen @ 2015-01-17 16:38 UTC (permalink / raw)
To: Matthew Fortune; +Cc: Manuel Lauss, Paul Burton, Linux-MIPS, Ralf Baechle
On Fri, Jan 16, 2015 at 08:36:12PM +0000, Matthew Fortune wrote:
> You are right that it is the .MIPS.abiflags patch that is causing your
> trouble. For a long time I had to put a restriction in the ABI plan that
> soft-float binaries without an ABIFLAGS pheader could not be linked against
> soft-float binaries with an ABIFLAGS pheader. We have since found a way to
> relax that restriction without reducing the effectiveness of the new
> compatibility checks. I would need to check the code in the kernel but I
> suspect that is the issue. Markos has done a significant update to this
> piece of code which he posted earlier today. That updated version should
> allow the combination of soft-float without ABIFLAGS and soft-float with
> ABIFLAGS.
Are you referring to the series with 70 patches? I think a fix that passes
stable kernel rules is needed.
A.
^ permalink raw reply [flat|nested] 13+ messages in thread
* RE: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-17 16:38 ` Aaro Koskinen
@ 2015-01-17 19:00 ` Matthew Fortune
2015-01-18 10:35 ` Manuel Lauss
0 siblings, 1 reply; 13+ messages in thread
From: Matthew Fortune @ 2015-01-17 19:00 UTC (permalink / raw)
To: Aaro Koskinen; +Cc: Manuel Lauss, Paul Burton, Linux-MIPS, Ralf Baechle
Aaro Koskinen <aaro.koskinen@iki.fi> writes:
> On Fri, Jan 16, 2015 at 08:36:12PM +0000, Matthew Fortune wrote:
> > You are right that it is the .MIPS.abiflags patch that is causing your
> > trouble. For a long time I had to put a restriction in the ABI plan
> > that soft-float binaries without an ABIFLAGS pheader could not be
> > linked against soft-float binaries with an ABIFLAGS pheader. We have
> > since found a way to relax that restriction without reducing the
> > effectiveness of the new compatibility checks. I would need to check
> > the code in the kernel but I suspect that is the issue. Markos has
> > done a significant update to this piece of code which he posted
> > earlier today. That updated version should allow the combination of
> > soft-float without ABIFLAGS and soft-float with ABIFLAGS.
>
> Are you referring to the series with 70 patches? I think a fix that
> passes stable kernel rules is needed.
Yes it was just one patch though for this issue:
[PATCH RFC v2 68/70] MIPS: kernel: elf: Improve the overall ABI and FPU
mode checks
I wasn't trying to suggest how to fix the existing code just explaining
how it came to be and what has been done about it for next release.
(I'm not a kernel developer I'm just interested as I did most of the
design work for the new ABI extensions.)
I guess there are three options:
a) revert the patch - That would remove the new ABI safety measures from
3.19 which is a shame given it has MSA support in it (I think anyway).
equally given that the new prctl FPU mode options did not make 3.19
then I suppose it doesn't lose too much either as the two features
go hand in hand to some extent.
b) Fix the broken case - I doubt it will be too challenging to fix up
the implementation to allow the soft-float ABIFLAGS + no ABIFLAGS
combination.
c) Apply Markos' updated patch (with the references to r6 removed).
I'll leave it to others to decide which approach is best.
Thanks,
Matthew
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-17 19:00 ` Matthew Fortune
@ 2015-01-18 10:35 ` Manuel Lauss
2015-01-19 5:36 ` Paul Burton
0 siblings, 1 reply; 13+ messages in thread
From: Manuel Lauss @ 2015-01-18 10:35 UTC (permalink / raw)
To: Matthew Fortune; +Cc: Aaro Koskinen, Paul Burton, Linux-MIPS, Ralf Baechle
On Sat, Jan 17, 2015 at 8:00 PM, Matthew Fortune
<Matthew.Fortune@imgtec.com> wrote:
> Aaro Koskinen <aaro.koskinen@iki.fi> writes:
>> On Fri, Jan 16, 2015 at 08:36:12PM +0000, Matthew Fortune wrote:
>> > You are right that it is the .MIPS.abiflags patch that is causing your
>> > trouble. For a long time I had to put a restriction in the ABI plan
>> > that soft-float binaries without an ABIFLAGS pheader could not be
>> > linked against soft-float binaries with an ABIFLAGS pheader. We have
>> > since found a way to relax that restriction without reducing the
>> > effectiveness of the new compatibility checks. I would need to check
>> > the code in the kernel but I suspect that is the issue. Markos has
>> > done a significant update to this piece of code which he posted
>> > earlier today. That updated version should allow the combination of
>> > soft-float without ABIFLAGS and soft-float with ABIFLAGS.
>>
>> Are you referring to the series with 70 patches? I think a fix that
>> passes stable kernel rules is needed.
>
> Yes it was just one patch though for this issue:
> [PATCH RFC v2 68/70] MIPS: kernel: elf: Improve the overall ABI and FPU
> mode checks
>
> I wasn't trying to suggest how to fix the existing code just explaining
> how it came to be and what has been done about it for next release.
> (I'm not a kernel developer I'm just interested as I did most of the
> design work for the new ABI extensions.)
>
> I guess there are three options:
> a) revert the patch - That would remove the new ABI safety measures from
> 3.19 which is a shame given it has MSA support in it (I think anyway).
> equally given that the new prctl FPU mode options did not make 3.19
> then I suppose it doesn't lose too much either as the two features
> go hand in hand to some extent.
I favor this one. I don't know how many systems with MSA are in the wild,
and if there are any, I'm sure they're using some mti/imgtec-supplied kernel
anyway. Another thing I noticed last time is that companies shipping MIPS
products rarely upgrade their toolchains, so I'm sure the ABI safety measures
can wait for another release, but then function with all configurations
in the wild.
Manuel
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-18 10:35 ` Manuel Lauss
@ 2015-01-19 5:36 ` Paul Burton
2015-01-19 9:15 ` Markos Chandras
0 siblings, 1 reply; 13+ messages in thread
From: Paul Burton @ 2015-01-19 5:36 UTC (permalink / raw)
To: Manuel Lauss; +Cc: Matthew Fortune, Aaro Koskinen, Linux-MIPS, Ralf Baechle
On Sun, Jan 18, 2015 at 11:35:31AM +0100, Manuel Lauss wrote:
> On Sat, Jan 17, 2015 at 8:00 PM, Matthew Fortune
> <Matthew.Fortune@imgtec.com> wrote:
> > Aaro Koskinen <aaro.koskinen@iki.fi> writes:
> >> On Fri, Jan 16, 2015 at 08:36:12PM +0000, Matthew Fortune wrote:
> >> > You are right that it is the .MIPS.abiflags patch that is causing your
> >> > trouble. For a long time I had to put a restriction in the ABI plan
> >> > that soft-float binaries without an ABIFLAGS pheader could not be
> >> > linked against soft-float binaries with an ABIFLAGS pheader. We have
> >> > since found a way to relax that restriction without reducing the
> >> > effectiveness of the new compatibility checks. I would need to check
> >> > the code in the kernel but I suspect that is the issue. Markos has
> >> > done a significant update to this piece of code which he posted
> >> > earlier today. That updated version should allow the combination of
> >> > soft-float without ABIFLAGS and soft-float with ABIFLAGS.
> >>
> >> Are you referring to the series with 70 patches? I think a fix that
> >> passes stable kernel rules is needed.
> >
> > Yes it was just one patch though for this issue:
> > [PATCH RFC v2 68/70] MIPS: kernel: elf: Improve the overall ABI and FPU
> > mode checks
> >
> > I wasn't trying to suggest how to fix the existing code just explaining
> > how it came to be and what has been done about it for next release.
> > (I'm not a kernel developer I'm just interested as I did most of the
> > design work for the new ABI extensions.)
> >
> > I guess there are three options:
> > a) revert the patch - That would remove the new ABI safety measures from
> > 3.19 which is a shame given it has MSA support in it (I think anyway).
> > equally given that the new prctl FPU mode options did not make 3.19
> > then I suppose it doesn't lose too much either as the two features
> > go hand in hand to some extent.
>
> I favor this one. I don't know how many systems with MSA are in the wild,
> and if there are any, I'm sure they're using some mti/imgtec-supplied kernel
> anyway. Another thing I noticed last time is that companies shipping MIPS
> products rarely upgrade their toolchains, so I'm sure the ABI safety measures
> can wait for another release, but then function with all configurations
> in the wild.
>
> Manuel
An alternative would be the patch I just submitted, which makes the mode
checks conditional upon CONFIG_MIPS_O32_FP64_SUPPORT:
http://marc.info/?l=linux-mips&m=142164553017027&w=2
Assuming this fixes your problem, and I believe it should, it would
avoid the churn of reverting the patch & readding the modified logic
again later.
Thanks,
Paul
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-19 5:36 ` Paul Burton
@ 2015-01-19 9:15 ` Markos Chandras
2015-01-21 0:00 ` Aaro Koskinen
0 siblings, 1 reply; 13+ messages in thread
From: Markos Chandras @ 2015-01-19 9:15 UTC (permalink / raw)
To: Paul Burton, Manuel Lauss
Cc: Matthew Fortune, Aaro Koskinen, Linux-MIPS, Ralf Baechle
On 01/19/2015 05:36 AM, Paul Burton wrote:
> On Sun, Jan 18, 2015 at 11:35:31AM +0100, Manuel Lauss wrote:
>> On Sat, Jan 17, 2015 at 8:00 PM, Matthew Fortune
>> <Matthew.Fortune@imgtec.com> wrote:
>>> Aaro Koskinen <aaro.koskinen@iki.fi> writes:
>>>> On Fri, Jan 16, 2015 at 08:36:12PM +0000, Matthew Fortune wrote:
>>>>> You are right that it is the .MIPS.abiflags patch that is causing your
>>>>> trouble. For a long time I had to put a restriction in the ABI plan
>>>>> that soft-float binaries without an ABIFLAGS pheader could not be
>>>>> linked against soft-float binaries with an ABIFLAGS pheader. We have
>>>>> since found a way to relax that restriction without reducing the
>>>>> effectiveness of the new compatibility checks. I would need to check
>>>>> the code in the kernel but I suspect that is the issue. Markos has
>>>>> done a significant update to this piece of code which he posted
>>>>> earlier today. That updated version should allow the combination of
>>>>> soft-float without ABIFLAGS and soft-float with ABIFLAGS.
>>>>
>>>> Are you referring to the series with 70 patches? I think a fix that
>>>> passes stable kernel rules is needed.
>>>
>>> Yes it was just one patch though for this issue:
>>> [PATCH RFC v2 68/70] MIPS: kernel: elf: Improve the overall ABI and FPU
>>> mode checks
>>>
>>> I wasn't trying to suggest how to fix the existing code just explaining
>>> how it came to be and what has been done about it for next release.
>>> (I'm not a kernel developer I'm just interested as I did most of the
>>> design work for the new ABI extensions.)
>>>
>>> I guess there are three options:
>>> a) revert the patch - That would remove the new ABI safety measures from
>>> 3.19 which is a shame given it has MSA support in it (I think anyway).
>>> equally given that the new prctl FPU mode options did not make 3.19
>>> then I suppose it doesn't lose too much either as the two features
>>> go hand in hand to some extent.
>>
>> I favor this one. I don't know how many systems with MSA are in the wild,
>> and if there are any, I'm sure they're using some mti/imgtec-supplied kernel
>> anyway. Another thing I noticed last time is that companies shipping MIPS
>> products rarely upgrade their toolchains, so I'm sure the ABI safety measures
>> can wait for another release, but then function with all configurations
>> in the wild.
>>
>> Manuel
>
> An alternative would be the patch I just submitted, which makes the mode
> checks conditional upon CONFIG_MIPS_O32_FP64_SUPPORT:
>
> http://marc.info/?l=linux-mips&m=142164553017027&w=2
>
> Assuming this fixes your problem, and I believe it should, it would
> avoid the churn of reverting the patch & readding the modified logic
> again later.
>
> Thanks,
> Paul
>
There is also this patch from James for 3.19 final
http://patchwork.linux-mips.org/patch/8932/
so with these two patches we should be good for 3.19.
--
markos
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-19 9:15 ` Markos Chandras
@ 2015-01-21 0:00 ` Aaro Koskinen
2015-01-28 23:14 ` Aaro Koskinen
0 siblings, 1 reply; 13+ messages in thread
From: Aaro Koskinen @ 2015-01-21 0:00 UTC (permalink / raw)
To: Markos Chandras, Ralf Baechle, Matthew Fortune
Cc: Paul Burton, Manuel Lauss, Linux-MIPS
Hi,
On Mon, Jan 19, 2015 at 09:15:58AM +0000, Markos Chandras wrote:
> On 01/19/2015 05:36 AM, Paul Burton wrote:
> > On Sun, Jan 18, 2015 at 11:35:31AM +0100, Manuel Lauss wrote:
> >> On Sat, Jan 17, 2015 at 8:00 PM, Matthew Fortune
> >> <Matthew.Fortune@imgtec.com> wrote:
> >>> Aaro Koskinen <aaro.koskinen@iki.fi> writes:
> >>>> On Fri, Jan 16, 2015 at 08:36:12PM +0000, Matthew Fortune wrote:
> >>>>> You are right that it is the .MIPS.abiflags patch that is causing your
> >>>>> trouble. For a long time I had to put a restriction in the ABI plan
> >>>>> that soft-float binaries without an ABIFLAGS pheader could not be
> >>>>> linked against soft-float binaries with an ABIFLAGS pheader. We have
> >>>>> since found a way to relax that restriction without reducing the
> >>>>> effectiveness of the new compatibility checks. I would need to check
> >>>>> the code in the kernel but I suspect that is the issue. Markos has
> >>>>> done a significant update to this piece of code which he posted
> >>>>> earlier today. That updated version should allow the combination of
> >>>>> soft-float without ABIFLAGS and soft-float with ABIFLAGS.
> >>>>
> >>>> Are you referring to the series with 70 patches? I think a fix that
> >>>> passes stable kernel rules is needed.
> >>>
> >>> Yes it was just one patch though for this issue:
> >>> [PATCH RFC v2 68/70] MIPS: kernel: elf: Improve the overall ABI and FPU
> >>> mode checks
> >>>
> >>> I wasn't trying to suggest how to fix the existing code just explaining
> >>> how it came to be and what has been done about it for next release.
> >>> (I'm not a kernel developer I'm just interested as I did most of the
> >>> design work for the new ABI extensions.)
> >>>
> >>> I guess there are three options:
> >>> a) revert the patch - That would remove the new ABI safety measures from
> >>> 3.19 which is a shame given it has MSA support in it (I think anyway).
> >>> equally given that the new prctl FPU mode options did not make 3.19
> >>> then I suppose it doesn't lose too much either as the two features
> >>> go hand in hand to some extent.
> >>
> >> I favor this one. I don't know how many systems with MSA are in the wild,
> >> and if there are any, I'm sure they're using some mti/imgtec-supplied kernel
> >> anyway. Another thing I noticed last time is that companies shipping MIPS
> >> products rarely upgrade their toolchains, so I'm sure the ABI safety measures
> >> can wait for another release, but then function with all configurations
> >> in the wild.
> >>
> >> Manuel
> >
> > An alternative would be the patch I just submitted, which makes the mode
> > checks conditional upon CONFIG_MIPS_O32_FP64_SUPPORT:
> >
> > http://marc.info/?l=linux-mips&m=142164553017027&w=2
> >
> > Assuming this fixes your problem, and I believe it should, it would
> > avoid the churn of reverting the patch & readding the modified logic
> > again later.
> >
> > Thanks,
> > Paul
> >
> There is also this patch from James for 3.19 final
>
> http://patchwork.linux-mips.org/patch/8932/
>
> so with these two patches we should be good for 3.19.
This patch is also needed to run hard-float O32 userspace compiled using
binutils 2.25 with 64-bit 3.19-rc5 (otherwise kernel fails to start init).
So please ensure that these patches end up to next 3.19-rc ASAP!
I have to say this O32 "ABI extension" seems to be very poorly introduced.
For softfloat, the current 2.25 binutils broke _all_ existing
GCC releases. And for hardfloat, newly compiled userspace appears
to be unusable with the current kernel mainline...
:-(
A.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: 3.18+: soft-float userland unusable due to .MIPS.abiflags patch
2015-01-21 0:00 ` Aaro Koskinen
@ 2015-01-28 23:14 ` Aaro Koskinen
0 siblings, 0 replies; 13+ messages in thread
From: Aaro Koskinen @ 2015-01-28 23:14 UTC (permalink / raw)
To: Markos Chandras, Ralf Baechle, Matthew Fortune
Cc: Paul Burton, Manuel Lauss, Linux-MIPS
Hi,
On Wed, Jan 21, 2015 at 02:00:33AM +0200, Aaro Koskinen wrote:
> On Mon, Jan 19, 2015 at 09:15:58AM +0000, Markos Chandras wrote:
> > On 01/19/2015 05:36 AM, Paul Burton wrote:
> > > On Sun, Jan 18, 2015 at 11:35:31AM +0100, Manuel Lauss wrote:
> > >> On Sat, Jan 17, 2015 at 8:00 PM, Matthew Fortune
> > >> <Matthew.Fortune@imgtec.com> wrote:
> > >>> Aaro Koskinen <aaro.koskinen@iki.fi> writes:
> > >>>> On Fri, Jan 16, 2015 at 08:36:12PM +0000, Matthew Fortune wrote:
> > >>>>> You are right that it is the .MIPS.abiflags patch that is causing your
> > >>>>> trouble. For a long time I had to put a restriction in the ABI plan
> > >>>>> that soft-float binaries without an ABIFLAGS pheader could not be
> > >>>>> linked against soft-float binaries with an ABIFLAGS pheader. We have
> > >>>>> since found a way to relax that restriction without reducing the
> > >>>>> effectiveness of the new compatibility checks. I would need to check
> > >>>>> the code in the kernel but I suspect that is the issue. Markos has
> > >>>>> done a significant update to this piece of code which he posted
> > >>>>> earlier today. That updated version should allow the combination of
> > >>>>> soft-float without ABIFLAGS and soft-float with ABIFLAGS.
> > >>>>
> > >>>> Are you referring to the series with 70 patches? I think a fix that
> > >>>> passes stable kernel rules is needed.
> > >>>
> > >>> Yes it was just one patch though for this issue:
> > >>> [PATCH RFC v2 68/70] MIPS: kernel: elf: Improve the overall ABI and FPU
> > >>> mode checks
> > >>>
> > >>> I wasn't trying to suggest how to fix the existing code just explaining
> > >>> how it came to be and what has been done about it for next release.
> > >>> (I'm not a kernel developer I'm just interested as I did most of the
> > >>> design work for the new ABI extensions.)
> > >>>
> > >>> I guess there are three options:
> > >>> a) revert the patch - That would remove the new ABI safety measures from
> > >>> 3.19 which is a shame given it has MSA support in it (I think anyway).
> > >>> equally given that the new prctl FPU mode options did not make 3.19
> > >>> then I suppose it doesn't lose too much either as the two features
> > >>> go hand in hand to some extent.
> > >>
> > >> I favor this one. I don't know how many systems with MSA are in the wild,
> > >> and if there are any, I'm sure they're using some mti/imgtec-supplied kernel
> > >> anyway. Another thing I noticed last time is that companies shipping MIPS
> > >> products rarely upgrade their toolchains, so I'm sure the ABI safety measures
> > >> can wait for another release, but then function with all configurations
> > >> in the wild.
> > >>
> > >> Manuel
> > >
> > > An alternative would be the patch I just submitted, which makes the mode
> > > checks conditional upon CONFIG_MIPS_O32_FP64_SUPPORT:
> > >
> > > http://marc.info/?l=linux-mips&m=142164553017027&w=2
> > >
> > > Assuming this fixes your problem, and I believe it should, it would
> > > avoid the churn of reverting the patch & readding the modified logic
> > > again later.
> > >
> > > Thanks,
> > > Paul
> > >
> > There is also this patch from James for 3.19 final
> >
> > http://patchwork.linux-mips.org/patch/8932/
> >
> > so with these two patches we should be good for 3.19.
>
> This patch is also needed to run hard-float O32 userspace compiled using
> binutils 2.25 with 64-bit 3.19-rc5 (otherwise kernel fails to start init).
Seems to be still missing in 3.19-rc6...
A.
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2015-01-28 23:14 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-16 17:59 3.18+: soft-float userland unusable due to .MIPS.abiflags patch Manuel Lauss
2015-01-16 18:06 ` Manuel Lauss
2015-01-16 19:12 ` Matthew Fortune
2015-01-16 20:01 ` Manuel Lauss
2015-01-16 20:04 ` Manuel Lauss
2015-01-16 20:36 ` Matthew Fortune
2015-01-17 16:38 ` Aaro Koskinen
2015-01-17 19:00 ` Matthew Fortune
2015-01-18 10:35 ` Manuel Lauss
2015-01-19 5:36 ` Paul Burton
2015-01-19 9:15 ` Markos Chandras
2015-01-21 0:00 ` Aaro Koskinen
2015-01-28 23:14 ` Aaro Koskinen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.