←back to thread

95 points ingve | 1 comments | | HN request time: 0s | source
Show context
nubinetwork ◴[] No.44567177[source]
I can understand the desire for google to want devs to recompile their apps, but I don't see the need to dump old apps from the app store... who cares if an old app that works wastes 12k if it only needs a single 4k page?
replies(7): >>44567219 #>>44567321 #>>44567891 #>>44567924 #>>44568023 #>>44568923 #>>44571850 #
ryao ◴[] No.44567219[source]
I am not familiar with Android, but Linux ELF binaries that specify 4KB alignment will not work on systems with 16KB page sizes, since the ELF interpreter will refuse to load them. This hit me recently when trying to run a 32-bit binary on a Linux ARM system that had 16KB size pages, since the 32-bit OpenSSL libraries specified 4KB alignment. Presumably, this was done for maximizing entropy available to ASLR, but it breaks the binaries when the page size increases.

In any case, I assume that there is something similar affecting Android.

replies(2): >>44567516 #>>44571146 #
dwattttt ◴[] No.44567516[source]
Page size impacts page permissions; it's not a matter of wasting 12k, it's that with 4kb pages you're allowed to have a consecutive 8kb region with different permissions. 16kb pages can't do that without segfaulting every time memory is used "wrong", and trying to fix that up transparently would be a nightmare.
replies(2): >>44567758 #>>44575845 #
yjftsjthsd-h ◴[] No.44567758{3}[source]
> 16kb pages can't do that without segfaulting every time memory is used "wrong", and trying to fix that up transparently would be a nightmare.

I would natively imagine the kernel could trap that and remap on the fly, at the tiny cost of murdering performance. Is that untrue, or is the perf so bad that it's not worth it?

replies(2): >>44568096 #>>44568968 #
1. plorkyeran ◴[] No.44568096{4}[source]
Anything which involves the kernel tracking permissions at 4k granularity despite using larger pages is just going to be worse in every way than using 4k pages.