git: 56041ee817ff - main - LinuxKPI: Add want_init_on_free to linux/mm.h
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 08 Apr 2024 06:49:20 UTC
The branch main has been updated by wulf: URL: https://cgit.FreeBSD.org/src/commit/?id=56041ee817fff844e5b2de7eedc447e388ab988e commit 56041ee817fff844e5b2de7eedc447e388ab988e Author: Vladimir Kondratyev <wulf@FreeBSD.org> AuthorDate: 2024-04-08 06:47:43 +0000 Commit: Vladimir Kondratyev <wulf@FreeBSD.org> CommitDate: 2024-04-08 06:47:43 +0000 LinuxKPI: Add want_init_on_free to linux/mm.h want_init_on_free returns if heap memory zeroing on free is enabled. FreeBSD does not zeroes heap memory on free(). Sponsored by: Serenity Cyber Security Reviewed by: emaste MFC after: 1 week --- sys/compat/linuxkpi/common/include/linux/mm.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linuxkpi/common/include/linux/mm.h b/sys/compat/linuxkpi/common/include/linux/mm.h index 0030cc6fb7a9..109bfffe7d6a 100644 --- a/sys/compat/linuxkpi/common/include/linux/mm.h +++ b/sys/compat/linuxkpi/common/include/linux/mm.h @@ -382,4 +382,10 @@ might_alloc(gfp_t gfp_mask __unused) #define is_cow_mapping(flags) (false) +static inline bool +want_init_on_free(void) +{ + return (false); +} + #endif /* _LINUXKPI_LINUX_MM_H_ */