Re: [PATCH] hw/misc: cast rpm to uint64_t

2025-01-10 Thread Peter Maydell
On Thu, 26 Dec 2024 at 13:59, Tigran Sogomonian wrote: > > The value of an arithmetic expression > 'rpm * NPCM7XX_MFT_PULSE_PER_REVOLUTION' is a subject > to overflow because its operands are not cast to > a larger data type before performing arithmetic. Thus, need > to cast rpm to uint64_t. > > F

Re: [PATCH] hw/misc: cast rpm to uint64_t

2024-12-26 Thread Hao Wu
On Fri, Dec 27, 2024 at 3:02 AM Patrick Leis wrote: > > > On Thu, Dec 26, 2024 at 6:00 AM Tigran Sogomonian < > tsogomon...@astralinux.ru> wrote: > >> The value of an arithmetic expression >> 'rpm * NPCM7XX_MFT_PULSE_PER_REVOLUTION' is a subject >> to overflow because its operands are not cast to

Re: [PATCH] hw/misc: cast rpm to uint64_t

2024-12-26 Thread Patrick Leis
On Thu, Dec 26, 2024 at 6:00 AM Tigran Sogomonian wrote: > The value of an arithmetic expression > 'rpm * NPCM7XX_MFT_PULSE_PER_REVOLUTION' is a subject > to overflow because its operands are not cast to > a larger data type before performing arithmetic. Thus, need > to cast rpm to uint64_t. > >

[PATCH] hw/misc: cast rpm to uint64_t

2024-12-26 Thread Tigran Sogomonian
The value of an arithmetic expression 'rpm * NPCM7XX_MFT_PULSE_PER_REVOLUTION' is a subject to overflow because its operands are not cast to a larger data type before performing arithmetic. Thus, need to cast rpm to uint64_t. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signe