shared: init: enable memfd

See https://android-review.googlesource.com/c/device/linaro/dragonboard/+/2114881

Change-Id: I001a679e9fb6df61878c232e1078410b458fab2f
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/shared/init.sdm845.rc b/shared/init.sdm845.rc
index b49fe94..3ce992c 100644
--- a/shared/init.sdm845.rc
+++ b/shared/init.sdm845.rc
@@ -36,6 +36,11 @@
     mkdir /data/vendor/wifi/wpa 0770 wifi wifi
     mkdir /data/vendor/wifi/wpa/sockets 0770 wifi wifi
 
+on post-fs-data
+    # set sys.memfd_use to true now that the ashmem is dropped v5.18
+    # https://lore.kernel.org/all/20220315123457.2354812-1-hch@lst.de/.
+    setprop sys.use_memfd true
+
 on property:sys.boot_completed=1
     chmod 0755 /sys/kernel/debug/tracing