linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: takahiro.akashi@linaro.org (AKASHI Takahiro)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arch/arm64: elfcorehdr should be the first allocation
Date: Wed, 13 Dec 2017 19:46:42 +0900	[thread overview]
Message-ID: <20171213104640.GD28046@linaro.org> (raw)
In-Reply-To: <20171211140714.GD2141@arm.com>

On Mon, Dec 11, 2017 at 02:07:14PM +0000, Will Deacon wrote:
> On Mon, Dec 11, 2017 at 11:03:32AM +0530, Prabhakar Kushwaha wrote:
> > From: Abhimanyu Saini <abhimanyu.saini@nxp.com>
> > 
> > elfcorehdr_addr is assigned by kexec-utils and device tree of
> > dump kernel is fixed in chosen node with parameter "linux,elfcorehdr".
> > So, memory should be first reserved for elfcorehdr,
> > otherwise overlaps may happen with other memory allocations
> > which were done before the allocation of elcorehdr in the crash kernel
> 
> What happens in that case? Do you have a crash log we can include in
> the commit message?

In private discussions with Poonam, he said:
|   The overlap here I observed was for the reserved-mem areas in the dtb.
|   And they were specific to NXP device.

Since I have not got any details since then, I'm not sure
whether your patch is the way to go.
(I suspect that we might better fix the issue on kexec-tools side.)

Thanks,
-Takahiro AKASHI

> > Signed-off-by: Guanhua <guanhua.gao@nxp.com>
> > Signed-off-by: Poonam Aggrwal <poonam.aggrwal@nxp.com>
> > Signed-off-by: Abhimanyu Saini <abhimanyu.saini@nxp.com>
> > ---
> 
> Really? How on Earth did you get three people co-developing this patch?
> 
> >  arch/arm64/mm/init.c | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm64/mm/init.c b/arch/arm64/mm/init.c
> > index 5960bef0170d..551048cfcfff 100644
> > --- a/arch/arm64/mm/init.c
> > +++ b/arch/arm64/mm/init.c
> > @@ -453,6 +453,10 @@ void __init arm64_memblock_init(void)
> >  	 * Register the kernel text, kernel data, initrd, and initial
> >  	 * pagetables with memblock.
> >  	 */
> > +
> > +	/* make this the first reservation so that there are no chances of
> > +	 * overlap */
> > +	reserve_elfcorehdr();
> >  	memblock_reserve(__pa_symbol(_text), _end - _text);
> >  #ifdef CONFIG_BLK_DEV_INITRD
> >  	if (initrd_start) {
> > @@ -474,8 +478,6 @@ void __init arm64_memblock_init(void)
> >  
> >  	reserve_crashkernel();
> >  
> > -	reserve_elfcorehdr();
> 
> Why isn't this also a problem for reserve_crashkernel() or any other
> static reservations?
> 
> Will

  reply	other threads:[~2017-12-13 10:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-11  5:33 [PATCH] arch/arm64: elfcorehdr should be the first allocation Prabhakar Kushwaha
2017-12-11 14:07 ` Will Deacon
2017-12-13 10:46   ` AKASHI Takahiro [this message]
2017-12-15 14:20     ` Poonam Aggrwal
2017-12-18  5:33       ` AKASHI Takahiro
2017-12-18  8:20         ` Poonam Aggrwal

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=20171213104640.GD28046@linaro.org \
    --to=takahiro.akashi@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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;
as well as URLs for NNTP newsgroup(s).