Syscall(mknod) is incorrectly successful on ppc systems

On PowerPC systems the following short check fails:

errno = 0;

unsigned long dev = 0xfacefeed00000000ULL | makedev(1, 7);
syscall(__NR_mknod, "/", S_IFCHR | 0777, dev);

if (errno != EEXIST) {

(see github repository: [1])

On ppc mknod is successful, but it should fail with EEXISTS (as “/” exists). Other architectures are fine [2].

If 0xfacefeed00000000ULL magic is removed from dev, the check passes on pcc too. Although the choice of this dev value might seem irrational, this kind of or-ing is frequently used is strace tests, where mknod test started failing about a week ago [3].