systrap: enabled the context decoupling feature by default

PiperOrigin-RevId: 519880828
This commit is contained in:
Andrei Vagin
2023-03-27 18:04:44 -07:00
committed by gVisor bot
parent df2bf5201c
commit 05f88d6490
4 changed files with 5 additions and 6 deletions
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build !context_decoupling
// +build !context_decoupling
//go:build context_decoupling_disabled
// +build context_decoupling_disabled
package systrap
@@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//go:build context_decoupling
// +build context_decoupling
//go:build !context_decoupling_disabled
// +build !context_decoupling_disabled
package systrap
@@ -764,6 +764,7 @@ func (s *subprocess) switchToApp(c *context, ac *arch.Context64) (isSyscall bool
// Copy register state locally.
regs.PtraceRegs = ctx.shared.Regs
retrieveArchSpecificState(ctx.shared, ac)
c.needToPullFullState = true
// We have a signal. We verify however, that the signal was
// either delivered from the kernel or from this process. We
// don't respect other signals.
-2
View File
@@ -170,8 +170,6 @@ func (c *context) FullStateChanged() {
// Switch runs the provided context in the given address space.
func (c *context) Switch(ctx pkgcontext.Context, mm platform.MemoryManager, ac *arch.Context64, cpu int32) (*linux.SignalInfo, hostarch.AccessType, error) {
c.needToPullFullState = true
as := mm.AddressSpace()
s := as.(*subprocess)
if err := s.activateContext(c); err != nil {