Re: [PATCH] hw/arm/smmuv3: Assert input to oas2bits() is valid

2024-07-25 Thread Peter Maydell
On Mon, 22 Jul 2024 at 11:35, Mostafa Saleh wrote: > > Coverity has spotted a possible problem with the OAS handling > (CID 1558464), where the error return of oas2bits() -1 is not > checked, which can cause an overflow in oas value. > > oas2bits() is only called with valid inputs, harden the func

Re: [PATCH] hw/arm/smmuv3: Assert input to oas2bits() is valid

2024-07-22 Thread Eric Auger
On 7/22/24 12:35, Mostafa Saleh wrote: > Coverity has spotted a possible problem with the OAS handling > (CID 1558464), where the error return of oas2bits() -1 is not > checked, which can cause an overflow in oas value. > > oas2bits() is only called with valid inputs, harden the function > to as

Re: [PATCH] hw/arm/smmuv3: Assert input to oas2bits() is valid

2024-07-22 Thread Philippe Mathieu-Daudé
On 22/7/24 12:35, Mostafa Saleh wrote: Coverity has spotted a possible problem with the OAS handling (CID 1558464), where the error return of oas2bits() -1 is not checked, which can cause an overflow in oas value. oas2bits() is only called with valid inputs, harden the function to assert that.

[PATCH] hw/arm/smmuv3: Assert input to oas2bits() is valid

2024-07-22 Thread Mostafa Saleh
Coverity has spotted a possible problem with the OAS handling (CID 1558464), where the error return of oas2bits() -1 is not checked, which can cause an overflow in oas value. oas2bits() is only called with valid inputs, harden the function to assert that. Reported-By: Peter Maydell Link: https: