Re: Bug#380531: linux-2.6: mips and mipsel personality(2) support is broken

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Martin Michlmayr wrote:
> FYI, but report tht "mips and mipsel personality(2) support is broken"

This patch fixes sys_personality for the o32 emulation by
 a) killing the sign extension bits
 b) tighten the bitmask match for current->personality (like it is done
    for x86_64)


Thiemo


Signed-off-by:  Thiemo Seufer <ths@xxxxxxxxxxxx>


--- a/arch/mips/kernel/linux32.c
+++ b/arch/mips/kernel/linux32.c
@@ -1053,7 +1053,9 @@ asmlinkage long sys32_newuname(struct ne
 asmlinkage int sys32_personality(unsigned long personality)
 {
 	int ret;
-	if (current->personality == PER_LINUX32 && personality == PER_LINUX)
+	personality &= 0xffffffff;
+	if (personality(current->personality) == PER_LINUX32 &&
+	    personality == PER_LINUX)
 		personality = PER_LINUX32;
 	ret = sys_personality(personality);
 	if (ret == PER_LINUX32)


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux