/proc/(PID)/maps (access permissions)

KenjiroNakayama nakayamakennjirou at gmail.com
Wed Oct 12 22:08:38 EDT 2011


I want to know about /proc/<PID>/maps.
Whenever I looked at /proc/maps, it is mapping as many types of access
permissions.

 For example:
 /bin/cat => r-wp and rw-p access permissions
/lib64/ld-2.14.so => r-wp, r-xp and some  access permissions)

Why does it need to map some permissions? ( in my opinion,as it maps
into VM space, it just needs write permission...)

Thanks


$ cat /proc/self/maps

00400000-0040b000 r-xp 00000000 fd:01 925242
  /bin/cat         #
0060a000-0060b000 rw-p 0000a000 fd:01 925242
  /bin/cat        # <= why does it need two type?!
0060b000-0060c000 rw-p 00000000 00:00 0
0080a000-0080b000 rw-p 0000a000 fd:01 925242
  /bin/cat        # <= furthermore, it comes again!!!!
02144000-02165000 rw-p 00000000 00:00 0                                  [heap]
3ca7600000-3ca761f000 r-xp 00000000 fd:01 1058940
  /lib64/ld-2.14.so
3ca781e000-3ca781f000 r--p 0001e000 fd:01 1058940
  /lib64/ld-2.14.so
3ca781f000-3ca7820000 rw-p 0001f000 fd:01 1058940
  /lib64/ld-2.14.so         ## <= why three types of  access
permissions?!
3ca7820000-3ca7821000 rw-p 00000000 00:00 0
3ca7e00000-3ca7f8f000 r-xp 00000000 fd:01 1058941
  /lib64/libc-2.14.so
3ca7f8f000-3ca818f000 ---p 0018f000 fd:01 1058941
  /lib64/libc-2.14.so
3ca818f000-3ca8193000 r--p 0018f000 fd:01 1058941
  /lib64/libc-2.14.so
3ca8193000-3ca8194000 rw-p 00193000 fd:01 1058941
  /lib64/libc-2.14.so



More information about the Kernelnewbies mailing list