Red Hat Kernel - Re: QUESTION: Program crashes when its dependency .so is replaced. Why ?

This is Interesting: Free IT Magazines  
Home > Archive > Red Hat Kernel > May 2005 > Re: QUESTION: Program crashes when its dependency .so is replaced. Why ?





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: QUESTION: Program crashes when its dependency .so is replaced. Why ?
Scott Lurndal

2005-05-12, 2:59 am

Izo <I@siol.net> writes:
>Kernel 2.4.x, 2.6.x
>


>The behaviour seems slightly confusing for me. Why ? The file system /
>kernel allows the shared object rewrite / replace without complaint and
>it harms the program run-time behaviour while it blocks the program's
>binary replacement while such action (in contrary to shared object
>replacement) does not harm the program's operation.
>
>What is the reason for such behaviour (program crash etc.) anyway ?


When the kernel pages out a code page, it just discards it, since it
can always reload it directly from the object itself (e.g. executable
or shared object). So, while some of the code pages will be
in memory when you overwrite the .so, not all will be. When the next
code page is paged in from the new shared object, the function calls
from the old code pages will call incorrect addresses in the new
code pages and will cause arbitrary random code to be executed which
will quickly cause a system fault.

scott

>
>Izo

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com