Messages in this thread | | | Date | Tue, 29 Sep 2020 22:04:10 +0900 | From | Sergey Senozhatsky <> | Subject | Re: [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
| |