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: <201007131437.55808.bjorn.helgaas@hp.com>
Date:	Tue, 13 Jul 2010 14:37:55 -0600
From:	Bjorn Helgaas <bjorn.helgaas@...com>
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>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	Johannes Weiner <hannes@...xchg.org>,
	linux-kernel@...r.kernel.org, linux-arch@...r.kernel.org
Subject: Re: [PATCH 45/50] x86, memblock: Use memblock_debug to control debug message print out

On Tuesday, July 13, 2010 01:10:39 am Yinghai Lu wrote:
> -		pr_cont(" ==> [%010llx-%010llx]\n", final_start, final_end - 1);
> +		memblock_dbg(" ==> [%#010llx-%#010llx]\n", final_start, final_end - 1);
>  		reserve_bootmem_generic(final_start, final_end - final_start, BOOTMEM_DEFAULT);
>  	}
>  
> @@ -286,9 +286,11 @@ void __init memblock_x86_reserve_range(u64 start, u64 end, char *name)
>  	if (start == end)
>  		return;
>  
> -	if (WARN_ONCE(start > end, "memblock_x86_reserve_range: wrong range [%#llx, %#llx]\n", start, end))
> +	if (WARN_ONCE(start > end, "memblock_x86_reserve_range: wrong range [%#llx, %#llx)\n", start, end))

Can you print these ranges the same way as the others?  I think
"invalid range" might be closer to what you mean than "wrong range." 

I'm a little dubious about these "(start == end)" and "(start > end)"
checks anyway.  Who are the callers of these functions?  If "start"
and "end" are coming from an external source, e.g., some firmware
interface like an e820 table, the message doesn't give enough of a
clue about where the problem is.

If "start" and "end" are internal things, I'd argue that the checks
are just covering up Linux bugs, and it'd be better to fix those
bugs and remove the checks.

>  		return;
>  
> +	memblock_dbg("    memblock_x86_reserve_range: [%#010llx-%#010llx] %16s\n", start, end - 1, name);
> +
>  	memblock_reserve(start, end - start);
>  }
>  
> @@ -297,9 +299,11 @@ void __init memblock_x86_free_range(u64 start, u64 end)
>  	if (start == end)
>  		return;
>  
> -	if (WARN_ONCE(start > end, "memblock_x86_free_range: wrong range [%#llx, %#llx]\n", start, end))
> +	if (WARN_ONCE(start > end, "memblock_x86_free_range: wrong range [%#llx, %#llx)\n", start, end))
>  		return;

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