mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
Add Mems_allowed to /proc/PID/status
PiperOrigin-RevId: 286248378
This commit is contained in:
committed by
gVisor bot
parent
65f53c5833
commit
334a513f11
@@ -604,6 +604,10 @@ func (s *statusData) ReadSeqFileData(ctx context.Context, h seqfile.SeqHandle) (
|
||||
fmt.Fprintf(&buf, "CapEff:\t%016x\n", creds.EffectiveCaps)
|
||||
fmt.Fprintf(&buf, "CapBnd:\t%016x\n", creds.BoundingCaps)
|
||||
fmt.Fprintf(&buf, "Seccomp:\t%d\n", s.t.SeccompMode())
|
||||
// We unconditionally report a single NUMA node. See
|
||||
// pkg/sentry/syscalls/linux/sys_mempolicy.go.
|
||||
fmt.Fprintf(&buf, "Mems_allowed:\t1\n")
|
||||
fmt.Fprintf(&buf, "Mems_allowed_list:\t0\n")
|
||||
return []seqfile.SeqData{{Buf: buf.Bytes(), Handle: (*statusData)(nil)}}, 0
|
||||
}
|
||||
|
||||
|
||||
@@ -229,6 +229,10 @@ func (s *statusData) Generate(ctx context.Context, buf *bytes.Buffer) error {
|
||||
fmt.Fprintf(buf, "CapEff:\t%016x\n", creds.EffectiveCaps)
|
||||
fmt.Fprintf(buf, "CapBnd:\t%016x\n", creds.BoundingCaps)
|
||||
fmt.Fprintf(buf, "Seccomp:\t%d\n", s.t.SeccompMode())
|
||||
// We unconditionally report a single NUMA node. See
|
||||
// pkg/sentry/syscalls/linux/sys_mempolicy.go.
|
||||
fmt.Fprintf(buf, "Mems_allowed:\t1\n")
|
||||
fmt.Fprintf(buf, "Mems_allowed_list:\t0\n")
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user