From a1cb52447f3e9414211b9e0558f1231ae3e59329 Mon Sep 17 00:00:00 2001 From: Jamie Liu Date: Fri, 13 Nov 2020 14:46:03 -0800 Subject: Check for misuse of kernel.Task as context.Context. Checks in Task.block() and Task.Value() are conditional on race detection being enabled, since these functions are relatively hot. Checks in Task.SleepStart() and Task.UninterruptibleSleepStart() are enabled unconditionally, since these functions are not thought to lie on any critical paths, and misuse of these functions is required for b/168241471 to manifest. PiperOrigin-RevId: 342342175 --- pkg/sentry/kernel/BUILD | 2 ++ 1 file changed, 2 insertions(+) (limited to 'pkg/sentry/kernel/BUILD') diff --git a/pkg/sentry/kernel/BUILD b/pkg/sentry/kernel/BUILD index ff9f0b81c..0ee60569c 100644 --- a/pkg/sentry/kernel/BUILD +++ b/pkg/sentry/kernel/BUILD @@ -179,6 +179,7 @@ go_library( "task_acct.go", "task_block.go", "task_clone.go", + "task_context.go", "task_exec.go", "task_exit.go", "task_futex.go", @@ -224,6 +225,7 @@ go_library( "//pkg/cpuid", "//pkg/eventchannel", "//pkg/fspath", + "//pkg/goid", "//pkg/log", "//pkg/marshal", "//pkg/marshal/primitive", -- cgit v1.2.3