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]
Date:	Wed, 21 Jan 2015 06:30:53 +0000
From:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
To:	Shiraz Hashim <shashim@...eaurora.org>
CC:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"oleg@...hat.com" <oleg@...hat.com>,
	"gorcunov@...nvz.org" <gorcunov@...nvz.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm: pagewalk: call pte_hole() for VM_PFNMAP during
 walk_page_range

On Wed, Jan 21, 2015 at 11:43:13AM +0530, Shiraz Hashim wrote:
> walk_page_range silently skips vma having VM_PFNMAP set,
> which leads to undesirable behaviour at client end (who
> called walk_page_range). For example for pagemap_read,
> when no callbacks are called against VM_PFNMAP vma,
> pagemap_read may prepare pagemap data for next virtual
> address range at wrong index.
> 
> Signed-off-by: Shiraz Hashim <shashim@...eaurora.org>

Thank you!

Acked-by: Naoya Horiguchi <n-horiguchi@...jp.nec.com>

> ---
> The fix is revised, based upon the suggestion here at
> http://www.spinics.net/lists/linux-mm/msg83058.html
> 
>  mm/pagewalk.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/mm/pagewalk.c b/mm/pagewalk.c
> index ad83195..b264bda 100644
> --- a/mm/pagewalk.c
> +++ b/mm/pagewalk.c
> @@ -199,7 +199,10 @@ int walk_page_range(unsigned long addr, unsigned long end,
>  			 */
>  			if ((vma->vm_start <= addr) &&
>  			    (vma->vm_flags & VM_PFNMAP)) {
> -				next = vma->vm_end;
> +				if (walk->pte_hole)
> +					err = walk->pte_hole(addr, next, walk);
> +				if (err)
> +					break;
>  				pgd = pgd_offset(walk->mm, next);
>  				continue;
>  			}
> -- 
> Shiraz Hashim
> 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
> member of the Code Aurora Forum, hosted by The Linux Foundation
> 
> --
> To unsubscribe, send a message with 'unsubscribe linux-mm' in
> the body to majordomo@...ck.org.  For more info on Linux MM,
> see: http://www.linux-mm.org/ .
> Don't email: <a href=mailto:"dont@...ck.org"> email@...ck.org </a>--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ