1MEMZERO_EXPLICIT(9)        Basic C Library Functions       MEMZERO_EXPLICIT(9)
2
3
4

NAME

6       memzero_explicit - Fill a region of memory (e.g. sensitive keying data)
7       with 0s.
8

SYNOPSIS

10       void memzero_explicit(void * s, size_t count);
11

ARGUMENTS

13       s
14           Pointer to the start of the area.
15
16       count
17           The size of the area.
18

NOTE

20       usually using memset is just fine (!), but in cases where clearing out
21       _local_ data at the end of a scope is necessary, memzero_explicit
22       should be used instead in order to prevent the compiler from optimising
23       away zeroing.
24
25       memzero_explicit doesn't need an arch-specific version as it just
26       invokes the one of memset implicitly.
27
29Kernel Hackers Manual 3.10         June 2019               MEMZERO_EXPLICIT(9)
Impressum