Messages in this thread | | | From | John Ogness <> | Subject | Re: [PATCH] printk: ringbuffer: Fix truncating buffer size min_t cast | Date | Mon, 14 Aug 2023 08:26:28 +0206 |
| |
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>
| |