Skip to contentSkip to conversation

libselinux: Reduce memory needed in libselinux

PATCH In review Yannik Tannhaeuser 1 participant 5 messages Aug 7 – Nov 18 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libselinux: Reduce memory needed in libselinux

libselinux has a dependency to libpcre2, which seems
to require more memory. Use the introduced AGGRESSIVE_FREE_AFTER_REGEX_MATCH preprocessor ifndef to have reduced memory usage in libselinux itself.

The workaround with AGGRESSIVE_FREE_AFTER_REGEX_MATCH was introduced to libselinux with the following commit:
https://github.com/SELinuxProject/selinux/commit/30b3e9d25f417cf62f0d87d2c516c34555b28b32

---
 recipes-security/selinux/libselinux_3.10.bb | 2 ++
 1 file changed, 2 insertions(+)
recipes-security/selinux/libselinux_3.10.bb +2 -0
index 86c9168..24956ae 100644
@@ -28,6 +28,8 @@ def get_policyconfigarch(d):
 EXTRA_OEMAKE = "${@get_policyconfigarch(d)}"
 EXTRA_OEMAKE:append:libc-musl = " FTS_LDLIBS=-lfts"
 
+CFLAGS:append = " -DAGGRESSIVE_FREE_AFTER_REGEX_MATCH"
+
 # LTO fat objects in static library embed original source paths in .gnu.lto_* IR
 # sections which are not affected by -ffile-prefix-map, causing buildpaths QA failure
 LTO = ""
Signature · 1 line
2.43.0
#1 lore raw

Hi all,

please let me know if you want take this patch or have any suggestions for improving it.

Thanks,
Yannik

#2 lore raw

Hi Joe MacDonald,

please let me know if you have any suggestions for improving the commit. Or if you are not interested in taking this commit.

Thanks,
Yannik

A message that is not in the archive (sent off-list or not yet received): [email protected]