linux-sg2042/arch/unicore32/include/asm
Linus Torvalds 643ad15d47 Merge branch 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 protection key support from Ingo Molnar:
 "This tree adds support for a new memory protection hardware feature
  that is available in upcoming Intel CPUs: 'protection keys' (pkeys).

  There's a background article at LWN.net:

      https://lwn.net/Articles/643797/

  The gist is that protection keys allow the encoding of
  user-controllable permission masks in the pte.  So instead of having a
  fixed protection mask in the pte (which needs a system call to change
  and works on a per page basis), the user can map a (handful of)
  protection mask variants and can change the masks runtime relatively
  cheaply, without having to change every single page in the affected
  virtual memory range.

  This allows the dynamic switching of the protection bits of large
  amounts of virtual memory, via user-space instructions.  It also
  allows more precise control of MMU permission bits: for example the
  executable bit is separate from the read bit (see more about that
  below).

  This tree adds the MM infrastructure and low level x86 glue needed for
  that, plus it adds a high level API to make use of protection keys -
  if a user-space application calls:

        mmap(..., PROT_EXEC);

  or

        mprotect(ptr, sz, PROT_EXEC);

  (note PROT_EXEC-only, without PROT_READ/WRITE), the kernel will notice
  this special case, and will set a special protection key on this
  memory range.  It also sets the appropriate bits in the Protection
  Keys User Rights (PKRU) register so that the memory becomes unreadable
  and unwritable.

  So using protection keys the kernel is able to implement 'true'
  PROT_EXEC on x86 CPUs: without protection keys PROT_EXEC implies
  PROT_READ as well.  Unreadable executable mappings have security
  advantages: they cannot be read via information leaks to figure out
  ASLR details, nor can they be scanned for ROP gadgets - and they
  cannot be used by exploits for data purposes either.

  We know about no user-space code that relies on pure PROT_EXEC
  mappings today, but binary loaders could start making use of this new
  feature to map binaries and libraries in a more secure fashion.

  There is other pending pkeys work that offers more high level system
  call APIs to manage protection keys - but those are not part of this
  pull request.

  Right now there's a Kconfig that controls this feature
  (CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS) that is default enabled
  (like most x86 CPU feature enablement code that has no runtime
  overhead), but it's not user-configurable at the moment.  If there's
  any serious problem with this then we can make it configurable and/or
  flip the default"

* 'mm-pkeys-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (38 commits)
  x86/mm/pkeys: Fix mismerge of protection keys CPUID bits
  mm/pkeys: Fix siginfo ABI breakage caused by new u64 field
  x86/mm/pkeys: Fix access_error() denial of writes to write-only VMA
  mm/core, x86/mm/pkeys: Add execute-only protection keys support
  x86/mm/pkeys: Create an x86 arch_calc_vm_prot_bits() for VMA flags
  x86/mm/pkeys: Allow kernel to modify user pkey rights register
  x86/fpu: Allow setting of XSAVE state
  x86/mm: Factor out LDT init from context init
  mm/core, x86/mm/pkeys: Add arch_validate_pkey()
  mm/core, arch, powerpc: Pass a protection key in to calc_vm_flag_bits()
  x86/mm/pkeys: Actually enable Memory Protection Keys in the CPU
  x86/mm/pkeys: Add Kconfig prompt to existing config option
  x86/mm/pkeys: Dump pkey from VMA in /proc/pid/smaps
  x86/mm/pkeys: Dump PKRU with other kernel registers
  mm/core, x86/mm/pkeys: Differentiate instruction fetches
  x86/mm/pkeys: Optimize fault handling in access_error()
  mm/core: Do not enforce PKEY permissions on remote mm access
  um, pkeys: Add UML arch_*_access_permitted() methods
  mm/gup, x86/mm/pkeys: Check VMAs and PTEs for protection keys
  x86/mm/gup: Simplify get_user_pages() PTE bit handling
  ...
2016-03-20 19:08:56 -07:00
..
Kbuild Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2015-10-04 16:31:13 +01:00
assembler.h unicore32 additional architecture files: low-level lib: misc 2011-03-17 09:19:13 +08:00
barrier.h arch: Clean up asm/barrier.h implementations using asm-generic/barrier.h 2014-01-12 10:37:15 +01:00
bitops.h unicore32: fix build error for find bitops 2011-11-15 17:13:14 +08:00
bug.h UniCore32-bugfix: Remove definitions in asm/bug.h to solve difference between native and cross compiler 2012-11-09 17:30:09 +08:00
cache.h unicore32 core architecture: mm related: generic codes 2011-03-17 09:19:08 +08:00
cacheflush.h unicore32 core architecture: mm related: consistent device DMA handling 2011-03-17 09:19:09 +08:00
checksum.h ipv4: Update parameters for csum_tcpudp_magic to their original types 2016-03-13 23:55:13 -04:00
cmpxchg.h UniCore32-bugfix: fix mismatch return value of __xchg_bad_pointer 2012-11-09 17:30:09 +08:00
cpu-single.h unicore32 core architecture: processor and system headers 2011-03-17 09:19:06 +08:00
cputype.h unicore32 core architecture: processor and system headers 2011-03-17 09:19:06 +08:00
delay.h unicore32 additional architecture files: low-level lib: misc 2011-03-17 09:19:13 +08:00
dma-mapping.h dma-mapping: always provide the dma_map_ops based implementation 2016-01-20 17:09:18 -08:00
dma.h unicore32 core architecture: mm related: consistent device DMA handling 2011-03-17 09:19:09 +08:00
elf.h unicore32 core architecture: generic elf and ksyms stuff 2011-03-17 09:19:05 +08:00
fpstate.h unicore32 additional architecture files: float point handling 2011-03-17 09:19:11 +08:00
fpu-ucf64.h unicore32 additional architecture files: float point handling 2011-03-17 09:19:11 +08:00
gpio.h unicore32 io: redefine __REG(x) and re-use readl/writel funcs 2011-03-17 09:19:19 +08:00
hwcap.h unicore32 core architecture: processor and system headers 2011-03-17 09:19:06 +08:00
hwdef-copro.h Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] 2012-03-28 18:30:03 +01:00
io.h arch:unicore32:mm: add devmem_is_allowed() to support STRICT_DEVMEM 2014-06-20 08:22:40 +08:00
irq.h unicore32: remove unused lines in arch/unicore32/include/asm/irq.h 2011-03-17 09:19:17 +08:00
irqflags.h unicore32 core architecture: interrupts ang gpio handling 2011-03-17 09:19:10 +08:00
linkage.h
memblock.h unicore32 core architecture: mm related: generic codes 2011-03-17 09:19:08 +08:00
memory.h mm: move __phys_to_pfn and __pfn_to_phys to asm/generic/memory_model.h 2015-08-27 19:40:58 -04:00
mmu.h unicore32 core architecture: mm related: fault handling 2011-03-17 09:19:09 +08:00
mmu_context.h mm/core: Do not enforce PKEY permissions on remote mm access 2016-02-18 19:46:28 +01:00
mutex.h unicore32 additional architecture files: low-level lib: misc 2011-03-17 09:19:13 +08:00
page.h unicore32 core architecture: mm related: generic codes 2011-03-17 09:19:08 +08:00
pci.h PCI: Move pci_dma_* helpers to common code 2016-03-07 10:40:02 -06:00
pgalloc.h unicore32: handle pgtable_page_ctor() fail 2013-11-15 09:32:19 +09:00
pgtable-hwdef.h unicore32: drop pte_file()-related helpers 2015-02-10 14:30:33 -08:00
pgtable.h unicore32: drop pte_file()-related helpers 2015-02-10 14:30:33 -08:00
processor.h arch, locking: Ciao arch_mutex_cpu_relax() 2014-07-17 12:32:47 +02:00
ptrace.h arch/unicore32/include/asm/ptrace.h: add generic definition for profile_pc() 2014-06-20 08:22:38 +08:00
stacktrace.h unicore32 core architecture: process/thread related codes 2011-03-17 09:19:07 +08:00
string.h unicore32 core architecture: generic elf and ksyms stuff 2011-03-17 09:19:05 +08:00
suspend.h PM / Hibernate: Remove arch_prepare_suspend() 2011-05-24 23:35:55 +02:00
switch_to.h Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] 2012-03-28 18:30:03 +01:00
thread_info.h unicore32: Remove signal translation and exec_domain 2015-04-12 21:03:28 +02:00
timex.h unicore32 core architecture: timer and time handling 2011-03-17 09:19:10 +08:00
tlb.h unicore32: rewrite arch-specific tlb.h to use asm-generic version 2011-03-17 09:19:21 +08:00
tlbflush.h unicore32 core architecture: mm related: consistent device DMA handling 2011-03-17 09:19:09 +08:00
traps.h unicore32 core architecture: low level entry and setup codes 2011-03-17 09:19:06 +08:00
uaccess.h Disintegrate asm/system.h for Unicore32 [based on ver #3, changed by gxt] 2012-03-28 18:30:03 +01:00