The passing of uid and pid is no different from Unix Domain sockets, except that they pass gid as well where binder doesn't. As I wanted to report on novelty rather than just pick holes in things there seemed little point in mentioning it - but yes, it could certainly be useful.
I wonder about the wisdom of using a shared-memory locks (such as a futex) between process with different uids. Presumably the reason that they have different uids is that they don't trust each other. And as a rogue process can corrupt a futex leaving the other processes unable to work effectively with them, it doesn't seem safe. Between processes in the same security domain (with same uid) it does make sense, but I'm not sure that applies to Android.
As yes - you might be able to create a zero-copy solution with shared mappings (if you trust the other processes) but my understanding from the CMA discussion was that this isn't as easy as it sounds. It means that you need to keep all of they data that you might want to send to some other process in shared memory. Which comes close to having your entire heap in shared memory. There might be reasons to not want to do this. But I'm not speaking from experience, just from what I've read, so this is probably an over-simplification.
Copyright © 2017, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds