lkml.org 
[lkml]   [2016]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v3 1/6] string_helpers: add kstrdup_quotable
From
Date
On Wed, 2016-04-06 at 17:20 -0700, Kees Cook wrote:
> Handle allocating and escaping a string safe for logging.

trivia: should add const

> diff --git a/include/linux/string_helpers.h b/include/linux/string_helpers.h
[]
> @@ -68,4 +68,6 @@ static inline int string_escape_str_any_np(const char *src, char *dst,
>   return string_escape_str(src, dst, sz, ESCAPE_ANY_NP, only);
>  }
>  
> +char *kstrdup_quotable(char *src, gfp_t gfp);

char *kstrdup_quotable(const char *src, gfp_t gfp);

\
 
 \ /
  Last update: 2016-04-07 10:21    [from the cache]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog