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>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1105161334120.4353@chino.kir.corp.google.com>
Date:	Mon, 16 May 2011 13:34:46 -0700 (PDT)
From:	David Rientjes <rientjes@...gle.com>
To:	linux-kernel@...r.kernel.org
cc:	mm-commits@...r.kernel.org, dkiper@...-space.pl,
	dave@...ux.vnet.ibm.com
Subject: Re: + mm-enable-set_page_section-only-if-config_sparsemem-and-config_sparsemem_vmemmap.patch
 added to -mm tree

On Tue, 3 May 2011, akpm@...ux-foundation.org wrote:

> 
> The patch titled
>      mm: enable set_page_section() only if CONFIG_SPARSEMEM and !CONFIG_SPARSEMEM_VMEMMAP
> has been added to the -mm tree.  Its filename is
>      mm-enable-set_page_section-only-if-config_sparsemem-and-config_sparsemem_vmemmap.patch
> 
> Before you just go and hit "reply", please:
>    a) Consider who else should be cc'ed
>    b) Prefer to cc a suitable mailing list as well
>    c) Ideally: find the original patch on the mailing list and do a
>       reply-to-all to that, adding suitable additional cc's
> 
> *** Remember to use Documentation/SubmitChecklist when testing your code ***
> 
> See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find
> out what to do about this
> 
> The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/
> 
> ------------------------------------------------------
> Subject: mm: enable set_page_section() only if CONFIG_SPARSEMEM and !CONFIG_SPARSEMEM_VMEMMAP
> From: Daniel Kiper <dkiper@...-space.pl>
> 
> set_page_section() is valid only in CONFIG_SPARSEMEM and
> !CONFIG_SPARSEMEM_VMEMMAP context.  Move it to proper place and amend
> accordingly functions which are using it.
> 

set_page_section() is always valid, but only meaningful for 
CONFIG_SPARSEMEM.

Needs s/valid/meaningful/.

After that:

Acked-by: David Rientjes <rientjes@...gle.com>

> Signed-off-by: Daniel Kiper <dkiper@...-space.pl>
> Acked-by: Dave Hansen <dave@...ux.vnet.ibm.com>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
> ---
> 
>  include/linux/mm.h |   14 ++++++++------
>  1 file changed, 8 insertions(+), 6 deletions(-)
> 
> diff -puN include/linux/mm.h~mm-enable-set_page_section-only-if-config_sparsemem-and-config_sparsemem_vmemmap include/linux/mm.h
> --- a/include/linux/mm.h~mm-enable-set_page_section-only-if-config_sparsemem-and-config_sparsemem_vmemmap
> +++ a/include/linux/mm.h
> @@ -682,6 +682,12 @@ static inline struct zone *page_zone(str
>  }
>  
>  #if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
> +static inline void set_page_section(struct page *page, unsigned long section)
> +{
> +	page->flags &= ~(SECTIONS_MASK << SECTIONS_PGSHIFT);
> +	page->flags |= (section & SECTIONS_MASK) << SECTIONS_PGSHIFT;
> +}
> +
>  static inline unsigned long page_to_section(struct page *page)
>  {
>  	return (page->flags >> SECTIONS_PGSHIFT) & SECTIONS_MASK;
> @@ -700,18 +706,14 @@ static inline void set_page_node(struct 
>  	page->flags |= (node & NODES_MASK) << NODES_PGSHIFT;
>  }
>  
> -static inline void set_page_section(struct page *page, unsigned long section)
> -{
> -	page->flags &= ~(SECTIONS_MASK << SECTIONS_PGSHIFT);
> -	page->flags |= (section & SECTIONS_MASK) << SECTIONS_PGSHIFT;
> -}
> -
>  static inline void set_page_links(struct page *page, enum zone_type zone,
>  	unsigned long node, unsigned long pfn)
>  {
>  	set_page_zone(page, zone);
>  	set_page_node(page, node);
> +#if defined(CONFIG_SPARSEMEM) && !defined(CONFIG_SPARSEMEM_VMEMMAP)
>  	set_page_section(page, pfn_to_section_nr(pfn));
> +#endif
>  }
>  
>  /*
> _
> 
> Patches currently in -mm which might be from dkiper@...-space.pl are
> 
> linux-next.patch
> mm-remove-dependency-on-config_flatmem-from-online_page.patch
> mm-enable-set_page_section-only-if-config_sparsemem-and-config_sparsemem_vmemmap.patch
> mm-pfn_to_section_nr-section_nr_to_pfn-is-valid-only-in-config_sparsemem-context.patch
> mm-do-not-define-pfn_section_shift-if-config_sparsemem.patch
> 
> --
> To unsubscribe from this list: send the line "unsubscribe mm-commits" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
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