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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20171214093332.GG16951@dhcp22.suse.cz>
Date:   Thu, 14 Dec 2017 10:33:32 +0100
From:   Michal Hocko <mhocko@...nel.org>
To:     Anshuman Khandual <khandual@...ux.vnet.ibm.com>
Cc:     linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        akpm@...ux-foundation.org
Subject: Re: [PATCH] mm/mprotect: Add a cond_resched() inside
 change_pte_range()

On Thu 14-12-17 10:40:21, Anshuman Khandual wrote:
[...]
> diff --git a/mm/mprotect.c b/mm/mprotect.c
> index ec39f73..4fce0f5 100644
> --- a/mm/mprotect.c
> +++ b/mm/mprotect.c
> @@ -144,6 +144,7 @@ static unsigned long change_pte_range(struct vm_area_struct *vma, pmd_t *pmd,
>  	} while (pte++, addr += PAGE_SIZE, addr != end);
>  	arch_leave_lazy_mmu_mode();
>  	pte_unmap_unlock(pte - 1, ptl);
> +	cond_resched();
>  
>  	return pages;
>  }

I would put this one level up to change_pmd_range to catch large THP
backed regions. Something we do in zap_pmd_range. Other than that the
patch makes sense to me.
-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ