ELF programs and proc fs problems

Helmut Geyer (Helmut.Geyer@IWR.Uni-Heidelberg.De)
Mon, 23 Oct 1995 13:32:06 +0100 (MET)


Hello !

When trying to fix the procps utilities for ELF kernels and executables,
I encountered some problems concerning ELF programs and
the internal task_strukt and mmm_struct information as defined in
sched.h.
There is (sometimes) a huge difference between some fields
that should approximately be the same (here some exampels, but most
of them are inconcsitencies of the summary fields of the task_struct
or mm_struct structure with the real memory statistics when you look
at the vm area):
The rss filed in mm_struct differs from the calculated field (as done in
fs/proc/array.c:get_statm). This difference is in no way regular, so all
utilities using the rss field are near to useless for information on
real memory allocation. The same is true for vize computed in
fs/proc/array.c:get_stat. It usually is far to small. the corresponding
value size from get_statm give the correct value.
Why are the differences that large when using ELF? With a.out executables
the differences usually are small.

A second, though completely different problem is the number of used
shared library pages. This is (at the moment) not supported for ELF
libraries as the old mechanism simply counts all pages located in
visible space above 0x60000000.
This clearly can only work on a.out libraries, as no ELF library will
be loaded above this address. As there is no universal address space
reserved for ELF libraries, a scheme like this cannot work. How could
similar functionality be introduced when running ELF?

Helmut

PS: I mailed several times to the procps maintainer and didn't get any
replies. Does anyone know who is responsible for procps at this
time and how to contact him/her?

------------------------------------------------------------------------------
Helmut Geyer Helmut.Geyer@iwr.uni-heidelberg.de