Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi N - Z > Sistemi operativi I > Domanda JOS - indirizzo KSTACKTOP
  Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
Elisabeth
dsy core staff

User info:
Registered: Jul 2014
Posts: 22 (0.01 al dì)
Location: Lake of Como
Corso: Informatica
Anno: III anno
Time Online: 6:57:11 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
Domanda JOS - indirizzo KSTACKTOP

Premetto che sto guardando le slide del Bruschi dell'anno 2013/2014 ed anche i sorgenti di JOS dell'anno 2014...nelle prime trovo che l'indirizzo di inizio dello stack del kernel è a partire dall'indirizzo KERNBASE - PTSIZE, nei sorgenti lo stack parte da KERNBASE...qualcuno mi illumina? :/
Da dove parte questo benedetto stack?

08-02-2015 14:36
Click Here to See the Profile for Elisabeth Click here to Send Elisabeth a Private Message Find more posts by Elisabeth Add Elisabeth to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
IforgotPSW
.simpatizzante.

User info:
Registered: Jan 2013
Posts: 19 (0.00 al dì)
Location:
Corso: informatica triennale
Anno:
Time Online: 5:42:24 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

uhm strano.. io sto studiando sulle slide, e lì è abbastanza chiaro nel definire KSTACKTOP = KERNBASE - PTSIZE .. con lo stack che cresce verso il basso quindi da
KSTACKTOP verso KSTACKTOP - PTSIZE ... c'è anche una figura che mostra l'area di memoria compresa tra KSTACKTOP e KERNBASE come invalid memory ..

edit: mi riferisco alle pagine 80 e 64

08-02-2015 15:21
Click Here to See the Profile for IforgotPSW Click here to Send IforgotPSW a Private Message Find more posts by IforgotPSW Add IforgotPSW to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Elisabeth
dsy core staff

User info:
Registered: Jul 2014
Posts: 22 (0.01 al dì)
Location: Lake of Como
Corso: Informatica
Anno: III anno
Time Online: 6:57:11 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Sì, sì e su questo siamo d'accordo però se vado ad esempio a questo sorgente:

https://github.com/eshyong/MIT-JOS/...inc/memlayout.h

vedi che il layout è diverso?
Dovrebbe essere codice aggiornato del MIT... :/
Non so a quale riferirmi! :(

08-02-2015 15:30
Click Here to See the Profile for Elisabeth Click here to Send Elisabeth a Private Message Find more posts by Elisabeth Add Elisabeth to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Cronovirus
dsy core staff

User info:
Registered: Jun 2012
Posts: 471 (0.11 al dì)
Location:
Corso: Magistrale in Informatica
Anno: 2
Time Online: 4 Days, 2:45:03: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ciao a tutti,
Come sapete lo stack quando alloca memoria va verso indirizzi "più bassi", mentre quando ci scrivete l'ordine è inverso. Tanto per intenderci se avete un buffer tra l'indirizzo 1000 e 900, quando ci scrivete si parte da 900 andando verso l'alto, quindi verso 1000. JOS negli indirizzi sopra KERNBASE come sapete ci mette il kernel. Cosa succederebbe se usiamo routine di scrittura non sicure quali "gets"? Buffer overflow e bye bye kernel. Per questo jos mette il top dello stack a KERNBASE-PTSIZE, dove tra KERNBASE-PTSIZE e KERNBASE c'è una pagina segnata come "non valida", quindi quando si prova ad accedervi.. TRAP!!
E' una protezione del kernel.

Venendo alla tua domanda.. mi sa proprio che al mit hanno cambiato layout (anche se il file è aggiornato al lab 2.. mi sembra assurdo che nei lab successivi lo cambiano ma.. boh). Quello che ti posso assicurare è che nell'ultima edizione del corso c'è
KERNSTACKTOP = KERNBASE-PTSIZE

ciao :)

08-02-2015 16:19
Click Here to See the Profile for Cronovirus Click here to Send Cronovirus a Private Message Find more posts by Cronovirus Add Cronovirus to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 07:30.    Post New Thread    Post A Reply
  Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.039 seconds (60.49% PHP - 39.51% MySQL) con 28 query.