diff options
author | Zach Koopmans <zkoopmans@google.com> | 2021-03-29 13:28:32 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-03-29 13:30:21 -0700 |
commit | 8a2f7e716dcc62f04d2808e8ade34941c94fc956 (patch) | |
tree | b2195d5728dcbc4f4e59c23ad95d7486ef744371 /pkg/sentry/strace/signal.go | |
parent | b125afba416ebeba906ea595a44a55afe4729d64 (diff) |
[syserror] Split usermem package
Split usermem package to help remove syserror dependency in go_marshal.
New hostarch package contains code not dependent on syserror.
PiperOrigin-RevId: 365651233
Diffstat (limited to 'pkg/sentry/strace/signal.go')
-rw-r--r-- | pkg/sentry/strace/signal.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/pkg/sentry/strace/signal.go b/pkg/sentry/strace/signal.go index c41f36e3f..e5b379a20 100644 --- a/pkg/sentry/strace/signal.go +++ b/pkg/sentry/strace/signal.go @@ -21,7 +21,8 @@ import ( "gvisor.dev/gvisor/pkg/abi" "gvisor.dev/gvisor/pkg/abi/linux" "gvisor.dev/gvisor/pkg/sentry/kernel" - "gvisor.dev/gvisor/pkg/usermem" + + "gvisor.dev/gvisor/pkg/hostarch" ) // signalNames contains the names of all named signals. @@ -100,7 +101,7 @@ var sigActionFlags = abi.FlagSet{ }, } -func sigSet(t *kernel.Task, addr usermem.Addr) string { +func sigSet(t *kernel.Task, addr hostarch.Addr) string { if addr == 0 { return "null" } @@ -110,7 +111,7 @@ func sigSet(t *kernel.Task, addr usermem.Addr) string { return fmt.Sprintf("%#x (error copying sigset: %v)", addr, err) } - set := linux.SignalSet(usermem.ByteOrder.Uint64(b[:])) + set := linux.SignalSet(hostarch.ByteOrder.Uint64(b[:])) return fmt.Sprintf("%#x %s", addr, formatSigSet(set)) } @@ -124,7 +125,7 @@ func formatSigSet(set linux.SignalSet) string { return fmt.Sprintf("[%v]", strings.Join(signals, " ")) } -func sigAction(t *kernel.Task, addr usermem.Addr) string { +func sigAction(t *kernel.Task, addr hostarch.Addr) string { if addr == 0 { return "null" } |