• Dave Hansen's avatar
    mm/core, x86/mm/pkeys: Store protection bits in high VMA flags · 63c17fb8
    Dave Hansen authored
    vma->vm_flags is an 'unsigned long', so has space for 32 flags
    on 32-bit architectures.  The high 32 bits are unused on 64-bit
    platforms.  We've steered away from using the unused high VMA
    bits for things because we would have difficulty supporting it
    on 32-bit.
    
    Protection Keys are not available in 32-bit mode, so there is
    no concern about supporting this feature in 32-bit mode or on
    32-bit CPUs.
    
    This patch carves out 4 bits from the high half of
    vma->vm_flags and allows architectures to set config option
    to make them available.
    
    Sparse complains about these constants unless we explicitly
    call them "UL".
    Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
    Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
    Cc: Andrew Morton <akpm@linux-foundation.org>
    Cc: Andy Lutomirski <luto@amacapital.net>
    Cc: Borislav Petkov <bp@alien8.de>
    Cc: Brian Gerst <brgerst@gmail.com>
    Cc: Dan Williams <dan.j.williams@intel.com>
    Cc: Dave Hansen <dave@sr71.net>
    Cc: Denys Vlasenko <dvlasenk@redhat.com>
    Cc: H. Peter Anvin <hpa@zytor.com>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Cc: Konstantin Khlebnikov <koct9i@gmail.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Mel Gorman <mgorman@suse.de>
    Cc: Michal Hocko <mhocko@suse.com>
    Cc: Oleg Nesterov <oleg@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Rik van Riel <riel@redhat.com>
    Cc: Sasha Levin <sasha.levin@oracle.com>
    Cc: Valentin Rothberg <valentinrothberg@gmail.com>
    Cc: Vladimir Davydov <vdavydov@parallels.com>
    Cc: Vlastimil Babka <vbabka@suse.cz>
    Cc: Xie XiuQi <xiexiuqi@huawei.com>
    Cc: linux-kernel@vger.kernel.org
    Cc: linux-mm@kvack.org
    Link: http://lkml.kernel.org/r/20160212210208.81AF00D5@viggo.jf.intel.comSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
    63c17fb8
Kconfig 22.4 KB