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: <20160422071612.GA6819@gmail.com>
Date:	Fri, 22 Apr 2016 09:16:12 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	Kees Cook <keescook@...omium.org>
Cc:	Borislav Petkov <bp@...e.de>, Baoquan He <bhe@...hat.com>,
	Yinghai Lu <yinghai@...nel.org>,
	Ingo Molnar <mingo@...hat.com>,
	"x86@...nel.org" <x86@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Andrey Ryabinin <aryabinin@...tuozzo.com>,
	Dmitry Vyukov <dvyukov@...gle.com>,
	"H.J. Lu" <hjl.tools@...il.com>,
	Josh Poimboeuf <jpoimboe@...hat.com>,
	Andy Lutomirski <luto@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/5] x86, KASLR: Drop CONFIG_RANDOMIZE_BASE_MAX_OFFSET


* Kees Cook <keescook@...omium.org> wrote:

> >> +       Since the kernel is built using 2GB addressing,
> >
> > Does that try to refer to the 1G kernel and 1G fixmap pagetable
> > mappings? I.e., level2_kernel_pgt and level2_fixmap_pgt in
> > arch/x86/kernel/head_64.S?
> 
> The "2GB addressing" part is in reference to:
> 
>        -mcmodel=kernel
>            Generate code for the kernel code model.  The kernel runs in the
>            negative 2 GB of the address space.  This model has to be used for
>            Linux kernel code.

On x86-64 this is a special GCC compiler small memory model, it is called the 
'kernel code model', which is rather generic and no 'real name' ever stuck.

Due to RIP-relative addressing and the sign-extension of 48 bit virtual addresses, 
this allows nearly as compact kernel code and (static) kernel data definitions as 
a 32-bit kernel would allow.

The (positive) 0-4GB virtual memory range has similar advantages, but is of course 
frequently used by user-space code. Negative addresses are reserved for the kernel 
only.

Thanks,

	Ingo

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ