Commit graph

5 commits

Author SHA1 Message Date
David van Moolenbroek 6f374faca5 Add "expected size" parameter to getsysinfo()
This patch provides basic protection against damage resulting from
differently compiled servers blindly copying tables to one another.
In every getsysinfo() call, the caller is provided with the expected
size of the requested data structure. The callee fails the call if
the expected size does not match the data structure's actual size.
2011-12-11 22:34:14 +01:00
David van Moolenbroek 9701e9dfd2 Servers: cleanup of some gcc -W warnings 2011-12-11 22:33:37 +01:00
Ben Gras c24d15b2db pm: add mproc table sanity check feature
. make procfs check it
	. detects pm/procfs mismatches
	. was triggered by ack/clang pm/procfs:
	  add padding to mproc struct to align ack/clang layout
	  to fix this
2011-11-18 17:18:10 +01:00
David van Moolenbroek 0812293b47 procfs: fix for PID reuse between updates
In certain cases, a process ID may be reused between two lazy updates
of procfs's PID table. If the new associated process slot has a lower
index than the old one, this will trigger an assert in vtreefs, as the
new PID name entry is added before the old one is removed. This patch
fixes the problem by always first removing old PID name entries before
adding new ones.

Bug reported by Stephen Hatton.
2011-11-01 23:50:55 +00:00
David van Moolenbroek 2c5c5c06ea ProcFS server, by Alen Stojanov and David van Moolenbroek 2010-09-14 21:25:25 +00:00