Jeff Xu jeffxu@google.com wrote:
On Wed, Oct 18, 2023 at 8:17 AM Matthew Wilcox willy@infradead.org wrote:
Let's start with the purpose. The point of mimmutable/mseal/whatever is to fix the mapping of an address range to its underlying object, be it a particular file mapping or anonymous memory. After the call succeeds, it must not be possible to make any address in that virtual range point into any other object.
The secondary purpose is to lock down permissions on that range. Possibly to fix them where they are, possibly to allow RW->RO transitions.
With those purposes in mind, you should be able to deduce for any syscall or any madvise(), ... whether it should be allowed.
I got it.
IMO: The approaches mimmutable() and mseal() took are different, but we all want to seal the memory from attackers and make the linux application safer.
I think you are building mseal for chrome, and chrome alone.
I do not think this will work out for the rest of the application space because
1) it is too complicated 2) experience with mimmutable() says that applications don't do any of it themselves, it is all in execve(), libc initialization, and ld.so. You don't strike me as an execve, libc, or ld.so developer.