Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull core fixes from Ingo Molnar: "This fixes a particularly thorny munmap() bug with MPX, plus fixes a host build environment assumption in objtool" * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: objtool: Allow AR to be overridden with HOSTAR x86/mpx, mm/core: Fix recursive munmap() corruption
This commit is contained in:
@@ -881,9 +881,10 @@ static int mpx_unmap_tables(struct mm_struct *mm,
|
||||
* the virtual address region start...end have already been split if
|
||||
* necessary, and the 'vma' is the first vma in this range (start -> end).
|
||||
*/
|
||||
void mpx_notify_unmap(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
unsigned long start, unsigned long end)
|
||||
void mpx_notify_unmap(struct mm_struct *mm, unsigned long start,
|
||||
unsigned long end)
|
||||
{
|
||||
struct vm_area_struct *vma;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
@@ -902,11 +903,12 @@ void mpx_notify_unmap(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||
* which should not occur normally. Being strict about it here
|
||||
* helps ensure that we do not have an exploitable stack overflow.
|
||||
*/
|
||||
do {
|
||||
vma = find_vma(mm, start);
|
||||
while (vma && vma->vm_start < end) {
|
||||
if (vma->vm_flags & VM_MPX)
|
||||
return;
|
||||
vma = vma->vm_next;
|
||||
} while (vma && vma->vm_start < end);
|
||||
}
|
||||
|
||||
ret = mpx_unmap_tables(mm, start, end);
|
||||
if (ret)
|
||||
|
Reference in New Issue
Block a user