It's just a risk,i found this risk when i try to fix crash-utility launch error with
arm64 in 5.4.
i made the fix patch the almost same as Vinayak's,As a supplement, I make these two
suggestion(vmemmap_start &physvirt_offset).
If the advice is reasonable, you can take it
________________________________________
From: crash-utility-bounces(a)redhat.com <crash-utility-bounces(a)redhat.com> on behalf
of Dave Anderson <anderson(a)redhat.com>
Sent: Monday, April 20, 2020 22:54
To: Discussion list for crash utility usage, maintenance and development
Subject: [营销邮件] Re: [Crash-utility] [营销邮件] Re: [营销邮件] Re: [营销邮件] Re: [External
Mail][????] Re: ramdump support for va_bits_actual
----- Original Message -----
In fact,vmemmap not easy to calculated in crash-utility,if
CONFIG_RANDOMIZE_BASE is configured,memstart_addr will be changed since below codes:
[arm64_memblock_init]
348 vmemmap = ((struct page *)VMEMMAP_START - (memstart_addr >>
PAGE_SHIFT));
...
413 if (IS_ENABLED(CONFIG_RANDOMIZE_BASE)) {
414 extern u16 memstart_offset_seed;
415 u64 range = linear_region_size -
416 (memblock_end_of_DRAM() - memblock_start_of_DRAM());
417
418 /*
419 * If the size of the linear region exceeds, by a sufficient
420 * margin, the size of the region that the available physical
421 * memory spans, randomize the linear region as well.
422 */
423 if (memstart_offset_seed > 0 && range >=
ARM64_MEMSTART_ALIGN) {
424 range /= ARM64_MEMSTART_ALIGN;
425 memstart_addr -= ARM64_MEMSTART_ALIGN *
426 ((range * memstart_offset_seed) >>
16);
427 }
428 }
OK.
the reason i showed the "address_markers " is just to prove vmemmap and
ms->vmemmap_start is wrong.we'd better to do below change.
- vmemmap_start = (-vmemmap_size);
+ vmemmap_start = (-vmemmap_size - MEGABYTES(2));
This looks correct, although I've never seen a problem using the current
setting on 5.4 and later kernels. What happens on your system? Is your
system's memstart_addr within that low 2MB?
Thanks,
Dave
--
Crash-utility mailing list
Crash-utility(a)redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
#/******本邮件及其附件含有小米公司的保密信息,仅限于发送给上面地址中列出的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本邮件!
This e-mail and its attachments contain confidential information from XIAOMI, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!******/#