From aad76968cd5934ee17f36cd8e817e86ae952b533 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Sun, 30 Dec 2018 20:24:59 +0100 Subject: pmap: make 32-bit version work better on 64-bit kernels Signed-off-by: Denys Vlasenko --- include/libbb.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/libbb.h b/include/libbb.h index daa96728b..d2563999a 100644 --- a/include/libbb.h +++ b/include/libbb.h @@ -1828,7 +1828,12 @@ struct smaprec { unsigned long stack; unsigned long smap_pss, smap_swap; unsigned long smap_size; - unsigned long smap_start; + // For mixed 32/64 userspace, 32-bit pmap still needs + // 64-bit field here to correctly show 64-bit processes: + unsigned long long smap_start; + // (strictly speaking, other fields need to be wider too, + // but they are in kbytes, not bytes, and they hold sizes, + // not start addresses, sizes tend to be less than 4 terabytes) char smap_mode[5]; char *smap_name; }; -- cgit v1.2.3