summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/proc/sys.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/sentry/fs/proc/sys.go')
-rw-r--r--pkg/sentry/fs/proc/sys.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/sentry/fs/proc/sys.go b/pkg/sentry/fs/proc/sys.go
index a2d36ca23..384b4ffe1 100644
--- a/pkg/sentry/fs/proc/sys.go
+++ b/pkg/sentry/fs/proc/sys.go
@@ -17,7 +17,9 @@ package proc
import (
"fmt"
"io"
+ "strconv"
+ "gvisor.googlesource.com/gvisor/pkg/abi/linux"
"gvisor.googlesource.com/gvisor/pkg/sentry/context"
"gvisor.googlesource.com/gvisor/pkg/sentry/fs"
"gvisor.googlesource.com/gvisor/pkg/sentry/fs/proc/seqfile"
@@ -102,6 +104,10 @@ func (p *proc) newKernelDir(ctx context.Context, msrc *fs.MountSource) *fs.Inode
d := &ramfs.Dir{}
d.InitDir(ctx, nil, fs.RootOwner, fs.FilePermsFromMode(0555))
d.AddChild(ctx, "hostname", p.newHostname(ctx, msrc))
+
+ d.AddChild(ctx, "shmmax", p.newStubProcFSFile(ctx, msrc, []byte(strconv.FormatUint(linux.SHMMAX, 10))))
+ d.AddChild(ctx, "shmall", p.newStubProcFSFile(ctx, msrc, []byte(strconv.FormatUint(linux.SHMALL, 10))))
+ d.AddChild(ctx, "shmmni", p.newStubProcFSFile(ctx, msrc, []byte(strconv.FormatUint(linux.SHMMNI, 10))))
return newFile(d, msrc, fs.SpecialDirectory, nil)
}