Re: memory descriptor of threads

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

 



On Thursday 10 November 2005 11:30, Thomas Petazzoni wrote:
 
> What do you call "memory descriptor" ? The mm_struct
> (http://lxr.linux.no/source/include/linux/sched.h#L207) or the
> vm_area_struct (http://lxr.linux.no/source/include/linux/mm.h#L61) ?
> 

For "memory descriptor" I mean mm_struct but I scan it by means of 
vm_area_structs.

> When you say "set this descriptor as not writable", you mean changing
> vm_area_struct->vm_page_prot ?

No. For each vma of the mm_struct shared by the threads, I scan all pages and 
make them not writable by means of the instruction:
    set_pte(pte, pte_wrprotect(*pte));
where *pte is the related Page Table Entry.

> The local variables are stored on the stack. Simply don't mark the vma
> covering the stack as read-only, or skip your code when a page fault
> occurs in the stack.

Now, if a program contains instructions to explicitly assign a variable as 
TLS, this variable is stored out of the stack?

Thanks.
Vincenzo Mallozzi.

	

	
		
___________________________________ 
Yahoo! Mail: gratis 1GB per i messaggi e allegati da 10MB 
http://mail.yahoo.it


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux