Red Hat Bugzilla – Bug 23295
Last modified: 2007-04-18 12:30:30 EDT
Stubs should check that the user is not trying to load application on
top of the piece of RAM reserved for the stubs.
I'm not sure that the generic stub can really do this, certainly not
easily as the load process is just GDB sending some memory write commands.
RedBoot does try to accomplish this though.
I opened this as a Bug mostly because I didn't want to muck anymore with the
stubs code until we know what code to use in the future. The actual fix is
fairly simple, I think; __write_mem_safe() should simply fail if attempts are
made at writing between some magic limits (.text start and .bss end or something
close to that).
Must be careful to allow (interactive) writes to various tables though.
Of course, the goal here would be to prevent users getting stuck and ask
silly questions when they try to download ROM apps, or RAM apps on top of
a RAM RedBoot. Dunno if it happens so often that it's worth protecting for
though (just give 'em the rope)... Nah, I'm closing the bug.