google / gvisor

Application Kernel for Containers
https://gvisor.dev
Apache License 2.0
15.54k stars 1.28k forks source link

Implement /proc/self/mem #2716

Open ayushr2 opened 4 years ago

ayushr2 commented 4 years ago

/proc/self/mem is currently not implemented in procfs.

avideci commented 4 years ago

https://github.com/google/gvisor/blob/0e2f1b7abd219f39d67cc2cecd00c441a13eeb29/pkg/sentry/fs/proc/meminfo.go

Are you looking for this? An alias can be made, for /proc/self/meminfo -> /proc/self/mem.

ianlewis commented 4 years ago

@avideci Hi! meminfo is just a text file with memory stats. /proc/[pid|self]/mem allows direct access to memory pages.

See https://man7.org/linux/man-pages/man5/proc.5.html