What's inside the kernel part of virtual memory of 64 bit linux processes? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) 2019 Community Moderator Election Results Why I closed the “Why is Kali so hard” questionWhat's the use of having a kernel part in the virtual memory space of Linux processes?Misleading explanation of Virtual Memory in TLDPHow does the CPU knows which physical address is mapped to which virtual address?How is Physical Memoy mapped in Kernal space?Linux Kernel memory management quoteDo the virtual address spaces of all the processes have the same content in their “Kernel” parts?Does Linux not use segmentation but only paging?What's the use of having a kernel part in the virtual memory space of Linux processes?What exactly happens in virtual memory when I call a function like printf in Linux?Is there a standard for the Linux user-space memory map?Can a user mode program access the kernel memory and the memory of other processes?

How widely used is the term Treppenwitz? Is it something that most Germans know?

What does an IRS interview request entail when called in to verify expenses for a sole proprietor small business?

What LEGO pieces have "real-world" functionality?

Check which numbers satisfy the condition [A*B*C = A! + B! + C!]

Coloring maths inside a tcolorbox

Do I really need recursive chmod to restrict access to a folder?

Why aren't air breathing engines used as small first stages

Why is "Consequences inflicted." not a sentence?

Why do people hide their license plates in the EU?

Fundamental Solution of the Pell Equation

Resolving to minmaj7

Selecting the same column from Different rows Based on Different Criteria

ListPlot join points by nearest neighbor rather than order

Why am I getting the error "non-boolean type specified in a context where a condition is expected" for this request?

Why did the IBM 650 use bi-quinary?

Seeking colloquialism for “just because”

Why do we bend a book to keep it straight?

String `!23` is replaced with `docker` in command line

What to do with chalk when deepwater soloing?

Align equal signs while including text over equalities

Is it true that "carbohydrates are of no use for the basal metabolic need"?

How to deal with a team lead who never gives me credit?

How does the particle を relate to the verb 行く in the structure「A を + B に行く」?

How to align text above triangle figure



What's inside the kernel part of virtual memory of 64 bit linux processes?



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
2019 Community Moderator Election Results
Why I closed the “Why is Kali so hard” questionWhat's the use of having a kernel part in the virtual memory space of Linux processes?Misleading explanation of Virtual Memory in TLDPHow does the CPU knows which physical address is mapped to which virtual address?How is Physical Memoy mapped in Kernal space?Linux Kernel memory management quoteDo the virtual address spaces of all the processes have the same content in their “Kernel” parts?Does Linux not use segmentation but only paging?What's the use of having a kernel part in the virtual memory space of Linux processes?What exactly happens in virtual memory when I call a function like printf in Linux?Is there a standard for the Linux user-space memory map?Can a user mode program access the kernel memory and the memory of other processes?



.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















So i came upon this question :



What's the use of having a kernel part in the virtual memory space of Linux processes?



and based on the answer and the comments on the answer :




the kernel memory map includes a direct mapping of all physical memory, so everything in memory appears there; it also includes separate mappings for the kernel, modules etc., so the physical addresses containing the kernel appear in at least two different mappings




so is this true? i couldn't find any source or reference for this, and why would it include a map of the entire physical memory and then again have a separate mapping of kernel modules? isn't that redundant?



so can someone explain in a simple manner what is inside the kernel part of virtual memory of processes in 64 bit Linux? and please provide a source for the answer! because i couldn't find anything related to this in any book or paper.



thanks!










share|improve this question









New contributor




OneAndOnly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.


























    1















    So i came upon this question :



    What's the use of having a kernel part in the virtual memory space of Linux processes?



    and based on the answer and the comments on the answer :




    the kernel memory map includes a direct mapping of all physical memory, so everything in memory appears there; it also includes separate mappings for the kernel, modules etc., so the physical addresses containing the kernel appear in at least two different mappings




    so is this true? i couldn't find any source or reference for this, and why would it include a map of the entire physical memory and then again have a separate mapping of kernel modules? isn't that redundant?



    so can someone explain in a simple manner what is inside the kernel part of virtual memory of processes in 64 bit Linux? and please provide a source for the answer! because i couldn't find anything related to this in any book or paper.



    thanks!










    share|improve this question









    New contributor




    OneAndOnly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






















      1












      1








      1








      So i came upon this question :



      What's the use of having a kernel part in the virtual memory space of Linux processes?



      and based on the answer and the comments on the answer :




      the kernel memory map includes a direct mapping of all physical memory, so everything in memory appears there; it also includes separate mappings for the kernel, modules etc., so the physical addresses containing the kernel appear in at least two different mappings




      so is this true? i couldn't find any source or reference for this, and why would it include a map of the entire physical memory and then again have a separate mapping of kernel modules? isn't that redundant?



      so can someone explain in a simple manner what is inside the kernel part of virtual memory of processes in 64 bit Linux? and please provide a source for the answer! because i couldn't find anything related to this in any book or paper.



      thanks!










      share|improve this question









      New contributor




      OneAndOnly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      So i came upon this question :



      What's the use of having a kernel part in the virtual memory space of Linux processes?



      and based on the answer and the comments on the answer :




      the kernel memory map includes a direct mapping of all physical memory, so everything in memory appears there; it also includes separate mappings for the kernel, modules etc., so the physical addresses containing the kernel appear in at least two different mappings




      so is this true? i couldn't find any source or reference for this, and why would it include a map of the entire physical memory and then again have a separate mapping of kernel modules? isn't that redundant?



      so can someone explain in a simple manner what is inside the kernel part of virtual memory of processes in 64 bit Linux? and please provide a source for the answer! because i couldn't find anything related to this in any book or paper.



      thanks!







      kernel process virtual-memory 64bit elf






      share|improve this question









      New contributor




      OneAndOnly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question









      New contributor




      OneAndOnly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question








      edited 5 hours ago







      OneAndOnly













      New contributor




      OneAndOnly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 5 hours ago









      OneAndOnlyOneAndOnly

      62




      62




      New contributor




      OneAndOnly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      OneAndOnly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      OneAndOnly is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          2 Answers
          2






          active

          oldest

          votes


















          4














          The kernel’s memory map on x86-64 is documented in the kernel itself. The kernel maps



          • user-space (for the current process)

          • PTI data structures

          • all the physical memory

          • the kernel’s data structures, in various blocks, with holes for ASLR

          • the kernel itself

          • its modules

          Having a full mapping of physical memory is convenient, but its relevance is debated compared to the security risks it creates, and its address-space burden (since physical memory is effectively limited to half the address space as a result; this prompted the recent expansion to five-level page tables with 56-bit addresses).






          share|improve this answer






























            0














            “64bit memory space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to 64bit memory space.”



            It is good to keep thinks simple.



            Therefore it was decided to allocated half for direct mapping the hardware, just one-to-one mapping of hardware addresses. And half for virtual mapping. It will be cheaper to have something in there twice, than not. Imagine having conditional code to exclude stuff from the direct mapping if it is in the other. And imagine how complex things will become, now not everything is in the direct mapping, so we seed a lot more conditional code, to find what we want. Is is just simpler to map it twice. (this may be over simplified, and some detail may be wrong, but the general idea is correct.)






            share|improve this answer























              Your Answer








              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "106"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: false,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );






              OneAndOnly is a new contributor. Be nice, and check out our Code of Conduct.









              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f512849%2fwhats-inside-the-kernel-part-of-virtual-memory-of-64-bit-linux-processes%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              4














              The kernel’s memory map on x86-64 is documented in the kernel itself. The kernel maps



              • user-space (for the current process)

              • PTI data structures

              • all the physical memory

              • the kernel’s data structures, in various blocks, with holes for ASLR

              • the kernel itself

              • its modules

              Having a full mapping of physical memory is convenient, but its relevance is debated compared to the security risks it creates, and its address-space burden (since physical memory is effectively limited to half the address space as a result; this prompted the recent expansion to five-level page tables with 56-bit addresses).






              share|improve this answer



























                4














                The kernel’s memory map on x86-64 is documented in the kernel itself. The kernel maps



                • user-space (for the current process)

                • PTI data structures

                • all the physical memory

                • the kernel’s data structures, in various blocks, with holes for ASLR

                • the kernel itself

                • its modules

                Having a full mapping of physical memory is convenient, but its relevance is debated compared to the security risks it creates, and its address-space burden (since physical memory is effectively limited to half the address space as a result; this prompted the recent expansion to five-level page tables with 56-bit addresses).






                share|improve this answer

























                  4












                  4








                  4







                  The kernel’s memory map on x86-64 is documented in the kernel itself. The kernel maps



                  • user-space (for the current process)

                  • PTI data structures

                  • all the physical memory

                  • the kernel’s data structures, in various blocks, with holes for ASLR

                  • the kernel itself

                  • its modules

                  Having a full mapping of physical memory is convenient, but its relevance is debated compared to the security risks it creates, and its address-space burden (since physical memory is effectively limited to half the address space as a result; this prompted the recent expansion to five-level page tables with 56-bit addresses).






                  share|improve this answer













                  The kernel’s memory map on x86-64 is documented in the kernel itself. The kernel maps



                  • user-space (for the current process)

                  • PTI data structures

                  • all the physical memory

                  • the kernel’s data structures, in various blocks, with holes for ASLR

                  • the kernel itself

                  • its modules

                  Having a full mapping of physical memory is convenient, but its relevance is debated compared to the security risks it creates, and its address-space burden (since physical memory is effectively limited to half the address space as a result; this prompted the recent expansion to five-level page tables with 56-bit addresses).







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 4 hours ago









                  Stephen KittStephen Kitt

                  182k25415495




                  182k25415495























                      0














                      “64bit memory space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to 64bit memory space.”



                      It is good to keep thinks simple.



                      Therefore it was decided to allocated half for direct mapping the hardware, just one-to-one mapping of hardware addresses. And half for virtual mapping. It will be cheaper to have something in there twice, than not. Imagine having conditional code to exclude stuff from the direct mapping if it is in the other. And imagine how complex things will become, now not everything is in the direct mapping, so we seed a lot more conditional code, to find what we want. Is is just simpler to map it twice. (this may be over simplified, and some detail may be wrong, but the general idea is correct.)






                      share|improve this answer



























                        0














                        “64bit memory space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to 64bit memory space.”



                        It is good to keep thinks simple.



                        Therefore it was decided to allocated half for direct mapping the hardware, just one-to-one mapping of hardware addresses. And half for virtual mapping. It will be cheaper to have something in there twice, than not. Imagine having conditional code to exclude stuff from the direct mapping if it is in the other. And imagine how complex things will become, now not everything is in the direct mapping, so we seed a lot more conditional code, to find what we want. Is is just simpler to map it twice. (this may be over simplified, and some detail may be wrong, but the general idea is correct.)






                        share|improve this answer

























                          0












                          0








                          0







                          “64bit memory space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to 64bit memory space.”



                          It is good to keep thinks simple.



                          Therefore it was decided to allocated half for direct mapping the hardware, just one-to-one mapping of hardware addresses. And half for virtual mapping. It will be cheaper to have something in there twice, than not. Imagine having conditional code to exclude stuff from the direct mapping if it is in the other. And imagine how complex things will become, now not everything is in the direct mapping, so we seed a lot more conditional code, to find what we want. Is is just simpler to map it twice. (this may be over simplified, and some detail may be wrong, but the general idea is correct.)






                          share|improve this answer













                          “64bit memory space is big. You just won't believe how vastly, hugely, mind-bogglingly big it is. I mean, you may think it's a long way down the road to the chemist's, but that's just peanuts to 64bit memory space.”



                          It is good to keep thinks simple.



                          Therefore it was decided to allocated half for direct mapping the hardware, just one-to-one mapping of hardware addresses. And half for virtual mapping. It will be cheaper to have something in there twice, than not. Imagine having conditional code to exclude stuff from the direct mapping if it is in the other. And imagine how complex things will become, now not everything is in the direct mapping, so we seed a lot more conditional code, to find what we want. Is is just simpler to map it twice. (this may be over simplified, and some detail may be wrong, but the general idea is correct.)







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 4 hours ago









                          ctrl-alt-delorctrl-alt-delor

                          12.5k52662




                          12.5k52662




















                              OneAndOnly is a new contributor. Be nice, and check out our Code of Conduct.









                              draft saved

                              draft discarded


















                              OneAndOnly is a new contributor. Be nice, and check out our Code of Conduct.












                              OneAndOnly is a new contributor. Be nice, and check out our Code of Conduct.











                              OneAndOnly is a new contributor. Be nice, and check out our Code of Conduct.














                              Thanks for contributing an answer to Unix & Linux Stack Exchange!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f512849%2fwhats-inside-the-kernel-part-of-virtual-memory-of-64-bit-linux-processes%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Oświęcim Innehåll Historia | Källor | Externa länkar | Navigeringsmeny50°2′18″N 19°13′17″Ö / 50.03833°N 19.22139°Ö / 50.03833; 19.2213950°2′18″N 19°13′17″Ö / 50.03833°N 19.22139°Ö / 50.03833; 19.221393089658Nordisk familjebok, AuschwitzInsidan tro och existensJewish Community i OświęcimAuschwitz Jewish Center: MuseumAuschwitz Jewish Center

                              Valle di Casies Indice Geografia fisica | Origini del nome | Storia | Società | Amministrazione | Sport | Note | Bibliografia | Voci correlate | Altri progetti | Collegamenti esterni | Menu di navigazione46°46′N 12°11′E / 46.766667°N 12.183333°E46.766667; 12.183333 (Valle di Casies)46°46′N 12°11′E / 46.766667°N 12.183333°E46.766667; 12.183333 (Valle di Casies)Sito istituzionaleAstat Censimento della popolazione 2011 - Determinazione della consistenza dei tre gruppi linguistici della Provincia Autonoma di Bolzano-Alto Adige - giugno 2012Numeri e fattiValle di CasiesDato IstatTabella dei gradi/giorno dei Comuni italiani raggruppati per Regione e Provincia26 agosto 1993, n. 412Heraldry of the World: GsiesStatistiche I.StatValCasies.comWikimedia CommonsWikimedia CommonsValle di CasiesSito ufficialeValle di CasiesMM14870458910042978-6

                              Typsetting diagram chases (with TikZ?) Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)How to define the default vertical distance between nodes?Draw edge on arcNumerical conditional within tikz keys?TikZ: Drawing an arc from an intersection to an intersectionDrawing rectilinear curves in Tikz, aka an Etch-a-Sketch drawingLine up nested tikz enviroments or how to get rid of themHow to place nodes in an absolute coordinate system in tikzCommutative diagram with curve connecting between nodesTikz with standalone: pinning tikz coordinates to page cmDrawing a Decision Diagram with Tikz and layout manager