diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-09-30 22:11:57 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-09-30 22:11:57 +0000 |
commit | ff79c88b3839ed40d6d1644edccfd1c31330435e (patch) | |
tree | a6feb35e29647f138fb81b8fc65b0fea2faea6c9 /pkg | |
parent | 301b07576df25a5c0c7635e6afcf75bd40557d7c (diff) | |
parent | 9fff9469a29dbab57abde3cc17c01f0e987dc150 (diff) |
Merge release-20210921.0-46-g9fff9469a (automated)
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/sentry/kernel/task_log.go | 6 | ||||
-rw-r--r-- | pkg/sentry/strace/strace.go | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/pkg/sentry/kernel/task_log.go b/pkg/sentry/kernel/task_log.go index c5b099559..f0c168ecc 100644 --- a/pkg/sentry/kernel/task_log.go +++ b/pkg/sentry/kernel/task_log.go @@ -191,9 +191,11 @@ const ( // // Preconditions: The task's owning TaskSet.mu must be locked. func (t *Task) updateInfoLocked() { - // Use the task's TID in the root PID namespace for logging. + // Use the task's TID and PID in the root PID namespace for logging. + pid := t.tg.pidns.owner.Root.tgids[t.tg] tid := t.tg.pidns.owner.Root.tids[t] - t.logPrefix.Store(fmt.Sprintf("[% 4d] ", tid)) + t.logPrefix.Store(fmt.Sprintf("[% 4d:% 4d] ", pid, tid)) + t.rebuildTraceContext(tid) } diff --git a/pkg/sentry/strace/strace.go b/pkg/sentry/strace/strace.go index 757ff2a40..4d3f4d556 100644 --- a/pkg/sentry/strace/strace.go +++ b/pkg/sentry/strace/strace.go @@ -610,9 +610,9 @@ func (i *SyscallInfo) printExit(t *kernel.Task, elapsed time.Duration, output [] if err == nil { // Fill in the output after successful execution. i.post(t, args, retval, output, LogMaximumSize) - rval = fmt.Sprintf("%#x (%v)", retval, elapsed) + rval = fmt.Sprintf("%d (%#x) (%v)", retval, retval, elapsed) } else { - rval = fmt.Sprintf("%#x errno=%d (%s) (%v)", retval, errno, err, elapsed) + rval = fmt.Sprintf("%d (%#x) errno=%d (%s) (%v)", retval, retval, errno, err, elapsed) } switch len(output) { |