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: <20130306.181457.101447189.d.hatayama@jp.fujitsu.com>
Date:	Wed, 06 Mar 2013 18:14:57 +0900 (JST)
From:	HATAYAMA Daisuke <d.hatayama@...fujitsu.com>
To:	zhangyanfei@...fujitsu.com
Cc:	vgoyal@...hat.com, ebiederm@...ssion.com, cpw@....com,
	kumagai-atsushi@....nes.nec.co.jp, lisa.mitchell@...com,
	heiko.carstens@...ibm.com, akpm@...ux-foundation.org,
	kexec@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 04/20] vmcore: allocate buffer for ELF headers on
 page-size alignment

From: Zhang Yanfei <zhangyanfei@...fujitsu.com>
Subject: Re: [PATCH v2 04/20] vmcore: allocate buffer for ELF headers on page-size alignment
Date: Wed, 6 Mar 2013 14:57:50 +0800

> 于 2013年03月02日 16:36, HATAYAMA Daisuke 写道:
>> Allocate buffer for ELF headers on page-size aligned boudary to
>> satisfy mmap() requirement. For this, __get_free_pages() is used
>> instead of kmalloc().
>> 
>> Also, later patch will decrease actually used buffer size for ELF
>> headers, so it's necessary to keep original buffer size and actually
>> used buffer size separately. elfcorebuf_sz_orig keeps the original one
>> and elfcorebuf_sz the actually used one.
>> 
>> Signed-off-by: HATAYAMA Daisuke <d.hatayama@...fujitsu.com>
>> ---
>> 
>>  fs/proc/vmcore.c |   30 +++++++++++++++++++++---------
>>  1 files changed, 21 insertions(+), 9 deletions(-)
>> 

....

>> @@ -665,26 +671,31 @@ static int __init parse_crash_elf32_headers(void)
>>  
>>  	/* Read in all elf headers. */
>>  	elfcorebuf_sz = ehdr.e_phoff + ehdr.e_phnum * sizeof(Elf32_Phdr);
>> -	elfcorebuf = kmalloc(elfcorebuf_sz, GFP_KERNEL);
>> +	elfcorebuf_sz_orig = elfcorebuf_sz;
>> +	elfcorebuf = (void *) __get_free_pages(GFP_KERNEL | __GFP_ZERO,
>> +					       get_order(elfcorebuf_sz));
> 
> Why not elfcorebuf_sz_orig here?
> 

Thanks. I'll fix this.

Thanks.
HATAYAMA, Daisuke

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