Hi, Phil.
On 26.11.2024 11:39, Philippe Mathieu-Daudé wrote:
Hi Dmitry,
On 6/11/24 11:40, Dmitry Frolov wrote:
Both timeout and return value of imx_gpt_update_count() are unsigned.
Thus "limit" can not be negative, but obviously it was implied.
Found by Linux Verification Center (linuxtesting.org) with SVACE.
Signed-off-by: Dmitry Frolov <[email protected]>
---
hw/timer/imx_gpt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/timer/imx_gpt.c b/hw/timer/imx_gpt.c
index 23b3d79bdb..06e4837fed 100644
--- a/hw/timer/imx_gpt.c
+++ b/hw/timer/imx_gpt.c
@@ -238,7 +238,7 @@ static void
imx_gpt_compute_next_timeout(IMXGPTState *s, bool event)
}
/* the new range to count down from */
- limit = timeout - imx_gpt_update_count(s);
+ limit = (long long)timeout - imx_gpt_update_count(s);
You posted similar automatic change in at least 3 different
code areas.
The patches, I've sent, are not "automatic".
The problems were found by static analyzer in different code
areas, maintained by different people. These problems were
reviewed and fixed by me manually.
Each time different maintainers made similar
comments. At this point you should be able to auto-review
this patch and respin a proper follow up IMHO. Reviewers and
maintainers time is scarce.
Sorry, if do something wrong.
What is the proper workflow in this case from your point of view?
Regards,
Phil.
Regards,
Dmitry.