lkml.org 
[lkml]   [2011]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH] kernel: escape non-ASCII and control characters in printk()
    From
    Date
    On Wed, 2011-06-22 at 13:53 +0400, Vasiliy Kulikov wrote:
    > This patch escapes all characters outside of allowed '\n' plus 0x20-0x7E
    > charset passed to printk().

    []

    > diff --git a/kernel/printk.c b/kernel/printk.c
    []
    > +static void emit_log_char_escaped(char c)
    > +{
    > + char buffer[8];
    > + int i, len;
    > +
    > + if ((c >= ' ' && c < 127) || c == '\n')

    if (isprint(c))

    Why not add this to emit_log_char?




    \
     
     \ /
      Last update: 2011-06-22 18:41    [W:0.019 / U:0.284 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site