diff options
| author | 2014-11-18 19:43:46 -0700 | |
|---|---|---|
| committer | 2014-11-18 19:43:46 -0700 | |
| commit | b3521729769ec71567a2e32a38609f87e781e41b (patch) | |
| tree | 66a8494968706420c3eb043caa5868702d440d18 /lib/string.c | |
| parent | NVMe: enable IO stats by default (diff) | |
| parent | Linux 3.18-rc5 (diff) | |
| download | linux-dev-b3521729769ec71567a2e32a38609f87e781e41b.tar.xz linux-dev-b3521729769ec71567a2e32a38609f87e781e41b.zip | |
Merge branch 'master' into for-3.19/drivers
Diffstat (limited to 'lib/string.c')
| -rw-r--r-- | lib/string.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/string.c b/lib/string.c index 2fc20aa06f84..10063300b830 100644 --- a/lib/string.c +++ b/lib/string.c @@ -598,6 +598,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); + OPTIMIZER_HIDE_VAR(s); +} +EXPORT_SYMBOL(memzero_explicit); + #ifndef __HAVE_ARCH_MEMCPY /** * memcpy - Copy one area of memory to another |
