Skip to contentSkip to conversation

samhain: dnmalloc hash fix for aarch64 and mips64

PATCH In review Haseeb Ashraf 2 participants 2 messages Apr 20, 2020 – Jun 19, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 samhain: dnmalloc hash fix for aarch64 and mips64

fix runtime error:
samhain[4069]: FATAL: x_dnmalloc.c: 2790: hashval < AMOUNTHASH Killed

The proper fix is not to disable dnmalloc. This change is in continuation of samhain-mips64-aarch64-dnmalloc-hash-fix.patch which requires CONFIG_ARCH_AARCH64 or CONFIG_ARCH_MIPS64 to be defined for the corresponding architecture

---
 recipes-ids/samhain/samhain.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
recipes-ids/samhain/samhain.inc +3 -1
index 0a5e432..b867bbc 100644
@@ -67,6 +67,9 @@ PACKAGECONFIG[acl] = " --enable-posix-acl , --disable-posix-acl, acl"
 PACKAGECONFIG[audit] = "ac_cv_header_auparse_h=yes,ac_cv_header_auparse_h=no,audit"
 PACKAGECONFIG[ps] = "--with-ps-path=${base_bindir}/ps,,,procps"
 
+EXTRA_OEMAKE_append_aarch64 = " CPPFLAGS+=-DCONFIG_ARCH_AARCH64=1"
+EXTRA_OEMAKE_append_mips64 = " CPPFLAGS+=-DCONFIG_ARCH_MIPS64=1"
+
 do_unpack_samhain() {
     cd ${WORKDIR}
     tar -xzvf samhain-${PV}.tar.gz
@@ -118,7 +121,6 @@ do_configure () {
 	--enable-network=${SAMHAIN_MODE} \
 	--with-pid-file=${localstatedir}/run/samhain.pid \
 	--with-data-file=${localstatedir}/lib/samhain/samhain_file \
-	--disable-dnmalloc \
 	${EXTRA_OECONF}
 }
 
Signature · 1 line
2.17.1
#1 lore raw

merged

Quoted 38 lines · Haseeb Ashraf

fix runtime error:
samhain[4069]: FATAL: x_dnmalloc.c: 2790: hashval < AMOUNTHASH Killed

The proper fix is not to disable dnmalloc. This change is in continuation of samhain-mips64-aarch64-dnmalloc-hash-fix.patch which requires CONFIG_ARCH_AARCH64 or CONFIG_ARCH_MIPS64 to be defined for the corresponding architecture

---
 recipes-ids/samhain/samhain.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
recipes-ids/samhain/samhain.inc +3 -1
index 0a5e432..b867bbc 100644
@@ -67,6 +67,9 @@ PACKAGECONFIG[acl] = " --enable-posix-acl , --disable-posix-acl, acl"
 PACKAGECONFIG[audit] = "ac_cv_header_auparse_h=yes,ac_cv_header_auparse_h=no,audit"
 PACKAGECONFIG[ps] = "--with-ps-path=${base_bindir}/ps,,,procps"
 
+EXTRA_OEMAKE_append_aarch64 = " CPPFLAGS+=-DCONFIG_ARCH_AARCH64=1"
+EXTRA_OEMAKE_append_mips64 = " CPPFLAGS+=-DCONFIG_ARCH_MIPS64=1"
+
 do_unpack_samhain() {
     cd ${WORKDIR}
     tar -xzvf samhain-${PV}.tar.gz
@@ -118,7 +121,6 @@ do_configure () {
 	--enable-network=${SAMHAIN_MODE} \
 	--with-pid-file=${localstatedir}/run/samhain.pid \
 	--with-data-file=${localstatedir}/lib/samhain/samhain_file \
-	--disable-dnmalloc \
 	${EXTRA_OECONF}
 }