Re: [PATCH 1/1] printk: fix syslog_print_all() 1024-byte edge case

From: John Ogness
Date: Thu Jan 21 2021 - 00:45:56 EST


On 2021-01-20, John Ogness <john.ogness@xxxxxxxxxxxxx> wrote:
> If klogctl(SYSLOG_ACTION_READ_ALL) is called with a buffer size
> of 1024 and the message data will exactly fill 1024 bytes and the
> last message of that is multi-line, the last line of the last
> message will be silently dropped.

Sorry, please disregard this patch. The problem is not because of the
size-1 behavior of record_print_text(). It is because syslog_print_all()
is allocating a temp buffer that is not large enough to hold multi-line
syslog-expanded records.

That problem can be solved another day, if we even want to consider it a
problem.

Sorry for the noise.

John Ogness