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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1200950633.15491.21.camel@cthulhu.hellion.org.uk>
Date:	Mon, 21 Jan 2008 21:23:53 +0000
From:	Ian Campbell <ijc@...lion.org.uk>
To:	Mika Penttilä <mika.penttila@...umbus.fi>
Cc:	linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	"Eric W. Biederman" <ebiederm@...ssion.com>
Subject: Re: [PATCH] x86: Construct 32 bit boot time page tables in native
	format.


On Sun, 2008-01-20 at 20:30 +0200, Mika Penttilä wrote:
> > + * This is how much memory *in addition to the memory covered up to
> > + * and including _end* we need mapped initially.  We need one bit for
> > + * each possible page, but only in low memory, which means
> > + * 2^32/4096/8 = 128K worst case (4G/4G split.)
> > + *
> > + * Modulo rounding, each megabyte assigned here requires a kilobyte of
> > + * memory, which is currently unreclaimed.
> > + *
> > + * This should be a multiple of a page.
> > + */
> > +#define INIT_MAP_BEYOND_END	(128*1024)
> > +
> > +/*
> >   
> 
> You have dropped the requirement to map all of low memory (the boot 
> allocator is used for instance to construct physical mem mapping). 
> Either you should fix your INIT_MAP_BEYOND_END or make a big comment 
> telling us why it isn't necessary anymore to map low mem.

I think you are right. The patch ensures that all the initial page
tables themselves have mappings but won't map the additional pages
needed for mapping the rest of lowmem.

However, I think it is no longer necessary to map a whole new 4G worth
of page table pages because the code in kernel_physical_mapping_init now
extends the initial mappings rather than replacing them (see changes to
native_pagetable_setup_start). So now we only need to map 4G worth of
page tables including the initial page tables. That means we only need
to map a fixed set of extra pages rather than the sliding limit
currently used in the patch.

I'm not convinced by the additional 16MB for CONFIG_DEBUG_PAGEALLOC --
we map enough pages for page tables for 4G of lowmem -- adding space for
an extra 16M seems pointless.

Ian.
-- 
Ian Campbell

Good-bye.  I am leaving because I am bored.
		-- George Saunders' dying words

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