Skip to content

Commit

Permalink
Image salvaging continuing
Browse files Browse the repository at this point in the history
Patch 6: MM/
  • Loading branch information
darkstar committed Oct 10, 2019
1 parent 639a7b5 commit fd8281d
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 3 deletions.
Binary file added MM/images/kernel_configuration_menu1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MM/images/kernel_configuration_menu2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added MM/images/memblock.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion MM/linux-mm-1.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ memblock_dbg("memblock_reserve: [%#016llx-%#016llx] flags %#02lx %pF\n",

And you will see something like this:

![Memblock](http://oi57.tinypic.com/1zoj589.jpg)
![Memblock](images/memblock.png)

Memblock also has support in [debugfs](http://en.wikipedia.org/wiki/Debugfs). If you run the kernel on another architecture than `X86` you can access:

Expand Down
4 changes: 2 additions & 2 deletions MM/linux-mm-3.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ Kernel hacking
menu of the Linux kernel configuration:
![kernel configuration menu](http://oi63.tinypic.com/2pzbog7.jpg)
![kernel configuration menu](images/kernel_configuration_menu1.png)
We may not only enable support of the `kmemcheck` mechanism in the Linux kernel, but it also provides some configuration options for us. We will see all of these options in the next paragraph of this part. Last note before we will consider how does the `kmemcheck` check memory. Now this mechanism is implemented only for the [x86_64](https://en.wikipedia.org/wiki/X86-64) architecture. You can be sure if you will look in the [arch/x86/Kconfig](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/arch/x86/Kconfig) `x86` related kernel configuration file, you will see following lines:
Expand Down Expand Up @@ -165,7 +165,7 @@ Let's start from the initialization of this mechanism. We already know that to e

to the Linux kernel command line. The first two are clear, but the last needs a little explanation. This option switches the `kmemcheck` in a special mode when it will be turned off after detecting the first use of uninitialized memory. Actually this mode is enabled by default in the Linux kernel:

![kernel configuration menu](http://oi66.tinypic.com/y2eeh.jpg)
![kernel configuration menu](images/kernel_configuration_menu2.png)

We know from the seventh [part](https://0xax.gitbooks.io/linux-insides/content/Initialization/linux-initialization-7.html) of the chapter which describes initialization of the Linux kernel that the kernel command line is parsed during initialization of the Linux kernel in `do_initcall_level`, `do_early_param` functions. Actually the `kmemcheck` subsystem consists from two stages. The first stage is early. If we will look at the [mm/kmemcheck.c](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/mm/kmemcheck.c) source code file, we will see the `param_kmemcheck` function which is will be called during early command line parsing:

Expand Down

0 comments on commit fd8281d

Please sign in to comment.