Messages in this thread | ![/](/images/icornerl.gif) | | Date | Tue, 30 Dec 2003 17:44:34 -0500 (EST) | From | "Calin A. Culianu" <> | Subject | Stupid Q regarding reading /proc/PID/mem, etc |
| |
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
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |