From: John Ogness <john.ogness@linutronix.de>
To: Petr Mladek <pmladek@suse.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>,
Steven Rostedt <rostedt@goodmis.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/1] printk: fix syslog_print_all() 1024-byte edge case
Date: Thu, 21 Jan 2021 06:49:46 +0106 [thread overview]
Message-ID: <87sg6uq1yl.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <20210120194106.26441-2-john.ogness@linutronix.de>
On 2021-01-20, John Ogness <john.ogness@linutronix.de> 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
prev parent reply other threads:[~2021-01-21 5:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-20 19:41 [PATCH 0/1] another size-1 fixup from msg_print_text() John Ogness
2021-01-20 19:41 ` [PATCH 1/1] printk: fix syslog_print_all() 1024-byte edge case John Ogness
2021-01-21 5:43 ` John Ogness [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87sg6uq1yl.fsf@jogness.linutronix.de \
--to=john.ogness@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky.work@gmail.com \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®