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: <008a01d277a1$4d7021c0$e8506540$@alibaba-inc.com>
Date:   Thu, 26 Jan 2017 14:56:20 +0800
From:   "Hillf Danton" <hillf.zj@...baba-inc.com>
To:     "'Kirill A. Shutemov'" <kirill.shutemov@...ux.intel.com>,
        "'Andrea Arcangeli'" <aarcange@...hat.com>,
        "'Hugh Dickins'" <hughd@...gle.com>,
        "'Rik van Riel'" <riel@...hat.com>,
        "'Andrew Morton'" <akpm@...ux-foundation.org>
Cc:     <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCHv2 05/12] mm, rmap: check all VMAs that PTE-mapped THP can be part of


On January 26, 2017 2:26 AM Kirill A. Shutemov wrote: 
> @@ -333,12 +333,15 @@ __vma_address(struct page *page, struct vm_area_struct *vma)
>  static inline unsigned long
>  vma_address(struct page *page, struct vm_area_struct *vma)
>  {
> -	unsigned long address = __vma_address(page, vma);
> +	unsigned long start, end;
> +
> +	start = __vma_address(page, vma);
> +	end = start + PAGE_SIZE * (hpage_nr_pages(page) - 1);
> 
>  	/* page should be within @vma mapping range */
> -	VM_BUG_ON_VMA(address < vma->vm_start || address >= vma->vm_end, vma);
> +	VM_BUG_ON_VMA(end < vma->vm_start || start >= vma->vm_end, vma);
> 
> -	return address;
> +	return max(start, vma->vm_start);
>  }
Nit: currently it's buggy if page is not within the mapping range.
In this work fix is added for start if unlikely it goes outside range, and 
its currently relevant debugging is cut off.

Other than that,
Acked-by: Hillf Danton <hillf.zj@...baba-inc.com>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ