From: Yuntao Wang <ytcoode@gmail.com>
To: fuqiang.wang@easystack.cn
Cc: bhe@redhat.com, dyoung@redhat.com, kexec@lists.infradead.org,
linux-kernel@vger.kernel.org, vgoyal@redhat.com,
ytcoode@gmail.com
Subject: Re: [PATCH] kexec: avoid out of bounds in crash_exclude_mem_range()
Date: Tue, 19 Dec 2023 18:39:28 +0800 [thread overview]
Message-ID: <20231219103928.98465-1-ytcoode@gmail.com> (raw)
In-Reply-To: <3765549d-892e-4102-9b56-9add1d0a8089@easystack.cn>
On Tue, 19 Dec 2023 16:55:16 +0800, fuqiang wang <fuqiang.wang@easystack.cn> wrote:
> Thank you very much for your patient comment. This change does indeed improve
> readability. But as a combination of these two, how do you feel about moving
> crash_setup_memmap_entries() behind vzalloc().
I don't quite understand what you're trying to express.
> The image->elf_load_addr is determined by arch_kexec_locate_mem_hole(), this
> function can ensure that the value is within the range of [crashk_res.start,
> crashk_res.end), but it seems that it cannot guarantee that its value will
> always be equal to crashk_res.start. Perhaps I have some omissions, please
> point them out.
Because elfcorehdr is the first one and only one that allocates memory from the
starting address of crashk_res, and the starting address of crashk_res meets
the alignment requirement of elfcorehdr.
elfcorehdr requires 4k alignment, and the starting address of crashk_res is
16M aligned.
Therefore, image->elf_load_addr should be equal to crashk_res.start.
_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2023-12-19 10:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-27 2:56 [PATCH] kexec: avoid out of bounds in crash_exclude_mem_range() fuqiang wang
2023-11-30 7:44 ` Baoquan He
2023-11-30 13:20 ` fuqiang wang
2023-12-13 4:44 ` Baoquan He
2023-12-13 13:10 ` fuqiang wang
2023-12-14 9:17 ` Baoquan He
2023-12-14 10:29 ` Baoquan He
2023-12-18 8:31 ` fuqiang wang
2023-12-19 2:42 ` Yuntao Wang
2023-12-19 2:47 ` Yuntao Wang
2023-12-19 3:50 ` fuqiang wang
2023-12-19 5:29 ` Yuntao Wang
2023-12-19 8:55 ` fuqiang wang
2023-12-19 10:39 ` Yuntao Wang [this message]
2023-12-19 12:54 ` fuqiang wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231219103928.98465-1-ytcoode@gmail.com \
--to=ytcoode@gmail.com \
--cc=bhe@redhat.com \
--cc=dyoung@redhat.com \
--cc=fuqiang.wang@easystack.cn \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=vgoyal@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox