summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2020-09-15 23:37:04 -0700
committergVisor bot <gvisor-bot@google.com>2020-09-15 23:38:57 -0700
commitd201feb8c5e425bfa8abc905f24d49b268520aec (patch)
treeb3aa642d325e2b95bb1a6d5a2f934b6683f61ede /pkg/sentry/fsimpl
parentdcd532e2e416aa81ca9ac42dc153731855f91418 (diff)
Enable automated marshalling for the syscall package.
PiperOrigin-RevId: 331940975
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
}