X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fstring.c;h=dcbe695695d59851d630afe585569daac30a6620;hb=8fb7e4488e20229828e54187b6aa3ed5cd7cb315;hp=dc4a86341f914f0c26b92977d6f99dcc4df482c2;hpb=b4fdcb02f1e39c27058a885905bd0277370ba441;p=pandora-kernel.git diff --git a/lib/string.c b/lib/string.c index dc4a86341f91..dcbe695695d5 100644 --- a/lib/string.c +++ b/lib/string.c @@ -583,6 +583,22 @@ void *memset(void *s, int c, size_t count) EXPORT_SYMBOL(memset); #endif +/** + * memzero_explicit - Fill a region of memory (e.g. sensitive + * keying data) with 0s. + * @s: Pointer to the start of the area. + * @count: The size of the area. + * + * memzero_explicit() doesn't need an arch-specific version as + * it just invokes the one of memset() implicitly. + */ +void memzero_explicit(void *s, size_t count) +{ + memset(s, 0, count); + barrier(); +} +EXPORT_SYMBOL(memzero_explicit); + #ifndef __HAVE_ARCH_MEMCPY /** * memcpy - Copy one area of memory to another