[OSy] Problem s procesy
Miloslav Beno
beno at mbox.dkm.cz
Fri Dec 28 01:36:47 CET 2007
Pomohlo to. Velmi dekuji vsem, kteri poradili.
-----Original Message-----
From: osy-bounces at dsrg.mff.cuni.cz [mailto:osy-bounces at dsrg.mff.cuni.cz] On Behalf Of David Matousek
Sent: Thursday, December 27, 2007 10:32 PM
To: Operating Systems Course
Subject: Re: [OSy] Problem s procesy
Zdravim,
stranka 68 manualu rika
The processor operates in User mode when the Status register contains the
following bit-values:
• KSU bits = 102
• EXL = 0
• ERL = 0
In conjunction with these bits, the UX bit in the Status register selects
between 32- or 64-bit User mode addressing as follows:
• when UX = 0, 32-bit useg space is selected and TLB misses are
handled by the 32-bit TLB refill exception handler
• when UX = 1, 64-bit xuseg space is selected and TLB misses are
handled by the 64-bit XTLB refill exception handler
Melo by pomoct ...
DM
Miloslav Beno wrote:
> Dobry vecer,
>
> Umistili jsme stack o jednu stranku dale a zacalo to fungovat. Nyni vse bezi, ale bohuzel se vyskytl problem, ze ackoliv nastavujeme status registr takto:
>
> #define USER_THREAD_STATUS \
> ( \
> cp0_status_ux_mask \
> | cp0_status_ie_mask | cp0_status_im_mask \
> | cp0_status_cu0_mask \
> )
>
>
>
> t->kernel_stack_top [OFFSET_STATUS / sizeof (int)] = USER_THREAD_STATUS;
>
> Tak i presto funguji instrukce, ktere by mely fungovat pouze v kernel modu.
>
> Dekujeme
>
> -----Original Message-----
> From: osy-bounces at dsrg.mff.cuni.cz [mailto:osy-bounces at dsrg.mff.cuni.cz] On Behalf Of Martin Decky
> Sent: Thursday, December 27, 2007 6:44 PM
> To: Operating Systems Course
> Subject: Re: [OSy] Problem s procesy
>
>> Vytvarime thread stejnym postupem jako kernel thread, ale vrchol zasobniku
>> je v USEGu a status registr je inicializovany jako user mode. GP registr a
>> RET registr ma hodnotu 0x0.
>> Pri prepnuti na toto vlakno se program pokousi sahnout na adresu 0xffffff74.
>
> A muzete zjistit nejak presneji, co (tedy jake instrukce) sahnou na
> tuhle adresu? Je to hned prvni instrukce noveho vlakna, nebo se to stane
> az casem.
>
> Mohlo by to byt podteceni zasobniku, i kdyz trochu netradicni. Jestli
> jsem dobre pochopil, co pisete, tak nemate zasobniky na konci
> uzivatelskeho adresoveho prostoru, ale pobliz zacatku. Pokud mezi
> zasobnikem a obrazem procesu nemate zadnou ochranou stranku, tak je
> mozne, ze zasobnik podtece pod adresu 0.
>
> Alternativne to samozrejme muze byt jakykoliv zbloudily pristup do
> pameti, napriklad neco, co indexuje o -139 bytu vuci adrese 0 apod.
>
>
> M.D.
>
> _______________________________________________
> OSy mailing list
> OSy at dsrg.mff.cuni.cz
> https://dsrg.mff.cuni.cz/mailman/listinfo/osy
>
>
> _______________________________________________
> OSy mailing list
> OSy at dsrg.mff.cuni.cz
> https://dsrg.mff.
_______________________________________________
OSy mailing list
OSy at dsrg.mff.cuni.cz
https://dsrg.mff.cuni.cz/mailman/listinfo/osy
More information about the NSWI004
mailing list