From: Sayali Patil <sayalip@linux.ibm.com>
To: "Ritesh Harjani (IBM)" <ritesh.list@gmail.com>,
linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com,
Christophe Leroy <chleroy@kernel.org>,
Michael Ellerman <mpe@kernel.org>,
Nicholas Piggin <npiggin@gmail.com>
Cc: linux-kernel@vger.kernel.org,
Mahesh Salgaonkar <mahesh@linux.ibm.com>,
Sourabh Jain <sourabhjain@linux.ibm.com>
Subject: Re: [PATCH v2] powerpc/fadump: define MIN_RMA in bytes value to fix overflow
Date: Tue, 16 Jun 2026 11:48:03 +0530 [thread overview]
Message-ID: <8d647e52-d5cd-4158-9072-7ea6e4c1728d@linux.ibm.com> (raw)
In-Reply-To: <eci8du2i.ritesh.list@gmail.com>
On 15/06/26 15:06, Ritesh Harjani (IBM) wrote:
> Sayali Patil <sayalip@linux.ibm.com> writes:
>
>> The MIN_RMA size checks in fadump_setup_param_area() use
>> (MIN_RMA * 1024 * 1024), which is evaluated in int and can
>> overflow when MIN_RMA is increased to values such as SZ_2G.
>> This triggers compiler warnings such as:
>>
>> warning: integer overflow in expression of type 'int'
>> results in '0' [-Woverflow]
>>
>> Define MIN_RMA directly in bytes using SZ_1M and update the
>> callers accordingly. This avoids repeated unit conversions and
>> prevents integer overflow.
>>
>> Also convert MIN_RMA back to MB when populating the firmware
>> architecture vector, since firmware expects the value in MB.
>>
>> Fixes: b7bb46062457 ("powerpc/fadump: fix additional param memory reservation for HASH MMU")
>
> Since this is not a bug per-se, so we need not add a Fixes tag.
> But while we are at it, we may correct the commit subject to...
>
> powerpc/fadump: Define MIN_RMA in bytes rather than MB
>
> ... since there is no overflow with it's current value.
>
> With the above changes in place, feel free to add:
> Reviewed-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
>
>
Sent out v3 incorporating the requested changes.
V3:
https://lore.kernel.org/all/310b040acef712fdc79e3e37d0f4c2213938b556.1781589284.git.sayalip@linux.ibm.com/
Thanks,
Sayali
prev parent reply other threads:[~2026-06-16 6:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-12 12:02 [PATCH v2] powerpc/fadump: define MIN_RMA in bytes value to fix overflow Sayali Patil
2026-06-15 9:36 ` Ritesh Harjani
2026-06-16 6:18 ` Sayali Patil [this message]
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=8d647e52-d5cd-4158-9072-7ea6e4c1728d@linux.ibm.com \
--to=sayalip@linux.ibm.com \
--cc=chleroy@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=maddy@linux.ibm.com \
--cc=mahesh@linux.ibm.com \
--cc=mpe@kernel.org \
--cc=npiggin@gmail.com \
--cc=ritesh.list@gmail.com \
--cc=sourabhjain@linux.ibm.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