> +static void seq_print_vma_name(struct seq_file *m, struct vm_area_struct *vma) > +{ > + const char __user *name = vma_get_anon_name(vma); > + struct mm_struct *mm = vma->vm_mm; > + > + unsigned long page_start_vaddr; > + unsigned long page_offset; > + unsigned long num_pages; > + unsigned long max_len = NAME_MAX; > + int i; > + > + page_start_vaddr = (unsigned long)name & PAGE_MASK; > + page_offset = (unsigned long)name - page_start_vaddr; > + num_pages = DIV_ROUND_UP(page_offset + max_len, PAGE_SIZE); > + > + seq_puts(m, "[anon:"); > + > + for (i = 0; i < num_pages; i++) { > + int len; > + int write_len; > + const char *kaddr; > + long pages_pinned; > + struct page *page; > + > + pages_pinned = get_user_pages(current, mm, page_start_vaddr, > + 1, 0, 0, &page, NULL); > + if (pages_pinned < 1) { > + seq_puts(m, "<fault>]"); > + return; > + } > + > + kaddr = (const char *)kmap(page); > + len = min(max_len, PAGE_SIZE - page_offset); You can't show the name if the name is placed in end of page. -- 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>