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] [day] [month] [year] [list]
Date:	Tue, 24 Mar 2015 14:42:18 +0000
From:	James Hogan <james@...anarts.com>
To:	Peter Zijlstra <peterz@...radead.org>
Cc:	Andi Kleen <andi@...stfloor.org>,
	Sasha Levin <sasha.levin@...cle.com>, mingo@...hat.com,
	LKML <linux-kernel@...r.kernel.org>,
	Paul McKenney <paulmck@...ux.vnet.ibm.com>
Subject: Re: [PATCH] lockdep: increase static allocations

Hi Peter,

On 9 January 2014 at 08:56, Peter Zijlstra <peterz@...radead.org> wrote:
> On Thu, Jan 09, 2014 at 12:23:22AM +0100, Andi Kleen wrote:
>> On Wed, Jan 08, 2014 at 03:10:55PM -0500, Sasha Levin wrote:
>> > On 01/08/2014 02:51 PM, Andi Kleen wrote:
>> > >Sasha Levin <sasha.levin@...cle.com> writes:
>> > >
>> > >>Fuzzing a recent kernel with a large configuration hits the static
>> > >>allocation limits and disables lockdep.
>> > >
>> > >Doesn't that use a lot more memory?  I thought lockdep preallocates.
>> > >
>> > >Doubling may be too aggressive.
>> >
>> > The patch adds about 4MB of memory usage, I didn't think it's too much for something
>> > that is only enabled during debugging.
>>
>> Wasting 4MB is an issue.
>>
>> Linus' first Linux system had less total memory than that.
>
> Meh.. if someone from the embedded people care we can add
> CONFIG_BASE_SMALL option, until then I couldn't care less about 4m.

FYI, this could also be a problem for systems with a 16MB DMA zone for
certain devices, since 4M more static kernel data can easily consume
what is left of that zone, even on a system with much more memory. Is
that likely to be a problem on PCs? (especially since PROVE_RCU is
tied to PROVE_LOCKING in linux-next)

(I hit this on MIPS Malta after Paul McKenney's patch in linux-next to
tie PROVE_RCU to PROVE_LOCKING, but luckily the devices in question
actually had 32-bit DMA masks, so the MIPS arch code shouldn't have
been using the __GFP_DMA flag in the first place).

Cheers
James

>
>> >
>> > If this is an issue, can I suggest making these values configurable in the .config
>> > and just let users pick whatever they want?
>>
>> Better allocate it at boot time, using a boot parameter or somesuch.
>
> wrongbot andi is at it again.. no that's far too late.
> --
> 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/



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