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:	Thu, 14 Jul 2011 13:10:20 -0700
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Tejun Heo <tj@...nel.org>
CC:	mingo@...hat.com, tglx@...utronix.de, benh@...nel.crashing.org,
	yinghai@...nel.org, davem@...emloft.net,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org,
	x86@...nel.org
Subject: Re: [PATCH 13/13] memblock, x86: Replace memblock_x86_reserve/free_range()
 with generic ones

On 07/12/2011 02:16 AM, Tejun Heo wrote:
> --- a/mm/memblock.c
> +++ b/mm/memblock.c
> @@ -449,6 +449,9 @@ long __init_memblock memblock_remove(phys_addr_t base, phys_addr_t size)
>  
>  long __init_memblock memblock_free(phys_addr_t base, phys_addr_t size)
>  {
> +	memblock_dbg("   memblock_free: [%#016llx-%#016llx] %pF\n",
> +		     base, base + size, (void *)_RET_IP_);
> +
>  	return __memblock_remove(&memblock.reserved, base, size);
>  }
>  
> @@ -456,6 +459,8 @@ long __init_memblock memblock_reserve(phys_addr_t base, phys_addr_t size)
>  {
>  	struct memblock_type *_rgn = &memblock.reserved;
>  
> +	memblock_dbg("memblock_reserve: [%#016llx-%#016llx] %pF\n",
> +		     base, base + size, (void *)_RET_IP_);
>  	BUG_ON(0 == size);
>  
>  	return memblock_add_region(_rgn, base, size);

This assumes phys_addr_t == unsigned long long, which is just plain
wrong.  I will fix it up, but please take more care with that in the
future.  This triggers a warning when building for i386 non-PAE, which
is a good thing because it is a real error.

Also, don't we usually display resources as an *inclusive* range,
meaning that the last one should be base + size - 1?

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