--- En date de : Jeu 26.11.09, Mulyadi Santosa <mulyadi.sant...@gmail.com> a 
écrit :

> De: Mulyadi Santosa <mulyadi.sant...@gmail.com>
> Objet: Re: Overwriting sys_call_table entries
> À: flone...@etud.insa-toulouse.fr
> Cc: kernelnewbies@nl.linux.org
> Date: Jeudi 26 Novembre 2009, 13h51
> On Thu, Nov 26, 2009 at 6:31 AM,
> Fernand LONE SANG <flone...@yahoo.com>
> wrote:
> > As a consequence, I override the permissions to access
> to the sys_call_table entries and made them writable using a
> lkm. After setting the needed permissions on the page, when
> I overwrite an entry of the sys_call_table, my system hangs
> (No kernel oops, my system simply freezes).
> 
> AFAIK there is no lock that protect modification toward
> sys_call_table. As the consequence, you might overwrite the
> system
> call entry while it was currently referenced.
> 
> Actually, IMO, even on 2.4, loosely replacing certain or
> all
> sys_call_table entries are highly discouraged. The reason
> is
> similar...you don't know whether they are currently
> referenced or not,
> right?

I finally found why my lkm froze when i try to change the sys_call_table 
entries. Actually, i forgot to change the page directory attributes. 

You're right when saying That changing a syscall is discouraged. But for what i 
do on my PC, concurrent access is not really a problem.  
 
> Well, maybe you might get better chance if you do it via
> atomic
> assembly instruction (i.e the one that can swap values
> stored between
> two memory region), but still, I am not whether it's the
> answer to
> your problem.
> 
> --
> regards,
> 
> Mulyadi Santosa
> Freelance Linux trainer and consultant
> 
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com
> 




--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecar...@nl.linux.org
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to