Re: [PATCH] ftrace: Avoid potential division by zero in function_stat_show()
From: Nikolay Kuratov
Date: Wed Feb 05 2025 - 06:23:04 EST
Oops, this still does not fix an overflow because of
> rec->time_square_sum += calltime * calltime;
We can't eliminate overflows easily without both using u64 and converting
ns to us prior to any squaring. I will send an appropriate patch later
if needed. Maybe we're a way too paranoid about overflows and really want
only not to divide by zero?