diff --git a/pkg/sentry/fsimpl/devpts/devpts.go b/pkg/sentry/fsimpl/devpts/devpts.go index ed3342036..ab6427e06 100644 --- a/pkg/sentry/fsimpl/devpts/devpts.go +++ b/pkg/sentry/fsimpl/devpts/devpts.go @@ -243,8 +243,6 @@ type rootInode struct { replicas map[uint32]*replicaInode // nextIdx is the next pty index to use. Must be accessed atomically. - // - // TODO(b/29356795): reuse indices when ptys are closed. nextIdx uint32 } diff --git a/pkg/sentry/fsimpl/devpts/master.go b/pkg/sentry/fsimpl/devpts/master.go index 5bf13481f..5e0b8a8c7 100644 --- a/pkg/sentry/fsimpl/devpts/master.go +++ b/pkg/sentry/fsimpl/devpts/master.go @@ -156,18 +156,19 @@ func (mfd *masterFileDescription) Ioctl(ctx context.Context, io usermem.IO, sysn // of the replica end. return mfd.t.ld.setTermios(t, args) case linux.TCSETSW: - // TODO(b/29356795): This should drain the output queue first. + // Note that this should drain the output queue first, but we + // don't implement that yet. return mfd.t.ld.setTermios(t, args) case linux.TCSETSF: - // TODO(b/29356795): This should drain the output queue and - // clear the input queue first. + // This should drain the output queue and clear the input queue + // first, but we don't implement that yet. return mfd.t.ld.setTermios(t, args) case linux.TIOCGPTN: nP := primitive.Uint32(mfd.t.n) _, err := nP.CopyOut(t, args[2].Pointer()) return 0, err case linux.TIOCSPTLCK: - // TODO(b/29356795): Implement pty locking. For now just pretend we do. + // For now just pretend we implement pty locking. return 0, nil case linux.TIOCGWINSZ: return 0, mfd.t.ld.windowSize(t, args) diff --git a/pkg/sentry/fsimpl/devpts/replica.go b/pkg/sentry/fsimpl/devpts/replica.go index bc3083147..fedfc23ff 100644 --- a/pkg/sentry/fsimpl/devpts/replica.go +++ b/pkg/sentry/fsimpl/devpts/replica.go @@ -149,11 +149,12 @@ func (rfd *replicaFileDescription) Ioctl(ctx context.Context, io usermem.IO, sys case linux.TCSETS: return rfd.inode.t.ld.setTermios(t, args) case linux.TCSETSW: - // TODO(b/29356795): This should drain the output queue first. + // Note that this should drain the output queue first, but we + // don't implement that yet. return rfd.inode.t.ld.setTermios(t, args) case linux.TCSETSF: - // TODO(b/29356795): This should drain the output queue and - // clear the input queue first. + // This should drain the output queue and clear the input queue + // first, but we don't implement that yet. return rfd.inode.t.ld.setTermios(t, args) case linux.TIOCGPTN: nP := primitive.Uint32(rfd.inode.t.n) diff --git a/runsc/boot/vfs.go b/runsc/boot/vfs.go index c118bfc0a..67670df99 100644 --- a/runsc/boot/vfs.go +++ b/runsc/boot/vfs.go @@ -98,9 +98,7 @@ func registerFilesystems(k *kernel.Kernel, info *containerInfo) error { AllowUserList: true, }) vfsObj.MustRegisterFilesystemType(devpts.Name, &devpts.FilesystemType{}, &vfs.RegisterFilesystemTypeOptions{ - AllowUserList: true, - // TODO(b/29356795): Users may mount this once the terminals are in a - // usable state. + AllowUserList: true, AllowUserMount: true, }) vfsObj.MustRegisterFilesystemType(dev.Name, &dev.FilesystemType{}, &vfs.RegisterFilesystemTypeOptions{})