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, 05 Mar 2012 17:49:49 -0800
From:	"H. Peter Anvin" <hpa@...or.com>
To:	Yinghai Lu <yinghai@...nel.org>
CC:	zhenzhong.duan@...cle.com, Takashi Iwai <tiwai@...e.de>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	"Rafael J. Wysocki" <rjw@...k.pl>, stable@...r.kernel.org,
	linux-kernel@...r.kernel.org, konrad.wilk@...cle.com,
	joe.jin@...cle.com, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>
Subject: Re: [PATCH] Initialize max_pfn_mapped as initial ident mapping size
 for x86_64

On 03/05/2012 05:35 PM, Yinghai Lu wrote:
> 
> whole history:
> before following patch, on x86_64, for low memory (under 4g) pgtable
> will be allocated just under TOML
> and even those memory is not mapped directly. because now we are using
> early_ioremap to access those
> page table.
> 
> but looks it has problem with S4 resume. so good_end is set to initial
> mapped high address.
> (that is 512M). So page table will just below 512M
> but crash kernel is allocated below 768M. so will have no chance to
> get 512M porting for crashkernel.
> 
> Now your patch just set initial mapping limit to 1g. but according to
> arch/x86/kernel/head_64.S
> we only have initial mapping to 512M.
> 
> So you can not just simply set to 1G,  that will confuse early
> memblock allocator.
> 
> We may update find_early_table_space() to use 1G as good_end for
> x86_64 that will be less confusing.
> 

This is crazy.  All of it.  We shouldn't have a bunch of magic memory
limits on 64 bits, and trying to add and subtract to them really just
makes the pain worse.

WHY does it have a problem with S4 resume?  S4 is Linux code, so there
is a bug here that people keep trying to hack around instead of digging
into.

The early mapping range we can fix, and probably should.  Mapping the
first 4 GiB is not a lot of memory and makes a much more sensible
starting point.

	-hpa


-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.

--
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