Implement secure alloc/free using vmalloc/vfree

In kernel there is no point in mlocking and zeroring memory
before freeing.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2019-04-18 14:41:40 -04:00
parent 0cddcb6f5f
commit 79eb92cd9a

View File

@ -55,6 +55,16 @@ static inline void env_vfree(const void *ptr)
cas_vfree(ptr);
}
static inline void *env_secure_alloc(size_t size)
{
return env_vmalloc(size);
}
static inline void env_secure_free(const void *ptr, size_t size)
{
env_vfree(ptr);
}
/* *** ALLOCATOR *** */
typedef struct _env_allocator env_allocator;