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:   Thu, 17 Aug 2017 13:54:18 +0300
From:   "Kirill A. Shutemov" <kirill@...temov.name>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     "Kirill A. Shutemov" <kirill.shutemov@...ux.intel.com>,
        Linus Torvalds <torvalds@...ux-foundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>, x86@...nel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>, Andi Kleen <ak@...ux.intel.com>,
        Dave Hansen <dave.hansen@...el.com>,
        Andy Lutomirski <luto@...capital.net>,
        Michal Hocko <mhocko@...nel.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCHv4 08/14] x86/mm: Make PGDIR_SHIFT and PTRS_PER_P4D
 variable

On Thu, Aug 17, 2017 at 11:00:38AM +0200, Ingo Molnar wrote:
> 
> * Kirill A. Shutemov <kirill.shutemov@...ux.intel.com> wrote:
> 
> > For boot-time switching between 4- and 5-level paging we need to be able
> > to fold p4d page table level at runtime. It requires variable
> > PGDIR_SHIFT and PTRS_PER_P4D.
> > 
> > Signed-off-by: Kirill A. Shutemov <kirill.shutemov@...ux.intel.com>
> > ---
> >  arch/x86/boot/compressed/kaslr.c        |  5 +++++
> >  arch/x86/include/asm/pgtable_32.h       |  2 ++
> >  arch/x86/include/asm/pgtable_32_types.h |  2 ++
> >  arch/x86/include/asm/pgtable_64_types.h | 15 +++++++++++++--
> >  arch/x86/kernel/head64.c                |  9 ++++++++-
> >  arch/x86/mm/dump_pagetables.c           | 12 +++++-------
> >  arch/x86/mm/init_64.c                   |  2 +-
> >  arch/x86/mm/kasan_init_64.c             |  2 +-
> >  arch/x86/platform/efi/efi_64.c          |  4 ++--
> >  include/asm-generic/5level-fixup.h      |  1 +
> >  include/asm-generic/pgtable-nop4d.h     |  1 +
> >  include/linux/kasan.h                   |  2 +-
> >  mm/kasan/kasan_init.c                   |  2 +-
> >  13 files changed, 43 insertions(+), 16 deletions(-)
> 
> So I'm wondering what the code generation effect of this is - what's the 
> before/after vmlinux size?
> 
> My guess is that the effect should be very small, as these constants are not 
> widely used - but I'm only guessing and could be wrong.

This change increase vmlinux size for defconfig + X86_5LEVEL=y by ~4k or
0.01%.

-- 
 Kirill A. Shutemov

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ