some basic doubts / confusion regarding linux kernel / OS

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

 



Hi,

I had some confusion/doubts regarding Linux kernel / OS and I want to be completely sure that my understanding is right for below, and need your inputs (would be really glad for your help):

- There are functions defined in linux kernel. Some of these functions have a line "EXPORT_SYMBOL(<function_name>);"  after them.
   These are the functions which are exported, so they can be directly called from a linux kernel module - right ? (we just need to include header files which define
   them in our kernel module)

- There are some functions defined in linux kernel, which are not static and are not exported, like "migrate_pages" in migrate.c and it is mentioned in
   include/linux/migrate.h file. 
   Is there a way to call these functions, directly from kernel module ?? (even if I include the header file) ??
   If no, What is the technique used there, which prevents the module from calling this function (even though I have included the header file)??

- We have kernel header files defined in include/linux/ and there are user space header files (the C libraries).
    Can a user space program include kernel header file and call a kernel function directly?? No , right ??
    Again, what is there which prevents a user space program from doing so?? How this technique is implemented ??
   
- I understand that, a struct page exists for each physical page in RAM. And this linked list of struct pages are stored together at the beginning of a zone. After this
  storage, does the real data (content) of pages is stored.
  Now each of these pages must be pointing to the data area/page which they define ? Which is this field in the struct page, which points to this data area, a physical
  address + length of the page ?
   
Thanks,
Ajay
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

[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