]> granicus.if.org Git - strace/commitdiff
x86: wire up arch_prctl syscall
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 21 Jul 2017 01:30:26 +0000 (01:30 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 21 Jul 2017 01:30:26 +0000 (01:30 +0000)
* linux/i386/syscallent.h [384]: Add arch_prctl entry.
* xlat/archvals.in: Add fallback definitions for constants.
* prctl.c: Stop including <asm/prctl.h>.
(SYS_FUNC(arch_prctl)): Enable for [I386].
* NEWS: Mention this.

NEWS
linux/i386/syscallent.h
prctl.c
xlat/archvals.in

diff --git a/NEWS b/NEWS
index bd2206e7f61a68f485c72c4d3b688702622d5b86..161a941856aff69f7301108508841e8be780bec3 100644 (file)
--- 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
index b0e9244e2a8ffa82fa9974d707fff66a561a1754..07bfb797f0ed519b268f0624186859517bf1701e 100644 (file)
 [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 59759961d66de23b730e9339b24689ff0b370c5f..befa14b3151de20a1db6f25146a8932857fe74d2 100644 (file)
--- a/prctl.c
+++ b/prctl.c
@@ -350,8 +350,7 @@ SYS_FUNC(prctl)
        return 0;
 }
 
-#if defined X86_64 || defined X32
-# include <asm/prctl.h>
+#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 */
index 4bbcc0a05ba5c9124b2cd2506556866b5a2d51c0..1dbbb8d00e229046d3e860b738b09b5bb61e704a 100644 (file)
@@ -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