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]
Message-ID: <Pine.LNX.4.64.0711201228180.26745@schroedinger.engr.sgi.com>
Date:	Tue, 20 Nov 2007 12:35:22 -0800 (PST)
From:	Christoph Lameter <clameter@....com>
To:	Andi Kleen <ak@...e.de>
cc:	akpm@...ux-foundation.org, travis@....com,
	Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>,
	linux-kernel@...r.kernel.org
Subject: Re: [rfc 08/45] cpu alloc: x86 support

On Tue, 20 Nov 2007, Andi Kleen wrote:

> > So I think we have a 2GB area right?
> 
> For everything that needs the -31bit offsets; that is everything linked

Of course.

> > 1GB kernel
> > 1GB - 1x per cpu area (128M?) modules?
> > cpu aree 0
> > ---- 2GB limit
> > cpu area 1
> > cpu area 2
> > ....
> >
> > For that we would need to move the kernel down a bit. Can we do that?
> 
> The kernel model requires kernel and modules and everything else
> linked be in negative -31bit space. That is how the kernel code model is 
> defined.

Right so I could move the kernel to

#define __PAGE_OFFSET     _AC(0xffff810000000000, UL)
#define __START_KERNEL_map_AC(0xfffffff800000000, UL)
#define KERNEL_TEXT_START _AC(0xfffffff800000000, UL) 30 bits = 1GB for kernel text
#define MODULES_VADDR     _AC(0xfffffff880000000, UL) 30 bits = 1GB for modules
#define MODULES_END       _AC(0xfffffff8f0000000, UL)
#define CPU_AREA_BASE     _AC(0xfffffff8f0000000, UL) 31 bits 256MB for cpu area 0
#define CPU_AREA_BASE1	  _AC(0xfffffff900000000, UL) More cpu areas for higher numbered processors
#define CPU_AREA_END	  _AC(0xffffffffffff0000, UL)

> You could in theory move the modules, but then you would need to implement
> a full PIC dynamic linker for them  first and also increase runtime overhead
> for them because they would need to use a GOT/PLT.

Why is it not possible to move the kernel lower while keeping bit 31 1?

> I suspect all of this  would cause far more overhead all over the kernel than 
> you could ever save with the per cpu data in your fast paths.

Moving the kernel down a bit seems to be trivial without any of the weird 
solutions.

-
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