From: Dmitry V. Levin Date: Fri, 21 Jul 2017 01:30:26 +0000 (+0000) Subject: x86: wire up arch_prctl syscall X-Git-Tag: v4.19~227 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8d2dd76323bbb06119427df07bdaff91aae2522a;p=strace x86: wire up arch_prctl syscall * linux/i386/syscallent.h [384]: Add arch_prctl entry. * xlat/archvals.in: Add fallback definitions for constants. * prctl.c: Stop including . (SYS_FUNC(arch_prctl)): Enable for [I386]. * NEWS: Mention this. --- diff --git a/NEWS b/NEWS index bd2206e7..161a9418 100644 --- a/NEWS +++ b/NEWS @@ -18,6 +18,7 @@ Noteworthy changes in release ?.?? (????-??-??) * Implemented decoding of netlink message ack flags. * Implemented decoding of nlmsgerr netlink attributes. * Updated lists of BPF_*, KEY_*, RWF_*, SCM_*, SO_*, and *_MAGIC constants. + * Added decoding of arch_prctl syscall on x86. * Bug fixes * Fixed output formatting of blkpg_ioctl_arg, dm_name_list, and iocb diff --git a/linux/i386/syscallent.h b/linux/i386/syscallent.h index b0e9244e..07bfb797 100644 --- a/linux/i386/syscallent.h +++ b/linux/i386/syscallent.h @@ -410,6 +410,7 @@ [381] = { 2, 0, SEN(pkey_alloc), "pkey_alloc" }, [382] = { 1, 0, SEN(pkey_free), "pkey_free" }, [383] = { 5, TD|TF|TSTA, SEN(statx), "statx" }, +[384] = { 2, TP, SEN(arch_prctl), "arch_prctl" }, #define SYS_socket_subcall 400 #include "subcall.h" diff --git a/prctl.c b/prctl.c index 59759961..befa14b3 100644 --- a/prctl.c +++ b/prctl.c @@ -350,8 +350,7 @@ SYS_FUNC(prctl) return 0; } -#if defined X86_64 || defined X32 -# include +#if defined X86_64 || defined X32 || defined I386 # include "xlat/archvals.h" SYS_FUNC(arch_prctl) @@ -375,4 +374,4 @@ SYS_FUNC(arch_prctl) tprintf(", %#" PRI_klx, addr); return RVAL_DECODED; } -#endif /* X86_64 || X32 */ +#endif /* X86_64 || X32 || I386 */ diff --git a/xlat/archvals.in b/xlat/archvals.in index 4bbcc0a0..1dbbb8d0 100644 --- a/xlat/archvals.in +++ b/xlat/archvals.in @@ -1,7 +1,7 @@ -ARCH_SET_GS -ARCH_SET_FS -ARCH_GET_FS -ARCH_GET_GS +ARCH_SET_GS 0x1001 +ARCH_SET_FS 0x1002 +ARCH_GET_FS 0x1003 +ARCH_GET_GS 0x1004 ARCH_GET_CPUID 0x1011 ARCH_SET_CPUID 0x1012 ARCH_MAP_VDSO_X32 0x2001