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: <1280292558.1970.222.camel@pasglop>
Date:	Wed, 28 Jul 2010 14:49:18 +1000
From:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
To:	Yinghai Lu <yinghai@...nel.org>
Cc:	Ingo Molnar <mingo@...e.hu>, Thomas Gleixner <tglx@...utronix.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	David Miller <davem@...emloft.net>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Johannes Weiner <hannes@...xchg.org>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH 01/16] x86, memblock: Add
 memblock_x86_find_in_range_size()

On Thu, 2010-07-22 at 11:43 -0700, Yinghai Lu wrote:
> size is returned according free range.
> Will be used to find free ranges for early_memtest and memory corruption check
> 
> Do not mess it up with lib/memblock.c yet.

So I'm readying my branch which incudes your 6 patches, however I'm
still not happy with a few things.

For example, I really really don't like exporting
memblock_reserved_init_regions.

So you do those things for the sake of x86, so let's walk through your
x86 patches and see if I can figure out what you do wrong :-)

> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
> ---
>  arch/x86/include/asm/memblock.h |    8 ++++
>  arch/x86/mm/Makefile            |    2 +
>  arch/x86/mm/memblock.c          |   88 +++++++++++++++++++++++++++++++++++++++
>  3 files changed, 98 insertions(+), 0 deletions(-)
>  create mode 100644 arch/x86/include/asm/memblock.h
>  create mode 100644 arch/x86/mm/memblock.c
> 
> diff --git a/arch/x86/include/asm/memblock.h b/arch/x86/include/asm/memblock.h
> new file mode 100644
> index 0000000..c14219a
> --- /dev/null
> +++ b/arch/x86/include/asm/memblock.h
> @@ -0,0 +1,8 @@
> +#ifndef _X86_MEMBLOCK_H
> +#define _X86_MEMBLOCK_H
> +
> +#define ARCH_DISCARD_MEMBLOCK

So I'm no fan of this ARCH_DISCARD_MEMBLOCK, especially since it makes a
lot of sense to keep the debugfs files around or maybe even move to
sysfs for diagnostic purposes.

Maybe we should consider something better by having memblock always be
init/initdata but we copy the arrays to a "final" location from an
initcall ? We can keep your patches for now, but I think we should
improve on that.
 
> +u64 memblock_x86_find_in_range_size(u64 start, u64 *sizep, u64 align);

I really really don't like your function naming. The above doesn't give
me any bloody idea about what the purpose of the function is...

Cheers,
Ben.


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