Messages in this thread | | | From | John Ogness <> | Subject | Re: [PATCH] printk: fix buffer overflow potential for print_text() | Date | Tue, 19 Jan 2021 10:00:47 +0106 |
| |
On 2021-01-19, Sergey Senozhatsky <sergey.senozhatsky@gmail.com> wrote: > John, how did you spot these problems?
I am preparing my series to remove the logbuf_lock, which also refactors and consolidates code from syslog_print_all() and kmsg_dump_get_buffer(). While testing/verifying my series, I noticed the these oddities in the semantics and decided I should research where they came from and if they were actually necessary.
I wouldn't say the oddities are necessary (in fact, they are quite annoying), but we have decided to keep them in out of fear of breaking out-of-tree modules and/or interesting userspace code.
One positive effect of the rework is that we are finding these oddities and documenting them. I think you and Petr are going down a similar path with the console registration stuff now.
John
| |