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] [thread-next>] [day] [month] [year] [list]
Message-ID: <88f0a142-a263-858d-83af-dc9abfc5bad8@suse.cz>
Date:   Wed, 26 Sep 2018 13:10:36 +0200
From:   Vlastimil Babka <vbabka@...e.cz>
To:     Yang Shi <yang.shi@...ux.alibaba.com>, mhocko@...nel.org,
        willy@...radead.org, ldufour@...ux.vnet.ibm.com,
        kirill@...temov.name, akpm@...ux-foundation.org
Cc:     dave.hansen@...el.com, oleg@...hat.com, srikar@...ux.vnet.ibm.com,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [v11 PATCH 2/3] mm: unmap VM_HUGETLB mappings with optimized path

On 9/19/18 7:03 PM, Yang Shi wrote:
> When unmapping VM_HUGETLB mappings, vm flags need to be updated. Since
> the vmas have been detached, so it sounds safe to update vm flags with
> read mmap_sem.
> 
> Cc: Michal Hocko <mhocko@...nel.org>
> Cc: Vlastimil Babka <vbabka@...e.cz>
> Reviewed-by: Matthew Wilcox <willy@...radead.org>
> Signed-off-by: Yang Shi <yang.shi@...ux.alibaba.com>

Acked-by: Vlastimil Babka <vbabka@...e.cz>

> ---
>  mm/mmap.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/mmap.c b/mm/mmap.c
> index 982dd00..490340e 100644
> --- a/mm/mmap.c
> +++ b/mm/mmap.c
> @@ -2777,7 +2777,7 @@ static int __do_munmap(struct mm_struct *mm, unsigned long start, size_t len,
>  			 * update vm_flags.
>  			 */
>  			if (downgrade &&
> -			    (tmp->vm_flags & (VM_HUGETLB | VM_PFNMAP)))
> +			    (tmp->vm_flags & VM_PFNMAP))
>  				downgrade = false;
>  
>  			tmp = tmp->vm_next;
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ