lkml.org 
[lkml]   [2022]   [Jan]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH v3 2/4] mm/page_owner: Use scnprintf() to avoid excessive buffer overrun check
    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@redhat.com>
    > Acked-by: David Rientjes <rientjes@google.com>
    > Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>

    Acked-by: Roman Gushchin <guro@fb.com>

    \
     
     \ /
      Last update: 2022-01-31 21:40    [W:2.802 / U:0.112 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site