* kexec-tools/vmcore-demsg: No program header covering vaddr 0xffff000be7a00000found kexec bug? @ 2019-11-26 7:34 Prabhakar Kushwaha 2019-11-26 14:01 ` Prabhakar Kushwaha 2019-11-26 21:11 ` Bhupesh Sharma 0 siblings, 2 replies; 5+ messages in thread From: Prabhakar Kushwaha @ 2019-11-26 7:34 UTC (permalink / raw) To: kexec mailing list, Ganapatrao Prabhakerrao Kulkarni, Prabhakar Kushwaha Hi All, I am facing issue below error with latest kexec-tools/vmcore-demsg tools. $ ./build/sbin/vmcore-dmesg /proc/vmcore No program header covering vaddr 0xffff000be7a00000found kexec bug? I am testing on AARM64 platform with following git repos. A) kexec tools: https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git top commit: bd077966e2b9041c (kexec-tools: Fix conversion overflow when compiling on 32-bit platforms) B) Linux:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git top commit: af42d3466bdc8f3980 (Linux 5.4-rc8) I am seeing similar issue in past also in couple of discussions. has it not fixed earlier or it keep arises with time to time Please suggest. --pk _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kexec-tools/vmcore-demsg: No program header covering vaddr 0xffff000be7a00000found kexec bug? 2019-11-26 7:34 kexec-tools/vmcore-demsg: No program header covering vaddr 0xffff000be7a00000found kexec bug? Prabhakar Kushwaha @ 2019-11-26 14:01 ` Prabhakar Kushwaha 2019-11-26 21:11 ` Bhupesh Sharma 1 sibling, 0 replies; 5+ messages in thread From: Prabhakar Kushwaha @ 2019-11-26 14:01 UTC (permalink / raw) To: kexec mailing list, Ganapatrao Prabhakerrao Kulkarni, Prabhakar Kushwaha On Tue, Nov 26, 2019 at 1:04 PM Prabhakar Kushwaha <prabhakar.pkin@gmail.com> wrote: > > Hi All, > > I am facing issue below error with latest kexec-tools/vmcore-demsg tools. > > $ ./build/sbin/vmcore-dmesg /proc/vmcore > No program header covering vaddr 0xffff000be7a00000found kexec bug? > > I am testing on AARM64 platform with following git repos. > A) kexec tools: > https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git > top commit: bd077966e2b9041c (kexec-tools: Fix conversion overflow > when compiling on 32-bit platforms) > > B) Linux:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > top commit: af42d3466bdc8f3980 (Linux 5.4-rc8) > > I am seeing similar issue in past also in couple of discussions. has > it not fixed earlier or it keep arises with time to time > I did further analysis and with below changes kexec-tools/vmcore-demsg working fine diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c index 4fd7aa8..1c28b06 100644 --- a/kexec/arch/arm64/crashdump-arm64.c +++ b/kexec/arch/arm64/crashdump-arm64.c @@ -58,6 +58,8 @@ static uint64_t get_kernel_page_offset(void) { int i; + return 0xffff000000000000; if (elf_info.kern_vaddr_start == UINT64_MAX) return UINT64_MAX; After patch 14c127c957c1 ("arm64: mm: Flip kernel VA space") in Linux, the PAGE_OFFSET address has been moved to bottom instead of middle in kernel virtual address space. looks like existing code still assumes PAGE_OFFSET in middle. A proper fix is required. Let me work on this. --pk _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: kexec-tools/vmcore-demsg: No program header covering vaddr 0xffff000be7a00000found kexec bug? 2019-11-26 7:34 kexec-tools/vmcore-demsg: No program header covering vaddr 0xffff000be7a00000found kexec bug? Prabhakar Kushwaha 2019-11-26 14:01 ` Prabhakar Kushwaha @ 2019-11-26 21:11 ` Bhupesh Sharma 2019-11-27 4:50 ` Prabhakar Kushwaha 1 sibling, 1 reply; 5+ messages in thread From: Bhupesh Sharma @ 2019-11-26 21:11 UTC (permalink / raw) To: Prabhakar Kushwaha Cc: Prabhakar Kushwaha, kexec mailing list, Ganapatrao Prabhakerrao Kulkarni Hi Prabhakar, On Tue, Nov 26, 2019 at 1:04 PM Prabhakar Kushwaha <prabhakar.pkin@gmail.com> wrote: > > Hi All, > > I am facing issue below error with latest kexec-tools/vmcore-demsg tools. > > $ ./build/sbin/vmcore-dmesg /proc/vmcore > No program header covering vaddr 0xffff000be7a00000found kexec bug? > > I am testing on AARM64 platform with following git repos. > A) kexec tools: > https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git > top commit: bd077966e2b9041c (kexec-tools: Fix conversion overflow > when compiling on 32-bit platforms) > > B) Linux:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > top commit: af42d3466bdc8f3980 (Linux 5.4-rc8) > > I am seeing similar issue in past also in couple of discussions. has > it not fixed earlier or it keep arises with time to time > > Please suggest. Thanks for reporting the issue. I think the issue with the latest ARM64 kernel and kexec-tools is the same as the makedumpfile, i.e. the PAGE_OFFSET calculation needs to be dynamically done for 52-bit VA_BITS correctly as well. I think the VA_BITS calculation via _stext symbol will not work well for 52-bit case, because the 52nd and 48th bit are both set in such a case (I already have a conversation going on with the arm64 maintainers on how to get around this issue). Until we agree on a formal approach with the arm64 miantainer, I will try to send a patch (soon) to fix this kexec-tools issue in a generic way (for 52-bit and 48-bit VA_BITS values). Regards, Bhupesh _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: kexec-tools/vmcore-demsg: No program header covering vaddr 0xffff000be7a00000found kexec bug? 2019-11-26 21:11 ` Bhupesh Sharma @ 2019-11-27 4:50 ` Prabhakar Kushwaha 2019-11-27 20:43 ` Bhupesh Sharma 0 siblings, 1 reply; 5+ messages in thread From: Prabhakar Kushwaha @ 2019-11-27 4:50 UTC (permalink / raw) To: Bhupesh Sharma Cc: Prabhakar Kushwaha, kexec mailing list, Ganapatrao Prabhakerrao Kulkarni Thanks Bhupesh for replying On Wed, Nov 27, 2019 at 2:42 AM Bhupesh Sharma <bhsharma@redhat.com> wrote: > > Hi Prabhakar, > > On Tue, Nov 26, 2019 at 1:04 PM Prabhakar Kushwaha > <prabhakar.pkin@gmail.com> wrote: > > > > Hi All, > > > > I am facing issue below error with latest kexec-tools/vmcore-demsg tools. > > > > $ ./build/sbin/vmcore-dmesg /proc/vmcore > > No program header covering vaddr 0xffff000be7a00000found kexec bug? > > > > I am testing on AARM64 platform with following git repos. > > A) kexec tools: > > https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git > > top commit: bd077966e2b9041c (kexec-tools: Fix conversion overflow > > when compiling on 32-bit platforms) > > > > B) Linux:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > top commit: af42d3466bdc8f3980 (Linux 5.4-rc8) > > > > I am seeing similar issue in past also in couple of discussions. has > > it not fixed earlier or it keep arises with time to time > > > > Please suggest. > > Thanks for reporting the issue. > I think the issue with the latest ARM64 kernel and kexec-tools is the > same as the makedumpfile, i.e. the PAGE_OFFSET calculation needs to be > dynamically done for 52-bit VA_BITS correctly as well. > Yes we need dynamic approach of calculating VA_BITS. Please note, the AARM64 platform used by us is 48Bit. CONFIG_ARM64_VA_BITS_48=y CONFIG_ARM64_VA_BITS=48 CONFIG_ARM64_PA_BITS_48=y CONFIG_ARM64_PA_BITS=48 As per my understanding, this issue is not because of 52 bit. It is due to patch 14c127c957c1 ("arm64: mm: Flip kernel VA space") in Linux. i.e. PAGE_OFFSET address has been moved to bottom instead of middle in kernel virtual address space. As below changes solves mentioned kexec-tools/vmcore-demsg problem. diff --git a/kexec/arch/arm64/crashdump-arm64.c b/kexec/arch/arm64/crashdump-arm64.c index 4fd7aa8..1c28b06 100644 --- a/kexec/arch/arm64/crashdump-arm64.c +++ b/kexec/arch/arm64/crashdump-arm64.c @@ -58,6 +58,8 @@ static uint64_t get_kernel_page_offset(void) { int i; + return 0xffff000000000000; --> PAGE_OFFSET if (elf_info.kern_vaddr_start == UINT64_MAX) return UINT64_MAX; Also, I verified by moving one patch below 14c127c957c1 in Linux, no changes required in kexect-tools. Everything works fine. The calculation used in makedumpfile (your patches), indirectly takes care of this. So we need similar calculation here in kexec also. --pk _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: kexec-tools/vmcore-demsg: No program header covering vaddr 0xffff000be7a00000found kexec bug? 2019-11-27 4:50 ` Prabhakar Kushwaha @ 2019-11-27 20:43 ` Bhupesh Sharma 0 siblings, 0 replies; 5+ messages in thread From: Bhupesh Sharma @ 2019-11-27 20:43 UTC (permalink / raw) To: Prabhakar Kushwaha Cc: Prabhakar Kushwaha, kexec mailing list, Ganapatrao Prabhakerrao Kulkarni Hi Prabhakar, On Wed, Nov 27, 2019 at 10:20 AM Prabhakar Kushwaha <prabhakar.pkin@gmail.com> wrote: > > Thanks Bhupesh for replying > > On Wed, Nov 27, 2019 at 2:42 AM Bhupesh Sharma <bhsharma@redhat.com> wrote: > > > > Hi Prabhakar, > > > > On Tue, Nov 26, 2019 at 1:04 PM Prabhakar Kushwaha > > <prabhakar.pkin@gmail.com> wrote: > > > > > > Hi All, > > > > > > I am facing issue below error with latest kexec-tools/vmcore-demsg tools. > > > > > > $ ./build/sbin/vmcore-dmesg /proc/vmcore > > > No program header covering vaddr 0xffff000be7a00000found kexec bug? > > > > > > I am testing on AARM64 platform with following git repos. > > > A) kexec tools: > > > https://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git > > > top commit: bd077966e2b9041c (kexec-tools: Fix conversion overflow > > > when compiling on 32-bit platforms) > > > > > > B) Linux:git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > > top commit: af42d3466bdc8f3980 (Linux 5.4-rc8) > > > > > > I am seeing similar issue in past also in couple of discussions. has > > > it not fixed earlier or it keep arises with time to time > > > > > > Please suggest. > > > > Thanks for reporting the issue. > > I think the issue with the latest ARM64 kernel and kexec-tools is the > > same as the makedumpfile, i.e. the PAGE_OFFSET calculation needs to be > > dynamically done for 52-bit VA_BITS correctly as well. > > > > Yes we need dynamic approach of calculating VA_BITS. > > Please note, the AARM64 platform used by us is 48Bit. > CONFIG_ARM64_VA_BITS_48=y > CONFIG_ARM64_VA_BITS=48 > CONFIG_ARM64_PA_BITS_48=y > CONFIG_ARM64_PA_BITS=48 > > As per my understanding, this issue is not because of 52 bit. It is > due to patch 14c127c957c1 ("arm64: mm: Flip kernel VA space") in > Linux. > i.e. PAGE_OFFSET address has been moved to bottom instead of middle in > kernel virtual address space. Well the changes for flipping the kernel VA space on arm64 was need for introducing the 52-bit VA address space. You can look at Steve Capper's 53-bit patchset for details which was finally merged in the mainline [of which 14c127c957c1 ("arm64: mm: Flip kernel VA space") is a part]: > As below changes solves mentioned kexec-tools/vmcore-demsg problem. > > diff --git a/kexec/arch/arm64/crashdump-arm64.c > b/kexec/arch/arm64/crashdump-arm64.c > index 4fd7aa8..1c28b06 100644 > --- a/kexec/arch/arm64/crashdump-arm64.c > +++ b/kexec/arch/arm64/crashdump-arm64.c > @@ -58,6 +58,8 @@ static uint64_t get_kernel_page_offset(void) > { > int i; > > + return 0xffff000000000000; --> PAGE_OFFSET Yes, you are hardcoding the PAGE_OFFSET as 0xffff000000000000 for a vabits_actual value of 48-bits and it will work fine on platforms which don't support ARMv8.2 LVA extensions (i.e. ARM v8.2), however on real ARMv8.2 hardware the PAGE_OFFSET value should be 0xfff0000000000000 (for vabits_actual value of 52 bits). See '52-bit VA support in the kernel' section in <https://www.kernel.org/doc/Documentation/arm64/memory.rst> for details. I think I have found a more generic solution to the issue, but I still need to verify on the ARMv8 simulator model (as I need to test othe same on 52-bit platforms as well). Regards, Bhupesh > if (elf_info.kern_vaddr_start == UINT64_MAX) > return UINT64_MAX; > > Also, I verified by moving one patch below 14c127c957c1 in Linux, no > changes required in kexect-tools. Everything works fine. > > The calculation used in makedumpfile (your patches), indirectly takes > care of this. So we need similar calculation here in kexec also. > > > > --pk > _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-11-27 20:43 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-11-26 7:34 kexec-tools/vmcore-demsg: No program header covering vaddr 0xffff000be7a00000found kexec bug? Prabhakar Kushwaha 2019-11-26 14:01 ` Prabhakar Kushwaha 2019-11-26 21:11 ` Bhupesh Sharma 2019-11-27 4:50 ` Prabhakar Kushwaha 2019-11-27 20:43 ` Bhupesh Sharma
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.