Hi Walter,
On 3/15/21 7:00 PM, Walter Harms wrote:
I have learned the other way around:
#include <sys/prctl.h>
Is a general system header to use that may include
the asm/prctrl.h what should never be included by
userspace programms.
Are you sure that <sys/prctl.h> includes <asm/prctl.h>?
user@debian:/usr/include$ grep -rn '\bARCH_'
asm-generic/statfs.h:42:#ifndef ARCH_PACK_STATFS64
asm-generic/statfs.h:43:#define ARCH_PACK_STATFS64
asm-generic/statfs.h:59:} ARCH_PACK_STATFS64;
asm-generic/statfs.h:65:#ifndef ARCH_PACK_COMPAT_STATFS64
asm-generic/statfs.h:66:#define ARCH_PACK_COMPAT_STATFS64
asm-generic/statfs.h:82:} ARCH_PACK_COMPAT_STATFS64;
x86_64-linux-gnu/asm/statfs.h:10:#define ARCH_PACK_COMPAT_STATFS64
__attribute__((packed,aligned(4)))
x86_64-linux-gnu/asm/prctl.h:5:#define ARCH_SET_GS 0x1001
x86_64-linux-gnu/asm/prctl.h:6:#define ARCH_SET_FS 0x1002
x86_64-linux-gnu/asm/prctl.h:7:#define ARCH_GET_FS 0x1003
x86_64-linux-gnu/asm/prctl.h:8:#define ARCH_GET_GS 0x1004
x86_64-linux-gnu/asm/prctl.h:10:#define ARCH_GET_CPUID 0x1011
x86_64-linux-gnu/asm/prctl.h:11:#define ARCH_SET_CPUID 0x1012
x86_64-linux-gnu/asm/prctl.h:13:#define ARCH_MAP_VDSO_X32 0x2001
x86_64-linux-gnu/asm/prctl.h:14:#define ARCH_MAP_VDSO_32 0x2002
x86_64-linux-gnu/asm/prctl.h:15:#define ARCH_MAP_VDSO_64 0x2003
x86_64-linux-gnu/asm/auxvec.h:13:/* entries in ARCH_DLINFO: */
user@debian:/usr/include$ grep -rn 'asm/prctl.h'
user@debian:/usr/include$
At least on my system, no header seems to be including <asm/prctl.h>.
Thanks,
Alex
--
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/