linuxoperating-systemkernelexploitassemble

Kernel space memory layout


How is kernel space sections? and how do they locate?

For example, user space has some sections (.data, .text, stack ...).

I want to know kernel space's memory layout image.

Please tell me it or related site.


Solution

  • The user space is not laid out like this:

    For example, user space has some sections(.data, .text, stack ...).

    Sections only exist in the executable file. The user space is just memory. There is no "stack" section. The stack is just read/write memory that happens to be used as a stack. A process can have multiple user-mode stacks when there is threading.

    Unfortunately dreadful operating system books persist in confusing people this way.

    The kernel is also just memory. It can be organized however the operating system wants it to be.