summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fs/proc
diff options
context:
space:
mode:
authorNicolas Lacasse <nlacasse@google.com>2019-04-29 14:03:04 -0700
committerShentubot <shentubot@google.com>2019-04-29 14:04:14 -0700
commitf4ce43e1f426148d99c28c1b0e5c43ddda17a8cb (patch)
treeef64d18350874742742599c8b059b333eb060920 /pkg/sentry/fs/proc
parent38e627644756400413fffe7222cdd5200dc4eccf (diff)
Allow and document bug ids in gVisor codebase.
PiperOrigin-RevId: 245818639 Change-Id: I03703ef0fb9b6675955637b9fe2776204c545789
Diffstat (limited to 'pkg/sentry/fs/proc')
-rw-r--r--pkg/sentry/fs/proc/README.md12
-rw-r--r--pkg/sentry/fs/proc/fds.go2
-rw-r--r--pkg/sentry/fs/proc/loadavg.go2
-rw-r--r--pkg/sentry/fs/proc/meminfo.go6
-rw-r--r--pkg/sentry/fs/proc/mounts.go2
-rw-r--r--pkg/sentry/fs/proc/net.go2
-rw-r--r--pkg/sentry/fs/proc/stat.go12
-rw-r--r--pkg/sentry/fs/proc/sys_net.go2
-rw-r--r--pkg/sentry/fs/proc/task.go8
-rw-r--r--pkg/sentry/fs/proc/version.go2
10 files changed, 25 insertions, 25 deletions
diff --git a/pkg/sentry/fs/proc/README.md b/pkg/sentry/fs/proc/README.md
index 3cc5f197c..5d4ec6c7b 100644
--- a/pkg/sentry/fs/proc/README.md
+++ b/pkg/sentry/fs/proc/README.md
@@ -91,7 +91,7 @@ CPU.IO utilization in last 10 minutes | Always zero
Num currently running processes | Always zero
Total num processes | Always zero
-TODO: Populate the columns with accurate statistics.
+TODO(b/62345059): Populate the columns with accurate statistics.
### meminfo
@@ -128,12 +128,12 @@ Field name | Notes
Buffers | Always zero, no block devices
SwapCache | Always zero, no swap
Inactive(anon) | Always zero, see SwapCache
-Unevictable | Always zero TODO
-Mlocked | Always zero TODO
+Unevictable | Always zero TODO(b/31823263)
+Mlocked | Always zero TODO(b/31823263)
SwapTotal | Always zero, no swap
SwapFree | Always zero, no swap
-Dirty | Always zero TODO
-Writeback | Always zero TODO
+Dirty | Always zero TODO(b/31823263)
+Writeback | Always zero TODO(b/31823263)
MemAvailable | Uses the same value as MemFree since there is no swap.
Slab | Missing
SReclaimable | Missing
@@ -185,7 +185,7 @@ softirq 0 0 0 0 0 0 0 0 0 0 0
All fields except for `btime` are always zero.
-TODO: Populate with accurate fields.
+TODO(b/37226836): Populate with accurate fields.
### sys
diff --git a/pkg/sentry/fs/proc/fds.go b/pkg/sentry/fs/proc/fds.go
index 25da06f5d..f2329e623 100644
--- a/pkg/sentry/fs/proc/fds.go
+++ b/pkg/sentry/fs/proc/fds.go
@@ -258,7 +258,7 @@ func newFdInfoDir(t *kernel.Task, msrc *fs.MountSource) *fs.Inode {
// Lookup loads an fd in /proc/TID/fdinfo into a Dirent.
func (fdid *fdInfoDir) Lookup(ctx context.Context, dir *fs.Inode, p string) (*fs.Dirent, error) {
inode, err := walkDescriptors(fdid.t, p, func(file *fs.File, fdFlags kernel.FDFlags) *fs.Inode {
- // TODO: Using a static inode here means that the
+ // TODO(b/121266871): Using a static inode here means that the
// data can be out-of-date if, for instance, the flags on the
// FD change before we read this file. We should switch to
// generating the data on Read(). Also, we should include pos,
diff --git a/pkg/sentry/fs/proc/loadavg.go b/pkg/sentry/fs/proc/loadavg.go
index 78f3a1dc0..3ee0e570a 100644
--- a/pkg/sentry/fs/proc/loadavg.go
+++ b/pkg/sentry/fs/proc/loadavg.go
@@ -40,7 +40,7 @@ func (d *loadavgData) ReadSeqFileData(ctx context.Context, h seqfile.SeqHandle)
var buf bytes.Buffer
- // TODO: Include real data in fields.
+ // TODO(b/62345059): Include real data in fields.
// Column 1-3: CPU and IO utilization of the last 1, 5, and 10 minute periods.
// Column 4-5: currently running processes and the total number of processes.
// Column 6: the last process ID used.
diff --git a/pkg/sentry/fs/proc/meminfo.go b/pkg/sentry/fs/proc/meminfo.go
index 620e93ce3..75cbf3e77 100644
--- a/pkg/sentry/fs/proc/meminfo.go
+++ b/pkg/sentry/fs/proc/meminfo.go
@@ -58,7 +58,7 @@ func (d *meminfoData) ReadSeqFileData(ctx context.Context, h seqfile.SeqHandle)
fmt.Fprintf(&buf, "MemTotal: %8d kB\n", totalSize/1024)
memFree := (totalSize - totalUsage) / 1024
// We use MemFree as MemAvailable because we don't swap.
- // TODO: When reclaim is implemented the value of MemAvailable
+ // TODO(rahat): When reclaim is implemented the value of MemAvailable
// should change.
fmt.Fprintf(&buf, "MemFree: %8d kB\n", memFree)
fmt.Fprintf(&buf, "MemAvailable: %8d kB\n", memFree)
@@ -72,8 +72,8 @@ func (d *meminfoData) ReadSeqFileData(ctx context.Context, h seqfile.SeqHandle)
fmt.Fprintf(&buf, "Inactive(anon): 0 kB\n")
fmt.Fprintf(&buf, "Active(file): %8d kB\n", activeFile/1024)
fmt.Fprintf(&buf, "Inactive(file): %8d kB\n", inactiveFile/1024)
- fmt.Fprintf(&buf, "Unevictable: 0 kB\n") // TODO
- fmt.Fprintf(&buf, "Mlocked: 0 kB\n") // TODO
+ fmt.Fprintf(&buf, "Unevictable: 0 kB\n") // TODO(b/31823263)
+ fmt.Fprintf(&buf, "Mlocked: 0 kB\n") // TODO(b/31823263)
fmt.Fprintf(&buf, "SwapTotal: 0 kB\n")
fmt.Fprintf(&buf, "SwapFree: 0 kB\n")
fmt.Fprintf(&buf, "Dirty: 0 kB\n")
diff --git a/pkg/sentry/fs/proc/mounts.go b/pkg/sentry/fs/proc/mounts.go
index 1e62af8c6..fe62b167b 100644
--- a/pkg/sentry/fs/proc/mounts.go
+++ b/pkg/sentry/fs/proc/mounts.go
@@ -114,7 +114,7 @@ func (mif *mountInfoFile) ReadSeqFileData(ctx context.Context, handle seqfile.Se
// (4) Root: the pathname of the directory in the filesystem
// which forms the root of this mount.
//
- // NOTE: This will always be "/" until we implement
+ // NOTE(b/78135857): This will always be "/" until we implement
// bind mounts.
fmt.Fprintf(&buf, "/ ")
diff --git a/pkg/sentry/fs/proc/net.go b/pkg/sentry/fs/proc/net.go
index 55a958f9e..d24b2d370 100644
--- a/pkg/sentry/fs/proc/net.go
+++ b/pkg/sentry/fs/proc/net.go
@@ -154,7 +154,7 @@ func (n *netDev) ReadSeqFileData(ctx context.Context, h seqfile.SeqHandle) ([]se
contents[1] = " face |bytes packets errs drop fifo frame compressed multicast|bytes packets errs drop fifo colls carrier compressed\n"
for _, i := range interfaces {
- // TODO: Collect stats from each inet.Stack
+ // TODO(b/71872867): Collect stats from each inet.Stack
// implementation (hostinet, epsocket, and rpcinet).
// Implements the same format as
diff --git a/pkg/sentry/fs/proc/stat.go b/pkg/sentry/fs/proc/stat.go
index f2bbef375..18bd8e9b6 100644
--- a/pkg/sentry/fs/proc/stat.go
+++ b/pkg/sentry/fs/proc/stat.go
@@ -83,7 +83,7 @@ func (s *statData) ReadSeqFileData(ctx context.Context, h seqfile.SeqHandle) ([]
var buf bytes.Buffer
- // TODO: We currently export only zero CPU stats. We could
+ // TODO(b/37226836): We currently export only zero CPU stats. We could
// at least provide some aggregate stats.
var cpu cpuStats
fmt.Fprintf(&buf, "cpu %s\n", cpu)
@@ -100,7 +100,7 @@ func (s *statData) ReadSeqFileData(ctx context.Context, h seqfile.SeqHandle) ([]
const numInterrupts = 256
// The Kernel doesn't handle real interrupts, so report all zeroes.
- // TODO: We could count page faults as #PF.
+ // TODO(b/37226836): We could count page faults as #PF.
fmt.Fprintf(&buf, "intr 0") // total
for i := 0; i < numInterrupts; i++ {
fmt.Fprintf(&buf, " 0")
@@ -108,22 +108,22 @@ func (s *statData) ReadSeqFileData(ctx context.Context, h seqfile.SeqHandle) ([]
fmt.Fprintf(&buf, "\n")
// Total number of context switches.
- // TODO: Count this.
+ // TODO(b/37226836): Count this.
fmt.Fprintf(&buf, "ctxt 0\n")
// CLOCK_REALTIME timestamp from boot, in seconds.
fmt.Fprintf(&buf, "btime %d\n", s.k.Timekeeper().BootTime().Seconds())
// Total number of clones.
- // TODO: Count this.
+ // TODO(b/37226836): Count this.
fmt.Fprintf(&buf, "processes 0\n")
// Number of runnable tasks.
- // TODO: Count this.
+ // TODO(b/37226836): Count this.
fmt.Fprintf(&buf, "procs_running 0\n")
// Number of tasks waiting on IO.
- // TODO: Count this.
+ // TODO(b/37226836): Count this.
fmt.Fprintf(&buf, "procs_blocked 0\n")
// Number of each softirq handled.
diff --git a/pkg/sentry/fs/proc/sys_net.go b/pkg/sentry/fs/proc/sys_net.go
index 728a46a74..0ce77f04f 100644
--- a/pkg/sentry/fs/proc/sys_net.go
+++ b/pkg/sentry/fs/proc/sys_net.go
@@ -39,7 +39,7 @@ const (
// tcpMemInode is used to read/write the size of netstack tcp buffers.
//
-// TODO: If we have multiple proc mounts, concurrent writes can
+// TODO(b/121381035): If we have multiple proc mounts, concurrent writes can
// leave netstack and the proc files in an inconsistent state. Since we set the
// buffer size from these proc files on restore, we may also race and end up in
// an inconsistent state on restore.
diff --git a/pkg/sentry/fs/proc/task.go b/pkg/sentry/fs/proc/task.go
index 0edcdfce2..9f65a8337 100644
--- a/pkg/sentry/fs/proc/task.go
+++ b/pkg/sentry/fs/proc/task.go
@@ -77,7 +77,7 @@ func newTaskDir(t *kernel.Task, msrc *fs.MountSource, pidns *kernel.PIDNamespace
"fd": newFdDir(t, msrc),
"fdinfo": newFdInfoDir(t, msrc),
"gid_map": newGIDMap(t, msrc),
- // FIXME: create the correct io file for threads.
+ // FIXME(b/123511468): create the correct io file for threads.
"io": newIO(t, msrc),
"maps": newMaps(t, msrc),
"mountinfo": seqfile.NewSeqFileInode(t, &mountInfoFile{t: t}, msrc),
@@ -93,7 +93,7 @@ func newTaskDir(t *kernel.Task, msrc *fs.MountSource, pidns *kernel.PIDNamespace
contents["task"] = newSubtasks(t, msrc, pidns)
}
- // TODO: Set EUID/EGID based on dumpability.
+ // TODO(b/31916171): Set EUID/EGID based on dumpability.
d := &taskDir{
Dir: *ramfs.NewDir(t, contents, fs.RootOwner, fs.FilePermsFromMode(0555)),
t: t,
@@ -245,7 +245,7 @@ func (e *exe) executable() (d *fs.Dirent, err error) {
e.t.WithMuLocked(func(t *kernel.Task) {
mm := t.MemoryManager()
if mm == nil {
- // TODO: Check shouldn't allow Readlink once the
+ // TODO(b/34851096): Check shouldn't allow Readlink once the
// Task is zombied.
err = syserror.EACCES
return
@@ -297,7 +297,7 @@ type namespaceSymlink struct {
}
func newNamespaceSymlink(t *kernel.Task, msrc *fs.MountSource, name string) *fs.Inode {
- // TODO: Namespace symlinks should contain the namespace name and the
+ // TODO(rahat): Namespace symlinks should contain the namespace name and the
// inode number for the namespace instance, so for example user:[123456]. We
// currently fake the inode number by sticking the symlink inode in its
// place.
diff --git a/pkg/sentry/fs/proc/version.go b/pkg/sentry/fs/proc/version.go
index b6d49d5e9..58e0c793c 100644
--- a/pkg/sentry/fs/proc/version.go
+++ b/pkg/sentry/fs/proc/version.go
@@ -65,7 +65,7 @@ func (v *versionData) ReadSeqFileData(ctx context.Context, h seqfile.SeqHandle)
// Since we don't really want to expose build information to
// applications, those fields are omitted.
//
- // FIXME: Using Version from the init task SyscallTable
+ // FIXME(mpratt): Using Version from the init task SyscallTable
// disregards the different version a task may have (e.g., in a uts
// namespace).
ver := init.Leader().SyscallTable().Version