kmsg: escape the backslash character while exporting data
authorKay Sievers <kay@vrfy.org>
Fri, 6 Jul 2012 16:50:09 +0000 (09:50 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Jul 2012 16:50:09 +0000 (09:50 -0700)
commite3f5a5f27153228569f3396049838e9727dae86e
tree8ae40775f660a5dcca57960fac222096e1dfefed
parent5c53d819c71c63fdc91f30a59164583f68e2d63a
kmsg: escape the backslash character while exporting data

Non-printable characters in the log data are hex-escaped to ensure safe
post processing. We need to escape a backslash we find in the data, to be
able to distinguish it from a backslash we add for the escaping.

Also escape the non-printable character 127.

Thanks to Miloslav Trmac for the heads up.

Reported-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Kay Sievers <kay@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/printk.c