Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Jul 2021 00:36:13 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 756728ec1c56 - stable/13 - LinuxKPI: add kfree_sensitive() using zfree().
Message-ID:  <202107180036.16I0aDmN048832@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by bz:

URL: https://cgit.FreeBSD.org/src/commit/?id=756728ec1c56ea22f6ab4a57d45b72368fadc40a

commit 756728ec1c56ea22f6ab4a57d45b72368fadc40a
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2021-05-24 18:43:33 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2021-07-18 00:35:00 +0000

    LinuxKPI: add kfree_sensitive() using zfree().
    
    Sponsored by:   The FreeBSD Foundation
    Reviewed by:    hselasky
    Differential Revision: https://reviews.freebsd.org/D30437
    
    (cherry picked from commit abcac97f8202d91b61ae4846794ba60166a56cfe)
---
 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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202107180036.16I0aDmN048832>