ipc: Add an option to require file seals when mapping shm.

In preparation for producer-provided SMBs, this patch makes
PosixSharedMemory::AttachToFd optionally ignore FDs that aren't sealed.

This only takes effect on systems where file seals (memfd) are
supported. Iff require_seals is set, and a non-sealed or non-memfd FD
is provided on a system that supports sealed memfds, the mapping is
aborted.

Bug: 147742905
Change-Id: I80cb2ed90804a43f27e3c8e715ca22f1c73d5acf
diff --git a/Android.bp b/Android.bp
index c83a8cb..a6c268c 100644
--- a/Android.bp
+++ b/Android.bp
@@ -6607,6 +6607,7 @@
   name: "perfetto_src_tracing_ipc_common",
   srcs: [
     "src/tracing/ipc/default_socket.cc",
+    "src/tracing/ipc/memfd.cc",
     "src/tracing/ipc/posix_shared_memory.cc",
   ],
 }