On Mon, Jan 31, 2022 at 02:23:06PM -0500, Waiman Long wrote: > The snprintf() function can return a length greater than the given > input size. That will require a check for buffer overrun after each > invocation of snprintf(). scnprintf(), on the other hand, will never > return a greater length. By using scnprintf() in selected places, we > can avoid some buffer overrun checks except after stack_depot_snprint() > and after the last snprintf(). > > Signed-off-by: Waiman Long <longman@xxxxxxxxxx> > Acked-by: David Rientjes <rientjes@xxxxxxxxxx> > Reviewed-by: Sergey Senozhatsky <senozhatsky@xxxxxxxxxxxx> Acked-by: Roman Gushchin <guro@xxxxxx>