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: <20100319152934.c4243698.kamezawa.hiroyu@jp.fujitsu.com>
Date:	Fri, 19 Mar 2010 15:29:34 +0900
From:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
To:	Naoya Horiguchi <n-horiguchi@...jp.nec.com>
Cc:	linux-kernel@...r.kernel.org, linux-mm@...ck.org,
	akpm@...ux-foundation.org, andi.kleen@...el.com,
	fengguang.wu@...el.com
Subject: Re: [PATCH 1/2] pagemap: add #ifdefs CONFIG_HUGETLB_PAGE on code
 walking hugetlb vma

On Fri, 19 Mar 2010 15:26:35 +0900
Naoya Horiguchi <n-horiguchi@...jp.nec.com> wrote:

> If !CONFIG_HUGETLB_PAGE, pagemap_hugetlb_range() is never called.
> So put it (and its calling function) into #ifdef block.
> 
> Signed-off-by: Naoya Horiguchi <n-horiguchi@...jp.nec.com>

Hmm? What is benefit ? Is this broken now ?

Thanks,
-Kame

> ---
>  fs/proc/task_mmu.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 183f8ff..2a3ef17 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -652,6 +652,7 @@ static int pagemap_pte_range(pmd_t *pmd, unsigned long addr, unsigned long end,
>  	return err;
>  }
>  
> +#ifdef CONFIG_HUGETLB_PAGE
>  static u64 huge_pte_to_pagemap_entry(pte_t pte, int offset)
>  {
>  	u64 pme = 0;
> @@ -695,6 +696,7 @@ static int pagemap_hugetlb_range(pte_t *pte, unsigned long addr,
>  
>  	return err;
>  }
> +#endif /* HUGETLB_PAGE */
>  
>  /*
>   * /proc/pid/pagemap - an array mapping virtual pages to pfns
> @@ -788,7 +790,9 @@ static ssize_t pagemap_read(struct file *file, char __user *buf,
>  
>  	pagemap_walk.pmd_entry = pagemap_pte_range;
>  	pagemap_walk.pte_hole = pagemap_pte_hole;
> +#ifdef CONFIG_HUGETLB_PAGE
>  	pagemap_walk.hugetlb_entry = pagemap_hugetlb_range;
> +#endif
>  	pagemap_walk.mm = mm;
>  	pagemap_walk.private = &pm;
>  
> -- 
> 1.7.0
> 
> --
> 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/
> 

--
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