string_helpers: add kstrdup_quotable
authorKees Cook <keescook@chromium.org>
Wed, 20 Apr 2016 22:46:23 +0000 (15:46 -0700)
committerJames Morris <james.l.morris@oracle.com>
Thu, 21 Apr 2016 00:47:25 +0000 (10:47 +1000)
commitb53f27e4fa0d0e72d897830cc4f3f83d2a25d952
treeb4834a2f32c2b1db43ea8e7a66600a3bfd2257fa
parent3c9d6296b7aee536a96ea2b53a15d23511738c1c
string_helpers: add kstrdup_quotable

Handle allocating and escaping a string safe for logging.

Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: James Morris <james.l.morris@oracle.com>
include/linux/string_helpers.h
lib/string_helpers.c