2006-10-12 21:43:38

by Aurelien Jarno

[permalink] [raw]
Subject: SYS_personality does not work correctly on mips(el)64

Hi all,

On mips(el), when doing multiple call to the syscall SYS_personality in
order to get the current personality (using 0xffffffff for the first
argument), on a 64-bit kernel, the second and subsequent syscalls are
failing. That works correctly with a 32-bit kernels and on other
architectures.

Here is a small test below:

#include <sys/personality.h>
#include <stdio.h>

void main()
{
printf("%i\n", personality(0xFFFFFFFF));
printf("%i\n", personality(0xFFFFFFFF));
}


Bye,
Aurelien
--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' [email protected] | [email protected]
`- people.debian.org/~aurel32 | http://www.aurel32.net


2006-10-13 09:51:59

by Thiemo Seufer

[permalink] [raw]
Subject: Re: SYS_personality does not work correctly on mips(el)64

Aurelien Jarno wrote:
> Hi all,
>
> On mips(el), when doing multiple call to the syscall SYS_personality in
> order to get the current personality (using 0xffffffff for the first
> argument), on a 64-bit kernel, the second and subsequent syscalls are
> failing. That works correctly with a 32-bit kernels and on other
> architectures.

That's caused by mis-handling broken sign extensions, see also
http://bugs.debian.org/380531.


Thiemo

2006-10-13 10:26:13

by Aurelien Jarno

[permalink] [raw]
Subject: Re: SYS_personality does not work correctly on mips(el)64

Thiemo Seufer a ?crit :
> Aurelien Jarno wrote:
>> Hi all,
>>
>> On mips(el), when doing multiple call to the syscall SYS_personality in
>> order to get the current personality (using 0xffffffff for the first
>> argument), on a 64-bit kernel, the second and subsequent syscalls are
>> failing. That works correctly with a 32-bit kernels and on other
>> architectures.
>
> That's caused by mis-handling broken sign extensions, see also
> http://bugs.debian.org/380531.
>

Nice to see there is already a patch! Thanks for your work. Do you know
when the patch will be merged upstream or in Debian? I really want to
see this bug fixed, as it breaks dchroot.

--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' [email protected] | [email protected]
`- people.debian.org/~aurel32 | http://www.aurel32.net

2006-10-15 21:12:01

by Aurelien Jarno

[permalink] [raw]
Subject: Re: SYS_personality does not work correctly on mips(el)64

Thiemo Seufer a ?crit :
> Aurelien Jarno wrote:
>> Hi all,
>>
>> On mips(el), when doing multiple call to the syscall SYS_personality in
>> order to get the current personality (using 0xffffffff for the first
>> argument), on a 64-bit kernel, the second and subsequent syscalls are
>> failing. That works correctly with a 32-bit kernels and on other
>> architectures.
>
> That's caused by mis-handling broken sign extensions, see also
> http://bugs.debian.org/380531.

I still got the exact same problem with this patch applied.

--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' [email protected] | [email protected]
`- people.debian.org/~aurel32 | http://www.aurel32.net

2006-10-15 21:27:48

by Thiemo Seufer

[permalink] [raw]
Subject: Re: SYS_personality does not work correctly on mips(el)64

Aurelien Jarno wrote:
> Thiemo Seufer a ?crit :
> >Aurelien Jarno wrote:
> >>Hi all,
> >>
> >>On mips(el), when doing multiple call to the syscall SYS_personality in
> >>order to get the current personality (using 0xffffffff for the first
> >>argument), on a 64-bit kernel, the second and subsequent syscalls are
> >>failing. That works correctly with a 32-bit kernels and on other
> >>architectures.
> >
> >That's caused by mis-handling broken sign extensions, see also
> >http://bugs.debian.org/380531.
>
> I still got the exact same problem with this patch applied.

I works for me on a bcm91480b in big endian mode.


Thiemo

2006-10-15 21:47:28

by Aurelien Jarno

[permalink] [raw]
Subject: Re: SYS_personality does not work correctly on mips(el)64

Thiemo Seufer a ?crit :
> Aurelien Jarno wrote:
>> Thiemo Seufer a ?crit :
>>> Aurelien Jarno wrote:
>>>> Hi all,
>>>>
>>>> On mips(el), when doing multiple call to the syscall SYS_personality in
>>>> order to get the current personality (using 0xffffffff for the first
>>>> argument), on a 64-bit kernel, the second and subsequent syscalls are
>>>> failing. That works correctly with a 32-bit kernels and on other
>>>> architectures.
>>> That's caused by mis-handling broken sign extensions, see also
>>> http://bugs.debian.org/380531.
>> I still got the exact same problem with this patch applied.
>
> I works for me on a bcm91480b in big endian mode.

Oops, you are right, I booted the wrong kernel. Sorry!

--
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73
: :' : Debian developer | Electrical Engineer
`. `' [email protected] | [email protected]
`- people.debian.org/~aurel32 | http://www.aurel32.net