Re: [PATCH v3 1/2] mm, proc: Fix region lost in /proc/self/smaps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri 23-09-16 15:50:51, Michal Hocko wrote:
> On Fri 23-09-16 21:12:33, Robert Ho wrote:
[...]
> > @@ -786,7 +791,7 @@ static int show_smap(struct seq_file *m, void *v, int is_pid)
> >  		   "KernelPageSize: %8lu kB\n"
> >  		   "MMUPageSize:    %8lu kB\n"
> >  		   "Locked:         %8lu kB\n",
> > -		   (vma->vm_end - vma->vm_start) >> 10,
> > +		   (vma->vm_end - max(vma->vm_start, m->version)) >> 10,
> >  		   mss.resident >> 10,
> >  		   (unsigned long)(mss.pss >> (10 + PSS_SHIFT)),
> >  		   mss.shared_clean  >> 10,

And forgot to mention that this is not sufficient either. You also need
to restrict the pte walk to get sane numbers...
-- 
Michal Hocko
SUSE Labs

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxx.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]