lkml.org 
[lkml]   [2020]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH next 1/2] printk: avoid and/or handle record truncation
On (20/09/26 04:01), John Ogness wrote:
> + if (text_len > buf_size) {
> + text_len = buf_size;
> + truncated = true;
> + }
> +
> prefix_len = info_print_prefix(r->info, syslog, time, prefix);
>
> /*
> @@ -1911,7 +1916,7 @@ static size_t log_output(int facility, int level, enum log_flags lflags,
> struct printk_record r;
>
> prb_rec_init_wr(&r, text_len);
> - if (prb_reserve_in_last(&e, prb, &r, caller_id)) {
> + if (prb_reserve_in_last(&e, prb, &r, caller_id, LOG_LINE_MAX)) {

Are we going to pass anything other than LOG_LINE_MAX? If not then
maybe we can drop that argument and compare the text_buf_size to
LOG_LINE_MAX?

-ss

\
 
 \ /
  Last update: 2020-09-29 15:04    [W:0.143 / U:2.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site