diff options
author | Rich Felker <dalias@aerifal.cx> | 2019-07-30 13:07:55 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2019-07-30 14:23:56 -0400 |
commit | f56d57f8a7aa536d40014933841a8b22f9c10328 (patch) | |
tree | f34e16245f19c8b1fcf739c9a8e9526d44bbba5d /arch/x86_64 | |
parent | 722a1ae3351a03ab25010dbebd492eced664853b (diff) | |
download | musl-f56d57f8a7aa536d40014933841a8b22f9c10328.zip musl-f56d57f8a7aa536d40014933841a8b22f9c10328.tar.gz musl-f56d57f8a7aa536d40014933841a8b22f9c10328.tar.bz2 |
move IPC_64 from public bits/ipc.h to syscall_arch.h
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.
Diffstat (limited to 'arch/x86_64')
-rw-r--r-- | arch/x86_64/bits/ipc.h | 2 | ||||
-rw-r--r-- | arch/x86_64/syscall_arch.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86_64/bits/ipc.h b/arch/x86_64/bits/ipc.h index 3d894e3..40d6f3a 100644 --- a/arch/x86_64/bits/ipc.h +++ b/arch/x86_64/bits/ipc.h @@ -9,5 +9,3 @@ struct ipc_perm { long __pad1; long __pad2; }; - -#define IPC_64 0 diff --git a/arch/x86_64/syscall_arch.h b/arch/x86_64/syscall_arch.h index 54e05ff..92d5c17 100644 --- a/arch/x86_64/syscall_arch.h +++ b/arch/x86_64/syscall_arch.h @@ -66,3 +66,5 @@ static __inline long __syscall6(long n, long a1, long a2, long a3, long a4, long #define VDSO_CGT_VER "LINUX_2.6" #define VDSO_GETCPU_SYM "__vdso_getcpu" #define VDSO_GETCPU_VER "LINUX_2.6" + +#define IPC_64 0 |