diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-08-27 20:33:03 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2016-08-27 20:33:03 +0200 |
commit | 0f97eb3a609cd892a0de1d61ef61e5b48be082d8 (patch) | |
tree | 5685c0bfe39b4fa9c29645cddf2152114660e86b /sys/src/9/port/portfns.h | |
parent | 8a73650874a68575fb7b93a44f3bba352c50288a (diff) |
kernel: add secalloc() and secfree() functions for secret memory allocation
The kernel needs to keep cryptographic keys and cipher states
confidential. secalloc() allocates memory from the secret pool
which is protected from debuggers reading the memory thru devproc.
secfree() releases the memory, overriding the data with garbage.
Diffstat (limited to 'sys/src/9/port/portfns.h')
-rw-r--r-- | sys/src/9/port/portfns.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/9/port/portfns.h b/sys/src/9/port/portfns.h index 4b639c3a1..bd0c6f16c 100644 --- a/sys/src/9/port/portfns.h +++ b/sys/src/9/port/portfns.h @@ -308,6 +308,8 @@ void sched(void); void scheddump(void); void schedinit(void); void (*screenputs)(char*, int); +void* secalloc(ulong); +void secfree(void*); long seconds(void); uintptr segattach(int, char *, uintptr, uintptr); void segclock(uintptr); |