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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 28 Apr 2008 10:38:11 +0200
From:	Mika Fischer <mika.fischer@...pnet.de>
To:	Yinghai Lu <yhlu.kernel@...il.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	Ingo Molnar <mingo@...e.hu>, Andi Kleen <ak@...e.de>,
	"H. Peter Anvin" <hpa@...or.com>,
	LKML <linux-kernel@...r.kernel.org>,
	Jesse Barnes <jesse.barnes@...el.com>, balajirrao@...il.com
Subject: Re: [PATCH] x86_32: trim memory by updating e820 v3

Hi Yinghai,

Yinghai Lu schrieb:
>>  reg00: base=0xc0000000 (3072MB), size=1024MB: uncachable, count=1
>>  reg01: base=0x00000000 ( 0MB), size=4096MB: write-back, count=1
>>  reg02: base=0x100000000 (4096MB), size=1024MB: write-back, count=1
>>  reg03: base=0xbf700000 (3063MB), size= 1MB: uncachable, count=1
>>  reg04: base=0xbf800000 (3064MB), size= 8MB: uncachable, count=1
>>
>>  which screws up the X server's attempt to map the video memory at
>>  0xd0000000.
> 
> please try the patch at
> 
> http://lkml.org/lkml/2008/4/28/52
> 
> with mtrr_chunk_size=1g, and you should get
> 
> you should get
>>  reg00: base=0x00000000 ( 0MB), size=2048MB: write-back, count=1
>>  reg01: base=0x80000000 (2048MB), size=1024MB: write-back, count=1
>>  reg02: base=0xbf700000 (3063MB), size= 1MB: uncachable, count=1
>>  reg03: base=0xbf800000 (3064MB), size= 8MB: uncachable, count=1
>>  reg04: base=0x100000000 (4096MB), size=1024MB: write-back, count=1

Wow, thanks a lot for this patch! It almost works. This is what I get
with mtrr_chunk_size=1g:
reg00: base=0x00000000 (   0MB), size=2048MB: write-back, count=1
reg01: base=0x80000000 (2048MB), size=1024MB: write-back, count=1
reg02: base=0xbf700000 (3063MB), size=   1MB: uncachable, count=1
reg03: base=0xbf800000 (3064MB), size=   8MB: uncachable, count=1
reg04: base=0x100001000 (4096MB), size=   4KB: write-back, count=1
reg05: base=0x100002000 (4096MB), size=   8KB: write-back, count=1
reg06: base=0x100004000 (4096MB), size=  16KB: write-back, count=1
reg07: base=0x100008000 (4096MB), size=  32KB: write-back, count=1

And this is what I get without mtrr_chunk_size=1g:
reg00: base=0x00000000 (   0MB), size=2048MB: write-back, count=1
reg01: base=0x80000000 (2048MB), size= 512MB: write-back, count=1
reg02: base=0xa0000000 (2560MB), size= 256MB: write-back, count=1
reg03: base=0xb0000000 (2816MB), size= 256MB: write-back, count=1
reg04: base=0xbf700000 (3063MB), size=   1MB: uncachable, count=1
reg05: base=0xbf800000 (3064MB), size=   8MB: uncachable, count=1
reg06: base=0x100001000 (4096MB), size=   4KB: write-back, count=1
reg07: base=0x100002000 (4096MB), size=   8KB: write-back, count=1

I attached these outputs and the dmesgs to the bug report:
http://bugzilla.kernel.org/show_bug.cgi?id=10508

dmesg with mtrr_chunk_size=1g:
http://bugzilla.kernel.org/attachment.cgi?id=15945

dmesg without mtrr_chunk_size=1g:
http://bugzilla.kernel.org/attachment.cgi?id=15946

There are some warnings in the output:
[    0.000000] WARNING: BIOS bug: CPU MTRRs don't cover all of memory,
losing 1023MB of RAM.
[    0.000000] ------------[ cut here ]------------
[    0.000000] WARNING: at
/home/mika/src/linux-2.6/arch/x86/kernel/cpu/mtrr/main.c:1049
mtrr_trim_uncached_memory+0x118/0x250()
[    0.000000] Modules linked in:
[    0.000000] Pid: 0, comm: swapper Not tainted 2.6.25 #5
[    0.000000]  [<c01273af>] warn_on_slowpath+0x5f/0x90
[    0.000000]  [<c03a8f9d>] _spin_unlock_irqrestore+0xd/0x10
[    0.000000]  [<c0127d4a>] release_console_sem+0x1ba/0x1e0
[    0.000000]  [<c01280d8>] vprintk+0x1c8/0x3a0
[    0.000000]  [<c010ebd3>] generic_get_mtrr+0x93/0x100
[    0.000000]  [<c01282cb>] printk+0x1b/0x20
[    0.000000]  [<c05069d8>] mtrr_trim_uncached_memory+0x118/0x250
[    0.000000]  [<c0504292>] setup_arch+0x312/0x590
[    0.000000]  [<c04fd774>] start_kernel+0x64/0x3a0
[    0.000000]  =======================
[    0.000000] ---[ end trace ca143223eefdc828 ]---

Let me know if there's anything else I can do to help!

Regards,
 Mika
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ