Skip to contentSkip to conversation

printk regression fixes for 5.11-rc5

GIT PULL Merged Petr Mladek 2 participants 2 messages Jan 21, 2021

lore
Share & tools
lore
#0 lore raw

Linus,

please pull three printk fixes from

git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git tags/printk-for-5.11-printk-rework-fixup

===============================

- 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.

===============================

All three regressions were found and fixed by John when working on another changes.

----------------------------------------------------------------
John Ogness (3):
printk: ringbuffer: fix line counting
printk: fix kmsg_dump_get_buffer length calulations
printk: fix buffer overflow potential for print_text()

Petr Mladek (1):
Merge branch 'printk-rework' into for-linus

 kernel/printk/printk.c            | 40 ++++++++++++++++++++++++++++-----------
 kernel/printk/printk_ringbuffer.c |  2 +-
 2 files changed, 30 insertions(+), 12 deletions(-)
merge bot Merged
#1 lore raw
The pull request you sent on Thu, 21 Jan 2021 17:04:01 +0100:

The pull request you sent on Thu, 21 Jan 2021 17:04:01 +0100:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/printk/linux.git tags/printk-for-5.11-printk-rework-fixup

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/2561bbbe2e959c966e21ee23de91b9bd4bbf98af

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html