linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Stupid Q regarding reading /proc/PID/mem, etc
@ 2003-12-30 22:44 Calin A. Culianu
  0 siblings, 0 replies; only message in thread
From: Calin A. Culianu @ 2003-12-30 22:44 UTC (permalink / raw)
  To: linux-kernel


I have a probably annoying/dumb question:

Why does reading something that you don't have permission for from
/proc/PID, such as, oh /proc/PID/mem (normally unless you own PID you
can't read that even on lax systems) return -ESRCH to userland?  You'd
think it should return -EPERM right?

>From fs/proc/base.c::mem_read():

        if (!MAY_PTRACE(task) || !may_ptrace_attach(task))
                return -ESRCH;

Why not -EPERM?

-Calin




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-12-30 22:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-30 22:44 Stupid Q regarding reading /proc/PID/mem, etc Calin A. Culianu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).