Re: Hopefully a simple question on /proc/pid/mem

Alexander Viro
2001-04-30T19:44:32Z

On Mon, 30 Apr 2001, Benjamin C.R. LaHaise wrote:

> On Mon, 30 Apr 2001, Alexander Viro wrote:
>
> > ITYM "disabling _write_ on /proc/*/mem". Read is OK. Anyway, current
> > mem_write() uses the same code as PTRACE_POKEDATA, so if the latter works,
> > the former also should be OK.
>
> Actually, even read on /proc/*/mem caused problems in 2.0: the elevated
> usage could would prevent memory from being reclaimed by the swapper
> properly. Things are so much better now it's not even funny.

ISTR removing some rather nasty code during the procfs rewrite. From
mem_read() and mem_write() - basically, made them wrappers around
access_process_vm().