Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 328275 - sys-kernel/hardened-sources-2.6.34 too much early reserved memory with CONFIG_NO_BOOTMEM=y
Summary: sys-kernel/hardened-sources-2.6.34 too much early reserved memory with CONFIG...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Hardened (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: The Gentoo Linux Hardened Kernel Team (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-14 15:56 UTC by Anthony Basile
Modified: 2010-07-24 11:33 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Diff between early dmesg on system with CONFIG_NO_BOOTMEM=n versus CONFIG_NO_BOOTMEM=y (diff-BOOTMEM_N_vs_Y.txt,6.15 KB, text/plain)
2010-07-14 16:04 UTC, Anthony Basile
Details
amd64 .config file where # CONFIG_NO_BOOTMEM is not set (amd64.config,72.43 KB, text/plain)
2010-07-14 20:35 UTC, Anthony Basile
Details
x86 .config with CONFIG_NO_BOOTMEM=y (x86.config,73.72 KB, text/plain)
2010-07-14 20:43 UTC, Anthony Basile
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Basile gentoo-dev 2010-07-14 15:56:32 UTC
On amd64, when selecting CONFIG_NO_BOOTMEM=y there is too much early reserved memory by the kernel.  On a 12GB i7 system, these leaves only 3GB free once the system is up.
Comment 1 Anthony Basile gentoo-dev 2010-07-14 16:04:50 UTC
Created attachment 238729 [details]
Diff between early dmesg on system with CONFIG_NO_BOOTMEM=n versus CONFIG_NO_BOOTMEM=y
Comment 2 Anthony Basile gentoo-dev 2010-07-14 16:09:08 UTC
On an affected system:

blueness@localhost ~ $ sudo zcat /proc/config.gz | grep BOOTMEM
CONFIG_NO_BOOTMEM=y
blueness@localhost ~ $ free -m
             total       used       free     shared    buffers     cached
Mem:          2989        631       2358          0         27        234
-/+ buffers/cache:        369       2620
Swap:         2055          0       2055



Comment 3 Anthony Basile gentoo-dev 2010-07-14 16:48:52 UTC
On the same system

blueness@localhost ~ $ uname -a
Linux localhost 2.6.34-hardened #1 SMP Wed Jul 14 12:14:26 EDT 2010 x86_64 Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz GenuineIntel GNU/Linux
blueness@localhost ~ $ sudo zcat /proc/config.gz | grep BOOTMEM
# CONFIG_NO_BOOTMEM is not set
blueness@localhost ~ $ free -m
             total       used       free     shared    buffers     cached
Mem:         12035      11960         75          0      11194        160
-/+ buffers/cache:        606      11429
Swap:         2055          0       2055
Comment 4 Anthony Basile gentoo-dev 2010-07-14 18:19:17 UTC
I just tested and this problem also affects x86.  On a xen vm with 6GB of ram, the system kernel panics when CONFIG_NO_BOOTMEM=y.  The panic reports "122 pages non-shared.  Out of memory and no killable processes ..."
Comment 5 Anthony Basile gentoo-dev 2010-07-14 20:35:06 UTC
Created attachment 238761 [details]
amd64 .config file where # CONFIG_NO_BOOTMEM is not set
Comment 6 Anthony Basile gentoo-dev 2010-07-14 20:43:58 UTC
Created attachment 238763 [details]
x86 .config with CONFIG_NO_BOOTMEM=y
Comment 7 Guillaume Castagnino 2010-07-17 07:47:20 UTC
Hi,

I have the same bug, but it seems to be fixed with the last grsec patch (grsecurity-2.2.0-2.6.34.1-201007162107.patch at this time)
I now get my 8GB ram again
Comment 8 Anthony Basile gentoo-dev 2010-07-19 10:08:22 UTC
(In reply to comment #7)
> Hi,
> 
> I have the same bug, but it seems to be fixed with the last grsec patch
> (grsecurity-2.2.0-2.6.34.1-201007162107.patch at this time)
> I now get my 8GB ram again
> 

Yes, I can confirm this.  The fix will be included in the next rev bump of hardened-sources.
Comment 9 Anthony Basile gentoo-dev 2010-07-24 11:33:38 UTC
Fix is in the tree with hardened-sources-2.6.34-r1.