Re: Overwriting sys_call_table entries

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




--- En date de : Jeu 26.11.09, Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx> a écrit :

> De: Mulyadi Santosa <mulyadi.santosa@xxxxxxxxx>
> Objet: Re: Overwriting sys_call_table entries
> À: flone_sa@xxxxxxxxxxxxxxxxxxxxx
> Cc: kernelnewbies@xxxxxxxxxxxx
> Date: Jeudi 26 Novembre 2009, 13h51
> On Thu, Nov 26, 2009 at 6:31 AM,
> Fernand LONE SANG <flone_sa@xxxxxxxxx>
> 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 ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux