summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fsimpl')
-rw-r--r--pkg/sentry/fsimpl/verity/BUILD1
-rw-r--r--pkg/sentry/fsimpl/verity/verity.go6
2 files changed, 6 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/verity/BUILD b/pkg/sentry/fsimpl/verity/BUILD
index 814eb2085..bc8e38431 100644
--- a/pkg/sentry/fsimpl/verity/BUILD
+++ b/pkg/sentry/fsimpl/verity/BUILD
@@ -13,6 +13,7 @@ go_library(
"//pkg/abi/linux",
"//pkg/context",
"//pkg/fspath",
+ "//pkg/marshal/primitive",
"//pkg/merkletree",
"//pkg/sentry/arch",
"//pkg/sentry/fs/lock",
diff --git a/pkg/sentry/fsimpl/verity/verity.go b/pkg/sentry/fsimpl/verity/verity.go
index e352ce197..249cc1341 100644
--- a/pkg/sentry/fsimpl/verity/verity.go
+++ b/pkg/sentry/fsimpl/verity/verity.go
@@ -28,6 +28,7 @@ import (
"gvisor.dev/gvisor/pkg/abi/linux"
"gvisor.dev/gvisor/pkg/context"
"gvisor.dev/gvisor/pkg/fspath"
+ "gvisor.dev/gvisor/pkg/marshal/primitive"
"gvisor.dev/gvisor/pkg/merkletree"
"gvisor.dev/gvisor/pkg/sentry/arch"
@@ -598,7 +599,10 @@ func (fd *fileDescription) getFlags(ctx context.Context, uio usermem.IO, args ar
if len(fd.d.rootHash) != 0 {
f |= linux.FS_VERITY_FL
}
- _, err := kernel.TaskFromContext(ctx).CopyOut(args[2].Pointer(), f)
+
+ t := kernel.TaskFromContext(ctx)
+ addr := args[2].Pointer()
+ _, err := primitive.CopyInt32Out(t, addr, f)
return 0, err
}