jak se dostat v kernelu k environmentu procesu?

Divacky Roman xdivac02 at stud.fit.vutbr.cz
Tue Apr 27 17:56:11 CEST 2004


On Tue, Apr 27, 2004 at 02:05:45PM +0200, Tomas Pluskal wrote:
> 
> zdravim vespolek,
> 
> mohl by mi nekdo s lepsim prehledem o architekture kernelu poradit, jak se
> dostanu k environmentu nejakeho procesu, pokud mam na nej ukazatel
> struct proc* ? nejak to nemuzu najit.
> 
> diky,
> 
> T.P.

vec se ma asi takto - nevim o zadnem "hezkem" zpusobu jak to zjistit ale
imho by to melo jit takhle

struct proc {
   ....
           struct vmspace  *p_vmspace;     /* (b) Address space. */
   ....
}

struct vmspace {
   ....
           segsz_t vm_ssize;       /* stack size (pages) *
   ....
}

kde na stacku je ulozen (mimojine) ten environment, ale nemam to
overene. pak by se to dalo natahnout pres copyin()
ale uprimne receno - zjistovat environment z kernelu je dost prasarna -
k cemu to potrebujete? imho je cele reseni blbe, kdyz tam musite delat
takoveto veci..

k c



More information about the Users-l mailing list