]> granicus.if.org Git - strace/commitdiff
syscall.c: wrap arch_set_scno in TraBAL-specific wrapper
authorEugene Syromiatnikov <esyr@redhat.com>
Mon, 25 Dec 2017 23:15:33 +0000 (00:15 +0100)
committerEugene Syromyatnikov <evgsyr@gmail.com>
Wed, 27 Feb 2019 16:35:22 +0000 (17:35 +0100)
* syscall.c (tamper_with_syscall_entering): Change arch_set_scno call to
set_scno.
(set_scno): New function.

syscall.c

index 552f0826b5fca7cb7cc946989dec9202d7485369..221a11290065ee2143cb874a7f45c6238b88d6e4 100644 (file)
--- a/syscall.c
+++ b/syscall.c
@@ -437,6 +437,7 @@ static long get_regs(struct tcb *);
 static int get_syscall_args(struct tcb *);
 static int get_syscall_result(struct tcb *);
 static void get_error(struct tcb *, bool);
+int set_scno(struct tcb *, kernel_ulong_t);
 static void set_error(struct tcb *, unsigned long);
 static void set_success(struct tcb *, kernel_long_t);
 static int arch_get_scno(struct tcb *);
@@ -492,7 +493,7 @@ tamper_with_syscall_entering(struct tcb *tcp, unsigned int *signo)
                                ? (kernel_long_t) shuffle_scno(opts->data.scno)
                                : -1;
 
-                       if (!arch_set_scno(tcp, scno)) {
+                       if (!set_scno(tcp, scno)) {
                                tcp->flags |= TCB_TAMPERED;
                                if (scno != -1)
                                        tcp->flags |= TCB_TAMPERED_NO_FAIL;
@@ -1353,6 +1354,13 @@ get_syscall_args(struct tcb *tcp)
        return arch_get_syscall_args(tcp);
 }
 
+int
+set_scno(struct tcb *tcp, kernel_ulong_t scno)
+{
+       return arch_set_scno(tcp, scno);
+}
+
+
 #ifdef ptrace_getregset_or_getregs
 # define get_syscall_result_regs get_syscall_regs
 #else