FPU avoidance idea
Here's the offending code in glibc:
init (int argc, char **argv, char **envp)
extern int __personality (int);
extern void __getopt_clean_environment (char **);
/* We must not call `personality' twice. */
/* The `personality' system call takes one argument that chooses
the "personality", i.e. the set of system calls and such. We
must make this call first thing to disable emulation of some
other system that might have been enabled by default based on
the executable format. */
/* Set the FPU control word to the proper default value. */
that's what kills us.
How's this for an idea - what if we could cook up a little binary that
will do an LD_PRELOAD of the __setfpucw to something harmless? It
could then be used to insmod the FP emulator, or call any other
command. Is that possible?
Of course, this will need to be staticly linked, and not use the same
If this worked, then we wouldn't have to hack up glibc, bash, or insmod.
I think I'll repost this idea to the list.