Просмотр исходного кода

theory: fix userspace bits

related issue: #695

Thank you @m4p1e

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Alexander Kuleshov 2 лет назад
Родитель
Сommit
4d6cf71f67
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      Theory/linux-theory-1.md

+ 1 - 1
Theory/linux-theory-1.md

@@ -171,7 +171,7 @@ This solution is `sign extension`. Here we can see that the lower 48 bits of a v
 * Kernel space
 * Userspace
 
-Userspace occupies the lower part of the virtual address space, from `0x000000000000000` to `0x00007fffffffffff` and kernel space occupies the highest part from `0xffff8000000000` to `0xffffffffffffffff`. Note that bits `63:48` is 0 for userspace and 1 for kernel space. All addresses which are in kernel space and in userspace or in other words which higher `63:48` bits are zeroes or ones are called `canonical` addresses. There is a `non-canonical` area between these memory regions. Together these two memory regions (kernel space and user space) are exactly `2^48` bits wide. We can find the virtual memory map with 4 level page tables in the [Documentation/x86/x86_64/mm.txt](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/Documentation/x86/x86_64/mm.txt):
+Userspace occupies the lower part of the virtual address space, from `0x000000000000000` to `0x00007fffffffffff` and kernel space occupies the highest part from `0xffff8000000000` to `0xffffffffffffffff`. Note that bits `63:47` is 0 for userspace and 1 for kernel space. All addresses which are in kernel space and in userspace or in other words which higher `63:48` bits are zeroes or ones are called `canonical` addresses. There is a `non-canonical` area between these memory regions. Together these two memory regions (kernel space and user space) are exactly `2^48` bits wide. We can find the virtual memory map with 4 level page tables in the [Documentation/x86/x86_64/mm.txt](https://github.com/torvalds/linux/blob/16f73eb02d7e1765ccab3d2018e0bd98eb93d973/Documentation/x86/x86_64/mm.txt):
 
 ```
 0000000000000000 - 00007fffffffffff (=47 bits) user space, different per mm