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

[Xen-devel] toggles user/supervisor privilege level on page entry



Hi
I want to toggle user/sypervisor priviledge bit in page table entry associated to a given
this page. But I my code does'nt work. I have plenty buggs.
here is the method used to set access to hypervisor level

void remove_access(l1_pgentry_t *pl1e){
l1_pgentry_t ol1e;
l1_pgentry_t nl1e;
unsigned int  nmfn;
if(__copy_from_user(&ol1e, pl1e, sizeof(ol1e)) == 0){
nl1e = ol1e;
nmfn = l1e_get_pfn(ol1e);

if(!(l1e_get_flags(ol1e)&_PAGE_GUEST_KERNEL))
{
l1e_remove_flags(nl1e, _PAGE_USER);
if(__copy_to_guest(pl1e, &nl1e,
sizeof(nl1e)) != 0)
printk("entry cannot be copied\n");
flush_tlb_all();
}
}else
printk("copy from user failed\n");
}

I hope that somebody can help me to resolve the issue.
Thanks

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.