git: abcac97f8202 - main - LinuxKPI: add kfree_sensitive() using zfree().
Bjoern A. Zeeb
bz at FreeBSD.org
Tue May 25 18:14:57 UTC 2021
The branch main has been updated by bz:
URL: https://cgit.FreeBSD.org/src/commit/?id=abcac97f8202d91b61ae4846794ba60166a56cfe
commit abcac97f8202d91b61ae4846794ba60166a56cfe
Author: Bjoern A. Zeeb <bz at FreeBSD.org>
AuthorDate: 2021-05-24 18:43:33 +0000
Commit: Bjoern A. Zeeb <bz at FreeBSD.org>
CommitDate: 2021-05-25 18:01:46 +0000
LinuxKPI: add kfree_sensitive() using zfree().
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by: hselasky
Differential Revision: https://reviews.freebsd.org/D30437
---
sys/compat/linuxkpi/common/include/linux/slab.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sys/compat/linuxkpi/common/include/linux/slab.h b/sys/compat/linuxkpi/common/include/linux/slab.h
index 9494d458e87c..8d5eb3e85e96 100644
--- a/sys/compat/linuxkpi/common/include/linux/slab.h
+++ b/sys/compat/linuxkpi/common/include/linux/slab.h
@@ -198,6 +198,12 @@ kfree(const void *ptr)
free(__DECONST(void *, ptr), M_KMALLOC);
}
+static __inline void
+kfree_sensitive(const void *ptr)
+{
+ zfree(__DECONST(void *, ptr), M_KMALLOC);
+}
+
static inline size_t
ksize(const void *ptr)
{
More information about the dev-commits-src-main
mailing list