❦ 24 janvier 2015 13:40 +1100, Craig Small <csm...@debian.org> :

>> $ 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)

With 3.18:

open("/proc/1/smaps", O_RDONLY)         = -1 EACCES (Permission denied)

> 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)

Same as for more.
-- 
Use uniform input formats.
            - The Elements of Programming Style (Kernighan & Plauger)

Attachment: signature.asc
Description: PGP signature

Reply via email to