personality does not preserve across execve on s390 (31bit) systems

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

 



simple test case:
$ cat test.c
#include <stdio.h>
#include <linux/personality.h>

int main(int argc, char *argv[])
{
        printf("personality: %#x\n", personality(-1));
        if (argc == 1) {
                personality(ADDR_NO_RANDOMIZE | PER_LINUX_32BIT);
                printf("personality: %#x\n", personality(-1));
                argv[1] = "-x";
                argv[2] = NULL;
                execv(argv[0], argv);
        }
        return 0;
}

running on a s390 (31bit) system fails:
	$ uname -a
	Linux lgentoo1 3.4.10 #1 SMP Mon Aug 27 17:24:12 EDT 2012 s390 2084 IBM GNU/Linux
	$ ./a.out
	personality: 0
	personality: 0x840000
	personality: 0

running on a s390x (64bit) system works fine:
	$ uname -a
	Linux lgentoo2 3.4.10 #1 SMP Mon Aug 27 17:28:05 EDT 2012 s390x 2084 IBM GNU/Linux
	$ ./a.out
	personality: 0
	personality: 0x840000
	personality: 0x840000
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux