diff options
author | Jamie Liu <jamieliu@google.com> | 2019-02-19 15:48:39 -0800 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-02-19 15:49:37 -0800 |
commit | bed6f8534b1bedaad031682fe052b5a46d9cb3ee (patch) | |
tree | 2afde5a57295904c0a89e7a7de7e8be847939c41 /pkg/sentry/kernel | |
parent | fd50504a3a7e5747c7ef459ef316b43dfc866841 (diff) |
Set rax to syscall number on SECCOMP_RET_TRAP.
PiperOrigin-RevId: 234690475
Change-Id: I1cbfb5aecd4697a4a26ec8524354aa8656cc3ba1
Diffstat (limited to 'pkg/sentry/kernel')
-rw-r--r-- | pkg/sentry/kernel/seccomp.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/sentry/kernel/seccomp.go b/pkg/sentry/kernel/seccomp.go index cec179246..4bed4d373 100644 --- a/pkg/sentry/kernel/seccomp.go +++ b/pkg/sentry/kernel/seccomp.go @@ -75,6 +75,9 @@ func (t *Task) checkSeccompSyscall(sysno int32, args arch.SyscallArguments, ip u // portion of the return value will be passed as si_errno." - // Documentation/prctl/seccomp_filter.txt t.SendSignal(seccompSiginfo(t, int32(result.Data()), sysno, ip)) + // "The return value register will contain an arch-dependent value." In + // practice, it's ~always the syscall number. + t.Arch().SetReturn(uintptr(sysno)) case linux.SECCOMP_RET_ERRNO: // "Results in the lower 16-bits of the return value being passed to |