summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/sys
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2020-11-09 12:13:13 -0800
committergVisor bot <gvisor-bot@google.com>2020-11-09 12:15:14 -0800
commitcbca5b2edde0920309029a0c591f28ce65cdad70 (patch)
tree01f580977a1385e190b4f0d04e8d0d61d4433ea3 /pkg/sentry/fsimpl/sys
parentd4e0b829e44356973e56d9fafa1cf43bb87a9ae0 (diff)
Print a debug message if /sys/kernel/debug/kcov is available
This will help to debug: https://syzkaller.appspot.com/bug?id=0d717bd7028dceeb4b38f09aab2841c398b41d81 PiperOrigin-RevId: 341458715
Diffstat (limited to 'pkg/sentry/fsimpl/sys')
-rw-r--r--pkg/sentry/fsimpl/sys/sys.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/sentry/fsimpl/sys/sys.go b/pkg/sentry/fsimpl/sys/sys.go
index 79bc3fe88..dbd9ebdda 100644
--- a/pkg/sentry/fsimpl/sys/sys.go
+++ b/pkg/sentry/fsimpl/sys/sys.go
@@ -23,6 +23,7 @@ import (
"gvisor.dev/gvisor/pkg/abi/linux"
"gvisor.dev/gvisor/pkg/context"
"gvisor.dev/gvisor/pkg/coverage"
+ "gvisor.dev/gvisor/pkg/log"
"gvisor.dev/gvisor/pkg/sentry/fsimpl/kernfs"
"gvisor.dev/gvisor/pkg/sentry/kernel"
"gvisor.dev/gvisor/pkg/sentry/kernel/auth"
@@ -126,6 +127,7 @@ func kernelDir(ctx context.Context, fs *filesystem, creds *auth.Credentials) ker
// keep it in sys.
var children map[string]kernfs.Inode
if coverage.KcovAvailable() {
+ log.Debugf("Set up /sys/kernel/debug/kcov")
children = map[string]kernfs.Inode{
"debug": fs.newDir(ctx, creds, linux.FileMode(0700), map[string]kernfs.Inode{
"kcov": fs.newKcovFile(ctx, creds),