lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Mon, 6 Aug 2007 01:44:57 -0500 From: boutcher@...umn.edu (Dave Boutcher) To: Matt Mackall <mpm@...enic.com> CC: linux-kernel@...r.kernel.org, Dave Hansen <haveblue@...ibm.com>, Andrew Morton <akpm@...ux-foundation.org> Subject: [PATCH 3/3] Fix /proc/pid/pagemap unmapped page handling When reading /proc/pid/pagemap at an offset that does not contain mapped pages, call pagemap_fill to fill the buffer with -1 until either the end, or a valid vma is encountered. Signed-off-by: Dave Boutcher <boutcher@...umn.edu> --- fs/proc/task_mmu.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-) diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 1f78cb4..3978f31 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -671,10 +671,12 @@ static ssize_t pagemap_read(struct file *file, char __user *buf, ret = -EIO; goto out_mm; } - vend = min(vma->vm_start - 1, end - 1) + 1; - ret = pagemap_fill(&pm, vend); - if (ret || !pm.count) - break; + if (pm.next < vma->vm_start) { + vend = min(vma->vm_start - 1, end - 1) + 1; + pagemap_fill(&pm, vend); + continue; + } + vend = min(vma->vm_end - 1, end - 1) + 1; ret = walk_page_range(mm, vma->vm_start, vend, &pagemap_walk, &pm); -- 1.4.4.2 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists