lkml.org 
[lkml]   [2014]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/5] printk: Check for too long messages
Date
The check for free space in the log buffer always passes when "first_seq"
and "next_seq" are equal. In theory, it might cause writing outside of
the log buffer.

Fortunately, the current usage looks safe because the used "text" and "dict"
buffers are quite limited. See the second patch for more details.

Anyway, it is better to be on the safe side and add a check. An easy
solution is done in the 2nd patch and it is improved in the 4th patch.

5th patch fixes the computation of the printed message length.

1st and 3rd patches just do some code refactoring to make the other patches
easier.

The patches can be applied against both linux.git and linux-next.git.

Just a heads up. These patches were created when working safe printk
in NMI context. I have resolved most problems, including my sickness,
and should be able to send the NMI stuff soon.

Petr Mladek (5):
printk: Split code for making free space in the log buffer
printk: Ignore too long messages
printk: Split message size computation
printk: Shrink too long messages
printk: Return really stored message length

kernel/printk/printk.c | 144 ++++++++++++++++++++++++++++++++++++++-----------
1 file changed, 113 insertions(+), 31 deletions(-)

--
1.8.4



\
 
 \ /
  Last update: 2014-04-10 12:21    [W:0.066 / U:1.164 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site