Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit f90de49e authored by Kalesh Singh's avatar Kalesh Singh
Browse files

init: snapuserd: Fix ranges for mlock()

It cannot be assumed that file mappings in /proc/<pid>/maps will be
completely backed by the underlying file. [1]

Use MappedFileSize() to deduce the correct ranges for the mlock()
calls when locking system pages in the OTA path.

While at it also clean up the some unreachable code (mlockall()),
and improve error logging.

[1] SIGBUS at https://man7.org/linux/man-pages/man2/mmap.2.html#RETURN_VALUE



Test: Incremental OTA
Bug: 324952273
Change-Id: Ia2ab150e1b8de8c638f5b1acc1de83deb7ac5cff
Signed-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
parent 8097002e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment