Skip to contentSkip to conversation

SYS_personality does not work correctly on mips(el)64

DISCUSSION Aurelien Jarno 2 participants 6 messages Oct 12, 2006 – Oct 15, 2006 MIPS

lore
Share & tools
lore
#0 lore raw

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

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
#1 lore raw
Quoted 7 lines · Aurelien Jarno

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

#2 lore raw
Quoted 8 lines · Thiemo Seufer
Quoted 3 lines · Aurelien Jarno

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.

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
#3 lore raw
In reply to Thiemo Seufer
Quoted 7 lines · Thiemo Seufer
Quoted 3 lines · Aurelien Jarno

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.

Signature · 4 lines
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   [email protected]         | [email protected]
   `-    people.debian.org/~aurel32 | www.aurel32.net
#4 lore raw
Quoted 10 lines · Aurelien Jarno
Quoted 9 lines · Thiemo Seufer
Quoted 7 lines · Aurelien Jarno

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.

Quoted 4 lines
Quoted 2 lines

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

#5 lore raw
Quoted 11 lines · Thiemo Seufer
Quoted 8 lines · Aurelien Jarno
Quoted 6 lines · Thiemo Seufer
Quoted 3 lines · Aurelien Jarno

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!

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