Skip to contentSkip to conversation

x86-sgx-use-vma_lookup-in-sgx_encl_find.patch removed from -mm tree

merged [email protected] 1 participant 1 message Jul 6, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: x86/sgx: use vma_lookup() in sgx_encl_find()
has been removed from the -mm tree. Its filename was
x86-sgx-use-vma_lookup-in-sgx_encl_find.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Liam Howlett <[email protected]>
Subject: x86/sgx: use vma_lookup() in sgx_encl_find()

Use vma_lookup() to find the VMA at a specific address. As vma_lookup() will return NULL if the address is not within any VMA, the start address no longer needs to be validated.

---

 arch/x86/kernel/cpu/sgx/encl.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kernel/cpu/sgx/encl.h renamed from arch/x86/kernel/cpu/sgx/encl.h~x86-sgx-use-vma_lookup-in-sgx_encl_find +2 -2
@@ -91,8 +91,8 @@ static inline int sgx_encl_find(struct m
 {
 	struct vm_area_struct *result;
 
-	result = find_vma(mm, addr);
-	if (!result || result->vm_ops != &sgx_vm_ops || addr < result->vm_start)
+	result = vma_lookup(mm, addr);
+	if (!result || result->vm_ops != &sgx_vm_ops)
 		return -EINVAL;
 
 	*vma = result;

_

Patches currently in -mm which might be from [email protected] are