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
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20230223024332.1337578-1-sunke@kylinos.cn>
Date:   Thu, 23 Feb 2023 10:43:32 +0800
From:   Ke Sun <sunke@...inos.cn>
To:     Andrew Morton <akpm@...ux-foundation.org>,
        Matthew Wilcox <willy@...radead.org>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        Ke Sun <sunke@...inos.cn>
Subject: [RESEND PATCH RFC] mm: pagemap: add vma(VM_PFNMAP) support in pagemap_pte_hole()

pagemap currently does not support vma(FIXMAP), add support
in pagemap_pte_hole().

Signed-off-by: Ke Sun <sunke@...inos.cn>
---
 fs/proc/task_mmu.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index af1c49ae11b1..297c7b9dc630 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -1400,6 +1400,11 @@ static int pagemap_pte_hole(unsigned long start, unsigned long end,
 		if (vma->vm_flags & VM_SOFTDIRTY)
 			pme = make_pme(0, PM_SOFT_DIRTY);
 		for (; addr < min(end, vma->vm_end); addr += PAGE_SIZE) {
+			if ((vma->vm_flags & VM_PFNMAP) && vma->vm_pgoff) {
+				unsigned long pgoff = (addr - vma->vm_start) >> PAGE_SHIFT;
+
+				pme = make_pme(vma->vm_pgoff + pgoff, PM_PRESENT);
+			}
 			err = add_to_pagemap(addr, &pme, pm);
 			if (err)
 				goto out;
-- 
2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ