diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2024-02-14 10:11:32 -0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2024-02-14 10:11:32 -0800 |
commit | d9a76c23430a511c7da35c2785277146a1753e14 (patch) | |
tree | 7cae4514dfcee875d7240cbd25a49d362830b29e /libs/binder/MemoryHeapBase.cpp | |
parent | be88ab83e4197c6ffca932ecae7d4718a5779dd9 (diff) | |
parent | eaaaee8d1079eeb0326f8badb959916fac4586b0 (diff) |
Merge eaaaee8d1079eeb0326f8badb959916fac4586b0 on remote branch
Change-Id: I09967f06daa17144b9b4cd663818b71cec77c82e
Diffstat (limited to 'libs/binder/MemoryHeapBase.cpp')
-rw-r--r-- | libs/binder/MemoryHeapBase.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/MemoryHeapBase.cpp b/libs/binder/MemoryHeapBase.cpp index 8fe1d2bb3d..34e747ef21 100644 --- a/libs/binder/MemoryHeapBase.cpp +++ b/libs/binder/MemoryHeapBase.cpp @@ -73,8 +73,8 @@ MemoryHeapBase::MemoryHeapBase(size_t size, uint32_t flags, char const * name) ALOGV("MemoryHeapBase: Attempting to force MemFD"); fd = memfd_create_region(name ? name : "MemoryHeapBase", size); if (fd < 0 || (mapfd(fd, true, size) != NO_ERROR)) return; - const int SEAL_FLAGS = ((mFlags & READ_ONLY) ? F_SEAL_FUTURE_WRITE : 0) | - ((mFlags & MEMFD_ALLOW_SEALING_FLAG) ? 0 : F_SEAL_SEAL); + const int SEAL_FLAGS = ((mFlags & READ_ONLY) ? F_SEAL_FUTURE_WRITE : 0) | F_SEAL_GROW | + F_SEAL_SHRINK | ((mFlags & MEMFD_ALLOW_SEALING_FLAG) ? 0 : F_SEAL_SEAL); if (SEAL_FLAGS && (fcntl(fd, F_ADD_SEALS, SEAL_FLAGS) == -1)) { ALOGE("MemoryHeapBase: MemFD %s sealing with flags %x failed with error %s", name, SEAL_FLAGS, strerror(errno)); |