News for hackers. Stuff that matters.
Re:A Look at iMessage in iOS 14 by Hackbraten on Friday January 29, 2021 @07:27AM (#25956542)
> mapping the shared cache at a different address for every process (which, unless done carefully, would kill the benefits of it being in shared memory as the pages would all be dirtied)

Assume foo.dylib and bar.dylib are system libraries, both live in the shared cache, and foo links to bar. Both are loaded and mapped to a running user-space process.

If foo links to bar, then there must be a symbol table somewhere in physical memory with an entry that points to bar’s TEXT.

That symbol table is part of the shared cache, right? Doesn’t it already follow that bar’s TEXT needs to be at the same virtual address in every process?

Re:A Look at iMessage in iOS 14 by saagarjha on Friday January 29, 2021 @07:37AM (#25956609)
> That symbol table is part of the shared cache, right? Doesn’t it already follow that bar’s TEXT needs to be at the same virtual address in every process?

Yes, and this is how the shared cache works. If you wish to map the shared cache elsewhere there would have to be another copy of it in memory, which is why this would be a massive pessimization if done without designing for it. Perhaps you might have some idea as to what would need to change to make this not be as bad.

Re:A Look at iMessage in iOS 14 by Hackbraten on Friday January 29, 2021 @06:58PM (#25964498)
Got it, thanks!