[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkda+ZqXXbvXBotNbpK39_ghtY77AVi_bGLYMn2r_r-X6-Q@mail.gmail.com>
Date: Mon, 5 Aug 2024 09:14:40 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Jinjie Ruan <ruanjinjie@...wei.com>
Cc: linux@...linux.org.uk, bhe@...hat.com, vgoyal@...hat.com,
dyoung@...hat.com, paul.walmsley@...ive.com, palmer@...belt.com,
aou@...s.berkeley.edu, arnd@...db.de, afd@...com, akpm@...ux-foundation.org,
rmk+kernel@...linux.org.uk, eric.devolder@...cle.com,
gregkh@...uxfoundation.org, deller@....de, javierm@...hat.com,
robh@...nel.org, thunder.leizhen@...wei.com, austindh.kim@...il.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
kexec@...ts.infradead.org
Subject: Re: [PATCH 2/3] ARM: Fix crash kenrel data type bug
On Mon, Jul 8, 2024 at 3:29 PM Jinjie Ruan <ruanjinjie@...wei.com> wrote:
> 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 above info is confusing, because the System memory is as below:
> # cat /proc/iomem | grep Sys
> 60000000-9fffffff : System RAM
>
> The cause is that the crash_size is parsed and printed with "unsigned long
> long" data type which is 8 bytes but used with "phys_addr_t" which is
> 4 bytes in memblock_phys_alloc_range().
Is that the whole explanation?
> /* invalid value specified or crashkernel=0 */
> + crash_size = (phys_addr_t)crash_size;
> if (ret || !crash_size)
> return;
How did crash_size get assigned before you added this oneliner?
Yours,
Linus Walleij
Powered by blists - more mailing lists