the definition of the IPC_64 macro controls the interface between libc
and the kernel through syscalls; it's not a public API. the meaning is
rather obscure. long ago, Linux's sysvipc *id_ds structures used
16-bit uids/gids and wrong types for a few other fields. this was in
the libc5 era, before glibc. the IPC_64 flag (64 is a misnomer; it's
more like 32) tells the kernel to use the modern[-ish] versions of the
structures.
the definition of IPC_64 has nothing to do with whether the arch is
32- or 64-bit. rather, due to either historical accident or
intentional obnoxiousness, the kernel only accepts and masks off the
0x100 IPC_64 flag conditional on CONFIG_ARCH_WANT_IPC_PARSE_VERSION,
i.e. for archs that want to provide, or that accidentally provided,
both. for archs which don't define this option, no masking is
performed and commands with the 0x100 bit set will fail as invalid. so
ultimately, the definition is just a matter of matching an arbitrary
switch defined per-arch in the kernel.
16 files changed:
unsigned long __pad1;
unsigned long __pad2;
};
-
-#define IPC_64 0
#define VDSO_USEFUL
#define VDSO_CGT_SYM "__kernel_clock_gettime"
#define VDSO_CGT_VER "LINUX_2.6.39"
+
+#define IPC_64 0
long __pad1;
long __pad2;
};
-
-#define IPC_64 0x100
unsigned long __unused1;
unsigned long __unused2;
};
-
-#define IPC_64 0x100
long __pad1;
long __pad2;
};
-
-#define IPC_64 0
"r23", "r25", "r27", "r29", "r31");
return r11;
}
+
+#define IPC_64 0
long long __pad2;
long long __pad3;
};
-
-#define IPC_64 0x100
-
long long __pad2;
long long __pad3;
};
-
-#define IPC_64 0x100
-
unsigned long __pad1;
unsigned long __pad2;
};
-
-#define IPC_64 0
/* We don't have a clock_gettime function.
#define VDSO_CGT_SYM "__vdso_clock_gettime"
#define VDSO_CGT_VER "LINUX_2.6" */
+
+#define IPC_64 0
unsigned long __pad2;
unsigned long __pad3;
};
-
-#define IPC_64 0x100
long long __pad1;
long long __pad2;
};
-
-#define IPC_64 0
#define SYS_rt_sigtimedwait_time64 SYS_rt_sigtimedwait
#define SYS_futex_time64 SYS_futex
#define SYS_sched_rr_get_interval_time64 SYS_sched_rr_get_interval
+
+#define IPC_64 0
long __pad1;
long __pad2;
};
-
-#define IPC_64 0
#define VDSO_CGT_VER "LINUX_2.6"
#define VDSO_GETCPU_SYM "__vdso_getcpu"
#define VDSO_GETCPU_VER "LINUX_2.6"
+
+#define IPC_64 0
+#include "syscall.h"
+
#define IPCOP_semop 1
#define IPCOP_semget 2
#define IPCOP_semctl 3
#define IPCOP_shmdt 22
#define IPCOP_shmget 23
#define IPCOP_shmctl 24
+
+#ifndef IPC_64
+#define IPC_64 0x100
+#endif