On Thu, 7 Dec 2006 17:07:22 -0800
david singleton <dsingleton@xxxxxxxxxx> wrote:
Attached is the 2.6.19 patch.
It still has the overflow bug.+ do {
+ ptent = *pte;
+ if (pte_present(ptent)) {
+ page = vm_normal_page(vma, addr, ptent);
+ if (page) {
+ if (pte_dirty(ptent))
+ mapcount = -page_mapcount(page);
+ else
+ mapcount = page_mapcount(page);
+ } else {
+ mapcount = 1;
+ }
+ }
+ seq_printf(m, " %d", mapcount);
+
+ } while (pte++, addr += PAGE_SIZE, addr != end);
Well that's cute. As long as both seq_file and pte-pages are of size
PAGE_SIZE, and as long as pte's are more than three bytes, this will not
overflow the seq_file output buffer.
hm. Unless the pages are all dirty and the mapcounts are all 10000. I
think it will overflow then?