Re: [PATCH v2] printk: Do not lose last line in kmsg buffer dump

2019-07-16 Thread Petr Mladek
On Sat 2019-07-13 15:03:00, Sergey Senozhatsky wrote: > On (07/12/19 15:11), Petr Mladek wrote: > > > Looks correct to me as well. > > > > > > Reviewed-by: Sergey Senozhatsky > > > > The patch has been committed into printk.git, branch for-5.3-fixes. > > > > I am still a bit undecided whether t

Re: [PATCH v2] printk: Do not lose last line in kmsg buffer dump

2019-07-12 Thread Sergey Senozhatsky
On (07/12/19 15:11), Petr Mladek wrote: > > Looks correct to me as well. > > > > Reviewed-by: Sergey Senozhatsky > > The patch has been committed into printk.git, branch for-5.3-fixes. > > I am still a bit undecided whether to send pull request the following > week or wait for 5.4. On one hand,

Re: [PATCH v2] printk: Do not lose last line in kmsg buffer dump

2019-07-12 Thread Petr Mladek
On Fri 2019-07-12 18:22:53, Sergey Senozhatsky wrote: > On (07/12/19 11:12), Petr Mladek wrote: > > > For example, with the following two final prints: > > > > > > [6.427502] A > > > [6.427769] 12345 > > > > > > A dump of a 64-byte buffer filled by kmsg_dump_get_buffer

Re: [PATCH v2] printk: Do not lose last line in kmsg buffer dump

2019-07-12 Thread Sergey Senozhatsky
On (07/12/19 11:12), Petr Mladek wrote: > > For example, with the following two final prints: > > > > [6.427502] A > > [6.427769] 12345 > > > > A dump of a 64-byte buffer filled by kmsg_dump_get_buffer(), before this > > patch: > > > > : 3c 30 3e 5b 20 20 20

Re: [PATCH v2] printk: Do not lose last line in kmsg buffer dump

2019-07-12 Thread Petr Mladek
On Thu 2019-07-11 16:29:37, Vincent Whitchurch wrote: > kmsg_dump_get_buffer() is supposed to select all the youngest log > messages which fit into the provided buffer. It determines the correct > start index by using msg_print_text() with a NULL buffer to calculate > the size of each entry. Howe

Re: [PATCH v2] printk: Do not lose last line in kmsg buffer dump

2019-07-12 Thread Vincent Whitchurch
On Fri, Jul 12, 2019 at 10:09:04AM +0200, Petr Mladek wrote: > The patch looks like a hack using a hole that the next cycle > does not longer check the number of really stored characters. > > What would happen when msg_print_text() starts adding > the trailing '\0' as suggested by > https://lkml.k

Re: [PATCH v2] printk: Do not lose last line in kmsg buffer dump

2019-07-12 Thread Petr Mladek
On Thu 2019-07-11 16:29:37, Vincent Whitchurch wrote: > kmsg_dump_get_buffer() is supposed to select all the youngest log > messages which fit into the provided buffer. It determines the correct > start index by using msg_print_text() with a NULL buffer to calculate > the size of each entry. Howe

[PATCH v2] printk: Do not lose last line in kmsg buffer dump

2019-07-11 Thread Vincent Whitchurch
kmsg_dump_get_buffer() is supposed to select all the youngest log messages which fit into the provided buffer. It determines the correct start index by using msg_print_text() with a NULL buffer to calculate the size of each entry. However, when performing the actual writes, msg_print_text() only