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]
Date:	Mon, 22 Mar 2010 15:14:18 -0700
From:	Yinghai Lu <yinghai@...nel.org>
To:	Benjamin Herrenschmidt <benh@...nel.crashing.org>
CC:	Ingo Molnar <mingo@...e.hu>, Paul Mackerras <paulus@...ba.org>,
	David Miller <davem@...emloft.net>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	tglx@...utronix.de, hpa@...or.com, jbarnes@...tuousgeek.org,
	ebiederm@...ssion.com, linux-kernel@...r.kernel.org,
	linux-arch@...r.kernel.org
Subject: Re: [PATCH 06/20] early_res: seperate common memmap func from e820.c
 to fw_memmap.c

On 03/22/2010 02:52 PM, Benjamin Herrenschmidt wrote:
> On Mon, 2010-03-22 at 22:20 +0100, Ingo Molnar wrote:
>>
>> So no arguments from me at all about the code quality aspects - i just wanted 
>> to highlight the huge amount of non-trivial work Yinghai has invested into 
>> this already, with little external help, and that if possible it would be nice 
>> to minimize the upsetting of related x86 code if possible. Please help him out 
>> with more specific suggestions about how the two memory allocation spaces 
>> could be unified best, to serve the needs of all these architectures - if you 
>> have some spare time. 
> 
> Why not start by unifying the APIs to it, while keeping the
> implementation in the arch for now ? That would be a good first step and
> would give us a good idea of what kind of requirements all the archs
> have since to some extent those requirements need to be represented in
> this API.


current early_res has

reserve/free/find

and don't have alloc, because it is equal to find + reserve.
all the find related will subtract reserved area already.
   and it use start/end (goal/limit) and it will honor goal.

extern void reserve_early(u64 start, u64 end, char *name);
extern void reserve_early_overlap_ok(u64 start, u64 end, char *name);
extern void free_early(u64 start, u64 end);
void free_early_partial(u64 start, u64 end);
extern void early_res_to_bootmem(u64 start, u64 end);

void reserve_early_without_check(u64 start, u64 end, char *name);
u64 find_early_area(u64 ei_start, u64 ei_last, u64 start, u64 end,
                         u64 size, u64 align);
u64 find_early_area_size(u64 ei_start, u64 ei_last, u64 start,
                         u64 *sizep, u64 align);
u64 find_fw_memmap_area(u64 start, u64 end, u64 size, u64 align);
u64 get_max_mapped(void);
int get_free_all_memory_range(struct range **rangep, int nodeid);
 
lmd has:
reserve/free/alloc
and it does have lmb_find, but that doesn't subtract reserved area.

also lmb_alloc doesn't take goal. and only have limit there.


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