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: <20080326173508.GI20016@elte.hu>
Date:	Wed, 26 Mar 2008 18:35:09 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	"H. Peter Anvin" <hpa@...or.com>
Cc:	Mike Travis <travis@....com>,
	Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>, Andi Kleen <ak@...e.de>
Subject: Re: [PATCH 06/10] x86: reduce memory and stack usage in
	intel_cacheinfo


* H. Peter Anvin <hpa@...or.com> wrote:

> Ingo Molnar wrote:
>>> The main goal was to avoid allocating 4096 bytes when only 32 would do 
>>> (characters needed to represent nr_cpu_ids cpus instead of NR_CPUS cpus.) 
>>> But I'll look at cleaning it up a bit more.  It wouldn't have to be a 
>>> function if CHUNKSZ in cpumask_scnprintf() were visible (or a 
>>> non-changeable constant.)
>>
>> well, do we care about allocating 4096 bytes, as long as we also free it? 
>> It's not like we need to clear all the bytes or something. Am i missing 
>> something here?
>
> Well, 32 bytes fits on the stack, whereas 4096 bytes requires 
> allocating a page -- which means either taking the risk of failing or 
> blocking.  Of course, we're doing this for output, which has the same 
> issue.

hm, i thought this was all implemented via dynamic allocation already, 
within the cpumask_scnprintf function. But i see it doesnt do it - i 
guess a new call could be introduced, cpumask_scnprintf_ptr() which 
passes in a cpumask pointer and does dynamic allocation itself?

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