Merge tag 'printk-for-5.11-printk-rework-fixup' of git://git.kernel.org/pub/scm/linux...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jan 2021 19:37:22 +0000 (11:37 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 21 Jan 2021 19:37:22 +0000 (11:37 -0800)
commit2561bbbe2e959c966e21ee23de91b9bd4bbf98af
tree7527ad616184dd5d06fdf23de8d2699536300f33
parent6a52f4cf863a53b8196286e2b95d3ef3bd8183ad
parent535b6a122c6b43af5772ca39cbff7056749aae74
Merge tag 'printk-for-5.11-printk-rework-fixup' of git://git./linux/kernel/git/printk/linux

Pull printk fixes from Petr Mladek:

 - Fix line counting and buffer size calculation. Both regressions
   caused that a reader buffer might not get filled as much as possible.

 - Restore non-documented behavior of printk() reader API and make it
   official.

   It did not fill the last byte of the provided buffer before 5.10. Two
   architectures, powerpc and um, used it to add the trailing '\0'.
   There might theoretically be more callers depending on this behavior
   in userspace.

* tag 'printk-for-5.11-printk-rework-fixup' of git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux:
  printk: fix buffer overflow potential for print_text()
  printk: fix kmsg_dump_get_buffer length calulations
  printk: ringbuffer: fix line counting