1From 1281ffc7959bd2070563e17a52ee4424196d885c Mon Sep 17 00:00:00 2001 2From: Patrick Havelange <patrick.havelange@essensium.com> 3Date: Wed, 23 Jan 2019 12:21:21 +0100 4Subject: [PATCH] Introduce the OPENSSL_NO_MADVISE to disable call to madvise() 5 6Upstream: https://github.com/openssl/openssl/pull/8089 7Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com> 8--- 9 crypto/mem_sec.c | 2 +- 10 1 file changed, 1 insertion(+), 1 deletion(-) 11 12diff --git a/crypto/mem_sec.c b/crypto/mem_sec.c 13index 9e0f670..32c7282 100644 14--- a/crypto/mem_sec.c 15+++ b/crypto/mem_sec.c 16@@ -485,7 +485,7 @@ static int sh_init(size_t size, int minsize) 17 if (mlock(sh.arena, sh.arena_size) < 0) 18 ret = 2; 19 #endif 20-#ifdef MADV_DONTDUMP 21+#if defined(MADV_DONTDUMP) && !defined(OPENSSL_NO_MADVISE) 22 if (madvise(sh.arena, sh.arena_size, MADV_DONTDUMP) < 0) 23 ret = 2; 24 #endif 25-- 262.17.1 27 28