On Fri, Jan 23, 2015 at 12:58:27PM +0100, Vincent Bernat wrote: > Same, but: > > $ cat /proc/1/smaps > cat: /proc/1/smaps: Permission denied A user, any user, is able to open that file. However only some users can read the file.
This is strace of more /proc/1/smaps the open succeeds but the read fails. open("/proc/1/smaps", O_RDONLY) = 3 fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f8c6c9cc000 lseek(3, 0, SEEK_SET) = 0 read(3, 0x7f8c6c9cc000, 1024) = -1 EACCES (Permission denied) The tests are correctly detecting something. Something in the kernel has changed (yet again) meaning that pmap's behaviour has changed, failing the test. If you run the exact same command on my computer and your computer, you will get a different result. Interestingly, cat gives permission denied, more does not though it doesn't print anything either. Can you strace pmap -X 1 and send me the output? What I'm looking for is, in my strace line 86 open("/proc/1/smaps", O_RDONLY) = 3 then 94,96 fstat(3, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0 read(3, 0x7f7026b42000, 1024) = -1 EACCES (Permission denied) This is equivalent of the fopen() working in one_proc and the read() failing in print_extended_maps I suspect that something strange is going on with the open() -- Craig Small (@smallsees) http://enc.com.au/ csmall at : enc.com.au Debian GNU/Linux http://www.debian.org/ csmall at : debian.org GPG fingerprint: 5D2F B320 B825 D939 04D2 0519 3938 F96B DF50 FEA5 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org