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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130114184308.GD5126@dhcp22.suse.cz>
Date:	Mon, 14 Jan 2013 19:43:08 +0100
From:	Michal Hocko <mhocko@...e.cz>
To:	Lin Feng <linfeng@...fujitsu.com>
Cc:	akpm@...ux-foundation.org, linux-mm@...ck.org,
	wency@...fujitsu.com, jiang.liu@...wei.com, laijs@...fujitsu.com,
	isimatu.yasuaki@...fujitsu.com, linux-kernel@...r.kernel.org,
	tangchen@...fujitsu.com
Subject: Re: [PATCH] memory-hotplug: revert register_page_bootmem_info_node()
 to empty when platform related code is not implemented

On Mon 14-01-13 18:53:55, Lin Feng wrote:
> Memory-hotplug codes for x86_64 have been implemented by patchset:
> https://lkml.org/lkml/2013/1/9/124
> While other platforms haven't been completely implemented yet.
> 
> If we enable both CONFIG_MEMORY_HOTPLUG_SPARSE and CONFIG_SPARSEMEM_VMEMMAP,
> register_page_bootmem_info_node() may be buggy, which is a hotplug generic
> function but falling back to call platform related function
> register_page_bootmem_memmap().
> 
> Other platforms such as powerpc it's not implemented, so on such platforms,
> revert them as empty as they were before.
> 
> Reported-by: Michal Hocko <mhocko@...e.cz>
> Signed-off-by: Lin Feng <linfeng@...fujitsu.com>
> ---
>  mm/memory_hotplug.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index 8aa2b56..bd93c2e 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -189,6 +189,7 @@ static void register_page_bootmem_info_section(unsigned long start_pfn)
>  }
>  #endif
>  
> +#ifdef CONFIG_X86_64
>  void register_page_bootmem_info_node(struct pglist_data *pgdat)
>  {
>  	unsigned long i, pfn, end_pfn, nr_pages;
> @@ -230,6 +231,14 @@ void register_page_bootmem_info_node(struct pglist_data *pgdat)
>  			register_page_bootmem_info_section(pfn);
>  	}
>  }
> +#else
> +static inline void register_page_bootmem_info_node(struct pglist_data *pgdat)
> +{
> +	/*
> +	 * Todo: platforms other than X86_64 haven't been implemented yet.
> +	 */
> +}
> +#endif

This is just ugly. Could you please add something like HAVE_BOOTMEM_INFO_NODE
or something with a bettern name and let CONFIG_MEMORY_HOTPLUG select it
for supported architectures and configurations (e.g.
CONFIG_SPARSEMEM_VMEMMAP doesn't need a special arch support, right?).
These Todo things are just too messy.
-- 
Michal Hocko
SUSE Labs
--
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