From 8a2f7e716dcc62f04d2808e8ade34941c94fc956 Mon Sep 17 00:00:00 2001 From: Zach Koopmans Date: Mon, 29 Mar 2021 13:28:32 -0700 Subject: [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 --- pkg/sentry/arch/signal_stack.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'pkg/sentry/arch/signal_stack.go') diff --git a/pkg/sentry/arch/signal_stack.go b/pkg/sentry/arch/signal_stack.go index a1eae98f9..c732c7503 100644 --- a/pkg/sentry/arch/signal_stack.go +++ b/pkg/sentry/arch/signal_stack.go @@ -17,8 +17,8 @@ package arch import ( + "gvisor.dev/gvisor/pkg/hostarch" "gvisor.dev/gvisor/pkg/marshal" - "gvisor.dev/gvisor/pkg/usermem" ) const ( @@ -36,8 +36,8 @@ func (s SignalStack) IsEnabled() bool { } // Top returns the stack's top address. -func (s SignalStack) Top() usermem.Addr { - return usermem.Addr(s.Addr + s.Size) +func (s SignalStack) Top() hostarch.Addr { + return hostarch.Addr(s.Addr + s.Size) } // SetOnStack marks this signal stack as in use. @@ -49,8 +49,8 @@ func (s *SignalStack) SetOnStack() { } // Contains checks if the stack pointer is within this stack. -func (s *SignalStack) Contains(sp usermem.Addr) bool { - return usermem.Addr(s.Addr) < sp && sp <= usermem.Addr(s.Addr+s.Size) +func (s *SignalStack) Contains(sp hostarch.Addr) bool { + return hostarch.Addr(s.Addr) < sp && sp <= hostarch.Addr(s.Addr+s.Size) } // NativeSignalStack is a type that is equivalent to stack_t in the guest -- cgit v1.2.3