Re: doubt about VMA struct

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

 



On 3/20/07, pradeep singh <2500.pradeep@xxxxxxxxx> wrote:
Hi all,

All questions are related to linux-2.6.20.1.

file linux/mm.h has VMA struct declaration as -

struct vm_area_struct {
   ...

  struct vm_operations_struct *vm_ops;
   ...

}

vma_ops is the pointer to the operations related to this VMA struct
for our process address space(i.e mm_struct) AFAIK.

My question is declaration of the struct vm_operations_struct in the
same file have some interesting members like
   - open
   - close
   - nopage  etc.
since there is an open and a close related to every VMA struct for a
process address space, does this means vm_area_struct for a process's
address space is treated like a file?( in terms with the philosophy of
almost everything is file :) ) .

Does it means accessing a virtual address space for a process is not
allowed if open fails or is not allowed?( suppose i do that
delibarately in my module ).

What if a open succeeds for a vma struct but close fails?

Am i missing something with the concept of "everything is file" ?

Thank you

--psr


--
play the game

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ




since there is an open and a close related to every VMA struct for a
process address space, does this means vm_area_struct for a process's
address space is treated like a file?( in terms with the philosophy of
almost everything is file :) ) .

Open and close are called when a region is created and deleted respectively.
no_page is used during page faults for locating the pages and
allocating it if needed etc.

Does it means accessing a virtual address space for a process is not
allowed if open fails or is not allowed?( suppose i do that
delibarately in my module ).

if open fails then it should mean that the region is not created how
would you access it then?

IMHO 'everything is file' doesn't apply here.
--

Regards,
Sandeep.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at 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