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:	Fri, 30 May 2014 16:14:33 +0800
From:	Liu hua <sdu.liu@...wei.com>
To:	Simon Horman <horms@...ge.net.au>
CC:	<wangnan0@...wei.com>, <peifeiyue@...wei.com>, <liusdu@....com>,
	<kexec@...ts.infradead.org>, <linux-kernel@...r.kernel.org>,
	<hui.geng@...wei.com>, <kumagai-atsushi@....nes.nec.co.jp>,
	<ebiederm@...ssion.com>, <anderson@...hat.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [RESEND PATCH] kexec : add sparse memory related values to vmcore

On 2014/5/29 8:13, Simon Horman wrote:
> On Wed, May 28, 2014 at 09:49:56PM +0800, Liu Hua wrote:
>> This patch deales with sparse memory model.
>>
>> For ARM32 platforms, different vendors may define different
>> SECTION_SIZE_BITS, which we did not write to vmcore.
>>
>> For example:
>>
>>   1 arch/arm/mach-clps711x/include/mach/memory.h
>>     #define SECTION_SIZE_BITS 24
>>   2 arch/arm/mach-exynos/include/mach/memory.h
>>     #define SECTION_SIZE_BITS 28
>>   3 arch/arm/mach-sa1100/include/mach/memory.h
>>     #define SECTION_SIZE_BITS 27
> 
> I wonder if this problem will eventually go away, or at least only
> apply to older platforms, as ARM moves towards multiplatform: a single
> kernel for more than one platform.

For ARM32 platform, it may cost a long time. And when glancing over
the commit log of kernel, we can find this macro changed several times.
The user space tools must take care of all these changed for compatibility.

> 
>> It is really a bad news for user space tools such as
>> makedumpfile and crash, who have to defines them as
>> macros. So for the same architecture, we may need to
>> recomile them to parse vmcores with different
>> SECTION_SIZE_BITS.
>>
>> And if we enable LPAE, MAX_PHYSMEM_SIZE can alse
>> be variable.
>>
>> This patch adds these SECTION_SIZE_BITS and MAX_PHYSMEM_SIZE
>> to vmcore. which makes user space tools more compatible.
>>
>> BTW, makedumpfile has queued the related patch.
>>
>> Signed-off-by: Liu Hua <sdu.liu@...wei.com>
>> ---
>>  kernel/kexec.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/kernel/kexec.c b/kernel/kexec.c
>> index bf0b929e..8b1a193 100644
>> --- a/kernel/kexec.c
>> +++ b/kernel/kexec.c
>> @@ -1577,6 +1577,8 @@ static int __init crash_save_vmcoreinfo_init(void)
>>  	VMCOREINFO_LENGTH(mem_section, NR_SECTION_ROOTS);
>>  	VMCOREINFO_STRUCT_SIZE(mem_section);
>>  	VMCOREINFO_OFFSET(mem_section, section_mem_map);
>> +	VMCOREINFO_NUMBER(MAX_PHYSMEM_BITS);
>> +	VMCOREINFO_NUMBER(SECTION_SIZE_BITS);
>>  #endif
>>  	VMCOREINFO_STRUCT_SIZE(page);
>>  	VMCOREINFO_STRUCT_SIZE(pglist_data);
>> -- 
>> 1.9.0
>>
>>
>> _______________________________________________
>> kexec mailing list
>> kexec@...ts.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kexec
>>
> 
> _______________________________________________
> kexec mailing list
> kexec@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
> 
> .
> 


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