Thread (52 messages) 52 messages, 7 authors, 2024-10-22

Re: [PATCH v2 2/5] mm: add PTE_MARKER_GUARD PTE marker

From: Lorenzo Stoakes <hidden>
Date: 2024-10-21 19:58:26
Also in: linux-alpha, linux-arch, linux-kselftest, linux-mips, linux-mm, lkml

On Mon, Oct 21, 2024 at 03:45:31PM +0200, Vlastimil Babka wrote:
[snip]
quoted
Signed-off-by: Lorenzo Stoakes <redacted>
Acked-by: Vlastimil Babka <redacted>
Thanks!
A nit below:
quoted
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 906294ac85dc..50e3f6ed73ac 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -6353,6 +6353,9 @@ vm_fault_t hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma,
 				ret = VM_FAULT_HWPOISON_LARGE |
 				      VM_FAULT_SET_HINDEX(hstate_index(h));
 				goto out_mutex;
+			} else if (marker & PTE_MARKER_GUARD) {
+				ret = VM_FAULT_SIGSEGV;
+				goto out_mutex;
Given we don't support hugetlb, should we WARN_ON_ONCE() if such unexpected
marker appears there?
Yes agreed, will add.

[snip]
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help