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

Re: [MiNT] Probably bad implementation in Pexec()





Olivier Landemarre skrev:
Hello

I'm currently looking source code in Mint Pexec (k_exec.c), and for me there is a trouble in source code

in

exec_region() there is cpushi((void *) b->p_tbase, b->p_tlen);

That is a good idea except it could be wrong or not enough in some cases.
The case is AES (XaAES, MyAES, OAESIS and probably NAES) with the load of accessory (I think this is a bad implementation of load of accessory), they change b->p_tbase to put there own init code so when exec_region is used the cpushi is not on the code of accessory but only at is end (XaAES case) or anywhere. The cpushi() should probably done after load_region() and by security I think it should stay in exec_region() too. But probably the best should not have specific code for accessory, there is only mother basepage to fill NULL when exec() an accessory.


I'm wrong?

 Well.. yes :) The kernel should not contain specific code to make
braindead AES implementations work. So in this respect, you are wrong,
there is nothing wrong with current Pexec(). The way the AES wants to
modify stuff is its own responsibility, and therefore must take care of
such things for itself. XaAES has code for this. And it does NOT belong
in the kernel.


 Best Regards,
Odd Skancke