From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com,
arnd@arndb.de, gregkh@linuxfoundation.org, deller@gmx.de,
javierm@redhat.com, bhe@redhat.com, robh@kernel.org,
alexghiti@rivosinc.com, bjorn@rivosinc.com,
akpm@linux-foundation.org, namcao@linutronix.de,
dawei.li@shingroup.cn, chenjiahao16@huawei.com, rppt@kernel.org,
julian.stecklina@cyberus-technology.de,
rafael.j.wysocki@intel.com, linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/3] ARM: Fix crash memory reserve exceed system memory bug
Date: Mon, 29 Jul 2024 12:14:22 +0100 [thread overview]
Message-ID: <Zqd5joQ/hB8wfebg@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240722035701.696874-3-ruanjinjie@huawei.com>
On Mon, Jul 22, 2024 at 11:57:00AM +0800, Jinjie Ruan wrote:
> Similar with x86_32, on Qemu vexpress-a9 with 1GB memory, the crash kernel
> "crashkernel=4G" is ok as below:
> Reserving 4096MB of memory at 2432MB for crashkernel (System RAM: 1024MB)
>
> The cause is that the crash_size is parsed and printed with "unsigned long
> long" data type which is 8 bytes but allocated used with "phys_addr_t"
> which is 4 bytes in memblock_phys_alloc_range().
>
> Fix it by checking if the crash_size is greater than system RAM size and
> warn out as parse_crashkernel_mem() do it if so as Baoquan suggested.
>
> After this patch, it fails and there is no above confusing reserve
> success info.
>
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> Suggested-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
WARNING: multiple messages have this Message-ID (diff)
From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Jinjie Ruan <ruanjinjie@huawei.com>
Cc: paul.walmsley@sifive.com, palmer@dabbelt.com,
aou@eecs.berkeley.edu, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, dave.hansen@linux.intel.com, hpa@zytor.com,
arnd@arndb.de, gregkh@linuxfoundation.org, deller@gmx.de,
javierm@redhat.com, bhe@redhat.com, robh@kernel.org,
alexghiti@rivosinc.com, bjorn@rivosinc.com,
akpm@linux-foundation.org, namcao@linutronix.de,
dawei.li@shingroup.cn, chenjiahao16@huawei.com, rppt@kernel.org,
julian.stecklina@cyberus-technology.de,
rafael.j.wysocki@intel.com, linux-arm-kernel@lists.infradead.org,
linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 2/3] ARM: Fix crash memory reserve exceed system memory bug
Date: Mon, 29 Jul 2024 12:14:22 +0100 [thread overview]
Message-ID: <Zqd5joQ/hB8wfebg@shell.armlinux.org.uk> (raw)
In-Reply-To: <20240722035701.696874-3-ruanjinjie@huawei.com>
On Mon, Jul 22, 2024 at 11:57:00AM +0800, Jinjie Ruan wrote:
> Similar with x86_32, on Qemu vexpress-a9 with 1GB memory, the crash kernel
> "crashkernel=4G" is ok as below:
> Reserving 4096MB of memory at 2432MB for crashkernel (System RAM: 1024MB)
>
> The cause is that the crash_size is parsed and printed with "unsigned long
> long" data type which is 8 bytes but allocated used with "phys_addr_t"
> which is 4 bytes in memblock_phys_alloc_range().
>
> Fix it by checking if the crash_size is greater than system RAM size and
> warn out as parse_crashkernel_mem() do it if so as Baoquan suggested.
>
> After this patch, it fails and there is no above confusing reserve
> success info.
>
> Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
> Suggested-by: Baoquan He <bhe@redhat.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Thanks!
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
next prev parent reply other threads:[~2024-07-29 11:15 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-22 3:56 [PATCH v4 0/3] crash: Fix crash memory reserve exceed system memory bug Jinjie Ruan
2024-07-22 3:56 ` Jinjie Ruan
2024-07-22 3:56 ` [PATCH v4 1/3] x86/kexec: " Jinjie Ruan
2024-07-22 3:56 ` Jinjie Ruan
2024-07-22 3:57 ` [PATCH v4 2/3] ARM: " Jinjie Ruan
2024-07-22 3:57 ` Jinjie Ruan
2024-07-29 11:14 ` Russell King (Oracle) [this message]
2024-07-29 11:14 ` Russell King (Oracle)
2024-07-22 3:57 ` [PATCH v4 3/3] riscv: kdump: " Jinjie Ruan
2024-07-22 3:57 ` Jinjie Ruan
2024-07-22 6:38 ` Mike Rapoport
2024-07-22 6:38 ` Mike Rapoport
2024-07-22 7:04 ` Jinjie Ruan
2024-07-22 7:04 ` Jinjie Ruan
2024-07-22 7:08 ` Jinjie Ruan
2024-07-22 7:08 ` Jinjie Ruan
2024-07-22 7:23 ` Mike Rapoport
2024-07-22 7:23 ` Mike Rapoport
2024-07-22 7:49 ` Jinjie Ruan
2024-07-22 7:49 ` Jinjie Ruan
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=Zqd5joQ/hB8wfebg@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=akpm@linux-foundation.org \
--cc=alexghiti@rivosinc.com \
--cc=aou@eecs.berkeley.edu \
--cc=arnd@arndb.de \
--cc=bhe@redhat.com \
--cc=bjorn@rivosinc.com \
--cc=bp@alien8.de \
--cc=chenjiahao16@huawei.com \
--cc=dave.hansen@linux.intel.com \
--cc=dawei.li@shingroup.cn \
--cc=deller@gmx.de \
--cc=gregkh@linuxfoundation.org \
--cc=hpa@zytor.com \
--cc=javierm@redhat.com \
--cc=julian.stecklina@cyberus-technology.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mingo@redhat.com \
--cc=namcao@linutronix.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=rafael.j.wysocki@intel.com \
--cc=robh@kernel.org \
--cc=rppt@kernel.org \
--cc=ruanjinjie@huawei.com \
--cc=tglx@linutronix.de \
/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 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.