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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADtm3G4c8GH5v3p8Qhf02jPcdRPVu+4MmjfD-2S8ZpoK0-b0Ew@mail.gmail.com>
Date:	Wed, 4 Feb 2015 15:14:11 -0800
From:	Gregory Fong <gregory.0xf0@...il.com>
To:	Laura Abbott <lauraa@...eaurora.org>
Cc:	linux-mm@...ck.org, Marek Szyprowski <m.szyprowski@...sung.com>,
	Michal Nazarewicz <mina86@...a86.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Joonsoo Kim <iamjoonsoo.kim@....com>,
	"Aneesh Kumar K.V" <aneesh.kumar@...ux.vnet.ibm.com>,
	Weijie Yang <weijie.yang@...sung.com>,
	Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>,
	open list <linux-kernel@...r.kernel.org>,
	"Stefan I. Strogin" <s.strogin@...tner.samsung.com>
Subject: Re: [RFC PATCH] mm: cma: add functions for getting allocation info

On Thu, Dec 18, 2014 at 9:00 AM, Laura Abbott <lauraa@...eaurora.org> wrote:
> On 12/17/2014 2:10 PM, Gregory Fong wrote:
>>
>> These functions allow for retrieval of information on what is allocated from
>> within a given CMA region.  It can be useful to know the number of distinct
>> contiguous allocations and where in the region those allocations are
>> located.
>>
>> Based on an initial version by Marc Carino <marc.ceeeee@...il.com> in a driver
>> that used the CMA bitmap directly; this instead moves the logic into the core
>> CMA API.
>>
>> Signed-off-by: Gregory Fong <gregory.0xf0@...il.com>
>> ---
>> This has been really useful for us to determine allocation information for a
>> CMA region.  We have had a separate driver that might not be appropriate for
>> upstream, but allowed using a user program to run CMA unit tests to verify that
>> allocations end up where they we would expect.  This addition would allow for
>> that without needing to expose the CMA bitmap.  Wanted to put this out there to
>> see if anyone else would be interested, comments and suggestions welcome.
>>
>
> Information is definitely useful but I'm not sure how it's intended to
> be used. Do you have a sample usage of these APIs? Another option might
> be to just add regular debugfs support for each of the regions instead
> of just calling out to a separate driver.

Sorry for the late reply, got way behind on emails.

Some background is probably good to start here: we use CMA to provide
very large (hundreds of MiB) contiguous regions for an out-of-kernel
allocator to divvy up according to varying platform requirements.
It's an unusual configuration but one that we're stuck with for now.

After having some time to think about this more and taking into
consideration yours and MichaƂ's reply, this definitely does not seem
like the proper approach.  Something better would probably be like
what Stefan is working on[1], so I'll wait to see his v2 that uses
debugfs instead.

[1] https://lkml.org/lkml/2014/12/26/95

Thanks,
Gregory
--
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