[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200929130410.GC529@jagdpanzerIV.localdomain>
Date: Tue, 29 Sep 2020 22:04:10 +0900
From: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
To: John Ogness <john.ogness@...utronix.de>
Cc: Petr Mladek <pmladek@...e.com>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Sergey Senozhatsky <sergey.senozhatsky@...il.com>,
Steven Rostedt <rostedt@...dmis.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Marek Szyprowski <m.szyprowski@...sung.com>,
linux-kernel@...r.kernel.org
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
Powered by blists - more mailing lists