Re: [PATCH] ppc/xive: Fix uint32_t overflow

2023-09-14 Thread Peter Maydell
On Wed, 13 Sept 2023 at 06:57, Cédric Le Goater wrote: > > As reported by Coverity, "idx << xive->pc_shift" is evaluated using > 32-bit arithmetic, and then used in a context expecting a "uint64_t". > Add a uint64_t cast. > > Fixes: Coverity CID 1519049 > Fixes: b68147b7a5bf ("ppc/xive: Add suppor

Re: [PATCH] ppc/xive: Fix uint32_t overflow

2023-09-12 Thread Frederic Barrat
On 13/09/2023 07:56, Cédric Le Goater wrote: As reported by Coverity, "idx << xive->pc_shift" is evaluated using 32-bit arithmetic, and then used in a context expecting a "uint64_t". Add a uint64_t cast. Fixes: Coverity CID 1519049 Fixes: b68147b7a5bf ("ppc/xive: Add support for the PC MMIOs"

Re: [PATCH] ppc/xive: Fix uint32_t overflow

2023-09-12 Thread Philippe Mathieu-Daudé
On 13/9/23 07:56, Cédric Le Goater wrote: As reported by Coverity, "idx << xive->pc_shift" is evaluated using 32-bit arithmetic, and then used in a context expecting a "uint64_t". Add a uint64_t cast. Fixes: Coverity CID 1519049 Fixes: b68147b7a5bf ("ppc/xive: Add support for the PC MMIOs") Sign

[PATCH] ppc/xive: Fix uint32_t overflow

2023-09-12 Thread Cédric Le Goater
As reported by Coverity, "idx << xive->pc_shift" is evaluated using 32-bit arithmetic, and then used in a context expecting a "uint64_t". Add a uint64_t cast. Fixes: Coverity CID 1519049 Fixes: b68147b7a5bf ("ppc/xive: Add support for the PC MMIOs") Signed-off-by: Cédric Le Goater --- hw/intc/pn