From: Robert Swiecki Date: Sun, 8 Oct 2017 09:51:37 +0000 (+0200) Subject: subproc: print si->si_syscall X-Git-Tag: 1.9~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=809dbbb56025ce13c1cbab414cbb7132825c8b7d;p=platform%2Fupstream%2Fnsjail.git subproc: print si->si_syscall --- diff --git a/cmdline.c b/cmdline.c index 9165c1b..e60e74c 100644 --- a/cmdline.c +++ b/cmdline.c @@ -644,7 +644,8 @@ bool cmdlineParse(int argc, char *argv[], struct nsjconf_t * nsjconf) dst = dst ? dst : optarg; if (!mountAddMountPtTail (nsjconf, /* src= */ optarg, dst, /* fs_type= */ "", - /* options= */ "", MS_BIND | MS_REC | MS_RDONLY, /* isDir= */ + /* options= */ "", MS_BIND | MS_REC | MS_RDONLY, + /* isDir= */ NS_DIR_MAYBE, /* mandatory= */ true, NULL, NULL, NULL, 0, /* is_symlink= */ false)) { return false; @@ -657,7 +658,8 @@ bool cmdlineParse(int argc, char *argv[], struct nsjconf_t * nsjconf) if (!mountAddMountPtTail (nsjconf, /* src= */ optarg, dst, /* fs_type= */ "", /* options= */ "", MS_BIND | MS_REC, /* isDir= */ NS_DIR_MAYBE, - /* mandatory= */ true, NULL, NULL, NULL, 0, /* is_symlink= */ + /* mandatory= */ true, NULL, NULL, NULL, 0, + /* is_symlink= */ false)) { return false; } @@ -761,10 +763,10 @@ bool cmdlineParse(int argc, char *argv[], struct nsjconf_t * nsjconf) return false; } } else { - if (!mountAddMountPtHead - (nsjconf, /* src= */ NULL, "/", "tmpfs", /* options= */ "", - nsjconf->is_root_rw ? 0 : MS_RDONLY, /* isDir= */ true, /* mandatory= */ true, - NULL, NULL, NULL, 0, /* is_symlink= */ false)) { + if (!mountAddMountPtHead(nsjconf, /* src= */ NULL, "/", "tmpfs", /* options= */ "", + nsjconf->is_root_rw ? 0 : MS_RDONLY, /* isDir= */ true, + /* mandatory= */ true, + NULL, NULL, NULL, 0, /* is_symlink= */ false)) { return false; } } diff --git a/subproc.c b/subproc.c index c556a72..26972e4 100644 --- a/subproc.c +++ b/subproc.c @@ -262,12 +262,15 @@ static void subprocSeccompViolation(struct nsjconf_t *nsjconf, siginfo_t * si) &arg5, &arg6, &sp, &pc); if (ret == 9) { LOG_W - ("PID: %d, Syscall number: %td, Arguments: %#tx, %#tx, %#tx, %#tx, %#tx, %#tx, SP: %#tx, PC: %#tx", - (int)si->si_pid, sc, arg1, arg2, arg3, arg4, arg5, arg6, sp, pc); + ("PID: %d, Syscall number: %td, Arguments: %#tx, %#tx, %#tx, %#tx, %#tx, %#tx, SP: %#tx, PC: %#tx, SI_SYSCALL: %#x", + (int)si->si_pid, sc, arg1, arg2, arg3, arg4, arg5, arg6, sp, pc, + si->si_syscall); } else if (ret == 3) { - LOG_W("PID: %d, SP: %#tx, PC: %#tx", (int)si->si_pid, arg1, arg2); + LOG_W("PID: %d, SP: %#tx, PC: %#tx (SI_SYSCALL: %#x)", (int)si->si_pid, arg1, arg2, + si->si_syscall); } else { - LOG_W("PID: %d, Syscall string '%s'", (int)si->si_pid, buf); + LOG_W("PID: %d, Syscall string '%s' (SI_SYSCALL: %#x)", (int)si->si_pid, buf, + si->si_syscall); } }