Merge "riscv64: minor ASLR bits changes." into main am: d741c23288 am: 2d5747438c am: a0124bab19 am: 50bed42063

Original change: https://android-review.googlesource.com/c/platform/system/core/+/2755787

Change-Id: Id24c37ed9c755a84215227380c09a1db566185a4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/init/security.cpp b/init/security.cpp
index 6e616be..445286a 100644
--- a/init/security.cpp
+++ b/init/security.cpp
@@ -117,10 +117,10 @@
         return {};
     }
 #elif defined(__riscv)
-    // TODO: sv48 and sv57 were both added to the kernel this year, so we
-    // probably just need some kernel fixes to enable higher ASLR randomization,
-    // but for now 24 is the maximum that the kernel supports.
-    if (SetMmapRndBitsMin(24, 18, false)) {
+    // TODO: sv48 and sv57 have both been added to the kernel, but the kernel
+    // still doesn't support more than 24 bits.
+    // https://github.com/google/android-riscv64/issues/1
+    if (SetMmapRndBitsMin(24, 24, false)) {
         return {};
     }
 #elif defined(__x86_64__)