lkml.org 
[lkml]   [2023]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] printk: ringbuffer: Fix truncating buffer size min_t cast
Date
On 2023-08-10, Kees Cook <keescook@chromium.org> wrote:
> If an output buffer size exceeded U16_MAX, the min_t(u16, ...) cast in
> copy_data() was causing writes to truncate. This manifested as output
> bytes being skipped, seen as %NUL bytes in pstore dumps when the available
> record size was larger than 65536. Fix the cast to no longer truncate
> the calculation.

Thanks for tracking this down.

Reviewed-by: John Ogness <john.ogness@linutronix.de>

\
 
 \ /
  Last update: 2023-08-14 08:22    [W:0.110 / U:1.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site