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:	Wed, 29 Apr 2009 10:14:27 +0100
From:	"Metzger, Markus T" <markus.t.metzger@...el.com>
To:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Ingo Molnar <mingo@...e.hu>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	"markus.t.metzger@...il.com" <markus.t.metzger@...il.com>,
	"roland@...hat.com" <roland@...hat.com>,
	"eranian@...glemail.com" <eranian@...glemail.com>,
	"oleg@...hat.com" <oleg@...hat.com>,
	"Villacis, Juan" <juan.villacis@...el.com>,
	"ak@...ux.jf.intel.com" <ak@...ux.jf.intel.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>,
	"hpa@...or.com" <hpa@...or.com>
Subject: RE: [rfc 2/2] x86, bts: use physically non-contiguous trace buffer

>-----Original Message-----
>From: Peter Zijlstra [mailto:a.p.zijlstra@...llo.nl]
>Sent: Monday, April 27, 2009 12:54 PM
>To: Ingo Molnar
>Cc: Andrew Morton; Metzger, Markus T; markus.t.metzger@...il.com; roland@...hat.com;
>eranian@...glemail.com; oleg@...hat.com; Villacis, Juan; ak@...ux.jf.intel.com; linux-
>kernel@...r.kernel.org; tglx@...utronix.de; hpa@...or.com
>Subject: Re: [rfc 2/2] x86, bts: use physically non-contiguous trace buffer
>
>On Fri, 2009-04-24 at 10:31 +0200, Ingo Molnar wrote:
>> * Andrew Morton <akpm@...ux-foundation.org> wrote:
>>
>
>> > The patch looks like a regression to me.  vmalloc memory is slower
>> > to allocate, slower to free, slower to access and can exhaust or
>> > fragment the vmalloc arena.  Confused.
>>
>> Performance does not matter here (this is really a slowpath), but
>> fragmentation does matter, especially on 32-bit systems.
>>
>> I'd not uglify the code via vmap() - and vmap has the same
>> fundamental address space limitations on 32-bit as vmalloc().
>>
>> The existing kmalloc() is fine. We do larger than PAGE_SIZE
>> allocations elsewhere too (the kernel stack for example), and this
>> is a debug facility, so failing the allocation is not a big problem
>> even if it happens.
>
>Nobody has yet told what the typical size of these allocations are. If
>they're large enough to account in pages, one should arguable use the
>page allocator not kmalloc. Also, any >3 order allocation (>32kb) are
>very likely to fail. Having this ptrace interface work in the (unloaded)
>development environment but not in a (loaded) production environment
>will render it basically useless IMHO.

The size of these allocations is limited by the lockable memory ulimit
and debuggers typically need to divide this between multiple threads.

In practice, I would expect the buffers to be small. One page already
gives you ~170 entries and the most interesting part is the tail of
the trace, anyway.


>Having a regular high order allocation with vmalloc/vmap fallback is
>quite normal, esp. if one wants to promote the use of this facility as
>usable.
>
>So, no, I very strongly disagree that the existing kmalloc is fine.

I could add the vmalloc fallback. Is there already some function that
tries kmalloc and falls back to vmalloc which I should use?

thanks,
markus.
---------------------------------------------------------------------
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen Germany
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Douglas Lusk, Peter Gleissner, Hannes Schwaderer
Registergericht: Muenchen HRB 47456 Ust.-IdNr.
VAT Registration No.: DE129385895
Citibank Frankfurt (BLZ 502 109 00) 600119052

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

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