From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Petr Mladek <pmladek@suse.com>
Cc: Vincent Whitchurch <vincent.whitchurch@axis.com>,
sergey.senozhatsky@gmail.com, rostedt@goodmis.org,
Vincent Whitchurch <rabinv@axis.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] printk: Do not lose last line in kmsg buffer dump
Date: Fri, 12 Jul 2019 18:22:53 +0900 [thread overview]
Message-ID: <20190712092253.GA7922@jagdpanzerIV> (raw)
In-Reply-To: <20190712091251.or4bitunknzhrigf@pathway.suse.cz>
On (07/12/19 11:12), Petr Mladek wrote:
> > For example, with the following two final prints:
> >
> > [ 6.427502] AAAAAAAAAAAAA
> > [ 6.427769] BBBBBBBB12345
> >
> > A dump of a 64-byte buffer filled by kmsg_dump_get_buffer(), before this
> > patch:
> >
> > 00000000: 3c 30 3e 5b 20 20 20 20 36 2e 35 32 32 31 39 37 <0>[ 6.522197
> > 00000010: 5d 20 41 41 41 41 41 41 41 41 41 41 41 41 41 0a ] AAAAAAAAAAAAA.
> > 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> > 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> >
> > After this patch:
> >
> > 00000000: 3c 30 3e 5b 20 20 20 20 36 2e 34 35 36 36 37 38 <0>[ 6.456678
> > 00000010: 5d 20 42 42 42 42 42 42 42 42 31 32 33 34 35 0a ] BBBBBBBB12345.
> > 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> > 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> >
> > Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
>
> I think that I need vacation. I have got lost in all the checks
> and got it wrongly in the morning.
>
> This patch fixes the calculation of messages that might fit
> into the buffer. It makes sure that the function that writes
> the messages will really allow to write them.
>
> It seems to be the correct fix.
>
> Reviewed-by: Petr Mladek <pmladek@suse.com>
Looks correct to me as well.
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
-ss
next prev parent reply other threads:[~2019-07-12 9:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-11 14:29 [PATCH v2] printk: Do not lose last line in kmsg buffer dump Vincent Whitchurch
2019-07-12 8:09 ` Petr Mladek
2019-07-12 8:44 ` Vincent Whitchurch
2019-07-12 9:12 ` Petr Mladek
2019-07-12 9:22 ` Sergey Senozhatsky [this message]
2019-07-12 13:11 ` Petr Mladek
2019-07-13 6:03 ` Sergey Senozhatsky
2019-07-16 13:35 ` Petr Mladek
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=20190712092253.GA7922@jagdpanzerIV \
--to=sergey.senozhatsky.work@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmladek@suse.com \
--cc=rabinv@axis.com \
--cc=rostedt@goodmis.org \
--cc=sergey.senozhatsky@gmail.com \
--cc=vincent.whitchurch@axis.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;
as well as URLs for NNTP newsgroup(s).