alistair23-linux/arch/x86/mm
H. Peter Anvin 4640c7ee9b x86, smap: smap_violation() is bogus if CONFIG_X86_SMAP is off
If CONFIG_X86_SMAP is disabled, smap_violation() tests for conditions
which are incorrect (as the AC flag doesn't matter), causing spurious
faults.

The dynamic disabling of SMAP (nosmap on the command line) is fine
because it disables X86_FEATURE_SMAP, therefore causing the
static_cpu_has() to return false.

Found by Fengguang Wu's test system.

[ v3: move all predicates into smap_violation() ]
[ v2: use IS_ENABLED() instead of #ifdef ]

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Link: http://lkml.kernel.org/r/20140213124550.GA30497@localhost
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Cc: <stable@vger.kernel.org> # v3.7+
2014-02-13 08:40:52 -08:00
..
kmemcheck
amdtopology.c
dump_pagetables.c
extable.c
fault.c x86, smap: smap_violation() is bogus if CONFIG_X86_SMAP is off 2014-02-13 08:40:52 -08:00
gup.c mm: dump page when hitting a VM_BUG_ON using VM_BUG_ON_PAGE 2014-01-23 16:36:50 -08:00
highmem_32.c
hugetlbpage.c x86/mm: Implement ASLR for hugetlb mappings 2013-11-19 14:24:50 +01:00
init.c arch/x86/mm/init.c: fix incorrect function name in alloc_low_pages() 2013-11-13 12:09:11 +09:00
init_32.c memblock: make memblock_set_node() support different memblock_type 2014-01-21 16:19:44 -08:00
init_64.c memblock: make memblock_set_node() support different memblock_type 2014-01-21 16:19:44 -08:00
iomap_32.c
ioremap.c mm: Remove unused variable idx0 in __early_ioremap() 2013-08-13 11:46:36 +02:00
kmmio.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
Makefile x86, trace: Add page fault tracepoints 2013-11-08 14:15:49 -08:00
memtest.c x86/mm: memblock: switch to use NUMA_NO_NODE 2014-01-21 16:19:47 -08:00
mm_internal.h
mmap.c x86 get_unmapped_area: Access mmap_legacy_base through mm_struct member 2013-08-22 10:19:35 -07:00
mmio-mod.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
numa.c arch/x86/mm/numa.c: fix array index overflow when synchronizing nid to memblock.reserved. 2014-02-06 13:48:51 -08:00
numa_32.c x86: Fix the initialization of physnode_map 2014-02-01 22:15:51 -08:00
numa_64.c
numa_emulation.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
numa_internal.h
pageattr-test.c x86: Delete non-required instances of include <linux/init.h> 2014-01-06 21:25:18 -08:00
pageattr.c x86/mm/cpa: Map in an arbitrary pgd 2013-11-02 11:09:35 +00:00
pat.c
pat_internal.h
pat_rbtree.c
pf_in.c
pf_in.h
pgtable.c x86, mm: do not leak page->ptl for pmd page tables 2013-11-21 16:42:28 -08:00
pgtable_32.c
physaddr.c
physaddr.h
setup_nx.c x86: delete __cpuinit usage from all x86 files 2013-07-14 19:36:56 -04:00
srat.c * Avoid WARN_ON() when mapping BGRT on Baytrail (EFI 32-bit). 2014-02-07 11:27:30 -08:00
testmmiotrace.c
tlb.c x86/mm: Eliminate redundant page table walk during TLB range flushing 2014-01-25 09:10:43 +01:00