Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 May 2021 18:14:56 GMT
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: abcac97f8202 - main - LinuxKPI: add kfree_sensitive() using zfree().
Message-ID:  <202105251814.14PIEuum043744@gitrepo.freebsd.org>

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

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

commit abcac97f8202d91b61ae4846794ba60166a56cfe
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2021-05-24 18:43:33 +0000
Commit:     Bjoern A. Zeeb <bz@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)
 {



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