lkml.org 
[lkml]   [2024]   [Mar]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] rcu: Fix buffer overlow in print_cpu_stall_info()
From

Thank you for the feedback!
> would you like to resend keeping the buffer-overflow fix but leaving
> out the signed-to-unsigned conversion?
>
I will make a second version of the patch, without
conversion as it is intentional.
> However, the signed output is intentional. The idea is that if the
> timekeeping code is confused enough to run the jiffies counter backwards,
> we see a small negative number rather than a huge positive number.
> For example, -132 is immediately obvious, while the 64-bit unsigned
> equivalent of 18446744073709551484 might not be.
I had suspicions that was the case, however, I did not find the pointers
in the code or in the commit message, that it was intentional, so I assumed
a mistake.
Maybe, it would be a good idea for me to add a comment with intent
clarification, to reduce possibility of the same confusion in the future,
while I am at it? If so, should I do it in the same patch, or make a separate one?

\
 
 \ /
  Last update: 2024-05-27 16:15    [W:0.067 / U:0.168 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site