Quote:
That is suprisingly difficult, actually. The player is paged in/out of memory (well, probably never *out* since they likely lock the pages down), but it is probably using a read-only shared mapping, which makes it really, REALLY, hard to do.


Actually, I suppose it's an anonymous mapping, not shared, as the loader needs to perform relocation on the loaded image before running it. The place to have it automatically patch things would be in the loader program (userspace): /lib/ld-linux.so.2

Much more difficult within the kernel, though not impossible (obviously). We'd have to detect that ld-linux is mmapping the player, and the player has not been replaced with a shell script for whatever reason, and then we'd have to prefault the page in question (probably a no-op, but gotta check). Not huge I suppose, but more than I'm up for right now.

Cheers