Scrivere un comando del kernel monitor che permetta di inattivare (indipendentemente dal valore attuale), attivare (indipendentemente dal valore attuale) ed impostare un determinato bit di permesso (la cui scelta dipende da un parametro ricevuto in ingresso) per tutti i mapping attivi nello spazio di indirizzi corrente. --------------------------------------- mon_change_flags(int argc, char **argv, struct Trapframe *tf) { if (argc<3) { cprintf("USAGE: change_flags [VA] [permission] \n"); return -1; } char *sVA = argv[1]; char *sPer = argv[2]; uintptr_t VA = strtol(sVA,NULL,16); int Per = strtol(sPer,NULL,10); //cprintf("Permission:%d\n",Per); pte_t *entry = pgdir_walk(kern_pgdir,(void *)VA,0); if (!entry) { cprintf("Page table entry not exist!\n"); return -1; } *entry =( (*entry) & (~0x7) ) | Per; return 0; }