lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHcr5QqDCjWZz9ADvsE-3tt8qu4K+1NCn-gJuSsm2KBjUcaYVg@mail.gmail.com>
Date:   Wed, 11 Sep 2019 19:46:46 +0300
From:   yoav rubin <yoavrubin18@...il.com>
To:     linux-kernel@...r.kernel.org
Subject: linux 32bit kernel virtual space , lowmem , highmem , RAM size

Apologize in advance if I'm sending this to the wrong place. (It's my
first time using mailing list...)


I need some help understanding the exact relations between the linux
kernel virtual space , specifically LOWMEM area , and the available
RAM size as seen by the kernel.

after reading this article: https://lwn.net/Articles/75174/ and some
other users threads' i have come to the following connections:

As we all know , the 32bit virtual address space (4GB) is divided into
user space address and kernel space address usually by ratio of
3GB/1GB or 2GB/2GB.

Inside the kernel space address we can find the kernel image itself ,
vmalloc area and some other staff.. the one that interesting me is the
LOWMEM area.

3.LOWMEM is an area of kernel's virtual addresses which mapped
directly into physical RAM for efficiency without using "mid level"
translations.

For this question I'm ignoring the HIGHMEM area since its not exists
in my system (turned it off by menuconfig).

The system have 1.5GB RAM. When the virtual address space got split
between the user and the kernel by ratio of 3/1 , the kernel
recognized only 768MB (or something close to that) of TotalMem.

Allegedly the explanation for that is the kernel had 1 GB of virtual
address space , from that we need to subtract the kernel image itself,
vmalloc area and some other components and than we left with 768 MB of
LOWMEM which apparently for some reason is also the amount of total
memory that I have in my system.

when I changed the ratio to 2GB/2GB , the LOWMEM area increased and
then I saw a TotalMem of 1.5GB (again , almost 1.5GB for the same
reasons)

so the mid conclusion is that the size of kernel's LOWMEM area is the
size of the TotalMem I have in the system.

I know that I'm missing something here because there is no way its true.

Why do I need to increase the LOWMEM area to get more visible RAM
size? the data structures for managing the memory are not that big..

How this affects the applications in user space? why increasing the
LOWMEM area have any impact at all on the other 3GB/2GB of user space
addresses?

thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ