https://github.com/torvalds/linux
Revision 910170442944e1f8674fd5ddbeeb8ccd1877ea98 authored by David Woodhouse on 12 September 2016, 02:49:11 UTC, committed by David Woodhouse on 19 November 2016, 17:42:35 UTC
Somehow I ended up with an off-by-three error in calculating the size of
the PASID and PASID State tables, which triggers allocations failures as
those tables unfortunately have to be physically contiguous.

In fact, even the *correct* maximum size of 8MiB is problematic and is
wont to lead to allocation failures. Since I have extracted a promise
that this *will* be fixed in hardware, I'm happy to limit it on the
current hardware to a maximum of 0x20000 PASIDs, which gives us 1MiB
tables — still not ideal, but better than before.

Reported by Mika Kuoppala <mika.kuoppala@linux.intel.com> and also by
Xunlei Pang <xlpang@redhat.com> who submitted a simpler patch to fix
only the allocation (and not the free) to the "correct" limit... which
was still problematic.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: stable@vger.kernel.org
1 parent 1c38718
History
Tip revision: 910170442944e1f8674fd5ddbeeb8ccd1877ea98 authored by David Woodhouse on 12 September 2016, 02:49:11 UTC
iommu/vt-d: Fix PASID table allocation
Tip revision: 9101704
File Mode Size
kasan
Kconfig -rw-r--r-- 24.0 KB
Kconfig.debug -rw-r--r-- 3.6 KB
Makefile -rw-r--r-- 3.4 KB
backing-dev.c -rw-r--r-- 26.3 KB
balloon_compaction.c -rw-r--r-- 4.7 KB
bootmem.c -rw-r--r-- 20.8 KB
cleancache.c -rw-r--r-- 9.9 KB
cma.c -rw-r--r-- 12.2 KB
cma.h -rw-r--r-- 515 bytes
cma_debug.c -rw-r--r-- 4.4 KB
compaction.c -rw-r--r-- 56.7 KB
debug.c -rw-r--r-- 4.2 KB
debug_page_ref.c -rw-r--r-- 1.3 KB
dmapool.c -rw-r--r-- 13.8 KB
early_ioremap.c -rw-r--r-- 6.2 KB
fadvise.c -rw-r--r-- 4.0 KB
failslab.c -rw-r--r-- 1.4 KB
filemap.c -rw-r--r-- 77.4 KB
frame_vector.c -rw-r--r-- 6.1 KB
frontswap.c -rw-r--r-- 14.3 KB
gup.c -rw-r--r-- 42.6 KB
highmem.c -rw-r--r-- 11.7 KB
huge_memory.c -rw-r--r-- 63.0 KB
hugetlb.c -rw-r--r-- 120.2 KB
hugetlb_cgroup.c -rw-r--r-- 10.9 KB
hwpoison-inject.c -rw-r--r-- 3.2 KB
init-mm.c -rw-r--r-- 619 bytes
internal.h -rw-r--r-- 15.3 KB
interval_tree.c -rw-r--r-- 3.1 KB
khugepaged.c -rw-r--r-- 48.0 KB
kmemcheck.c -rw-r--r-- 2.9 KB
kmemleak-test.c -rw-r--r-- 3.2 KB
kmemleak.c -rw-r--r-- 56.0 KB
ksm.c -rw-r--r-- 63.5 KB
list_lru.c -rw-r--r-- 12.6 KB
maccess.c -rw-r--r-- 3.0 KB
madvise.c -rw-r--r-- 19.4 KB
memblock.c -rw-r--r-- 49.5 KB
memcontrol.c -rw-r--r-- 154.2 KB
memory-failure.c -rw-r--r-- 49.1 KB
memory.c -rw-r--r-- 110.4 KB
memory_hotplug.c -rw-r--r-- 55.4 KB
mempolicy.c -rw-r--r-- 71.3 KB
mempool.c -rw-r--r-- 13.9 KB
memtest.c -rw-r--r-- 2.7 KB
migrate.c -rw-r--r-- 52.1 KB
mincore.c -rw-r--r-- 6.7 KB
mlock.c -rw-r--r-- 22.5 KB
mm_init.c -rw-r--r-- 4.8 KB
mmap.c -rw-r--r-- 94.7 KB
mmu_context.c -rw-r--r-- 1.3 KB
mmu_notifier.c -rw-r--r-- 11.7 KB
mmzone.c -rw-r--r-- 2.4 KB
mprotect.c -rw-r--r-- 13.0 KB
mremap.c -rw-r--r-- 15.1 KB
msync.c -rw-r--r-- 2.6 KB
nobootmem.c -rw-r--r-- 11.1 KB
nommu.c -rw-r--r-- 48.4 KB
oom_kill.c -rw-r--r-- 28.6 KB
page-writeback.c -rw-r--r-- 84.3 KB
page_alloc.c -rw-r--r-- 201.7 KB
page_counter.c -rw-r--r-- 4.8 KB
page_ext.c -rw-r--r-- 11.4 KB
page_idle.c -rw-r--r-- 5.4 KB
page_io.c -rw-r--r-- 9.5 KB
page_isolation.c -rw-r--r-- 8.4 KB
page_owner.c -rw-r--r-- 14.7 KB
page_poison.c -rw-r--r-- 3.5 KB
pagewalk.c -rw-r--r-- 7.5 KB
percpu-km.c -rw-r--r-- 2.8 KB
percpu-vm.c -rw-r--r-- 10.0 KB
percpu.c -rw-r--r-- 66.2 KB
pgtable-generic.c -rw-r--r-- 4.8 KB
process_vm_access.c -rw-r--r-- 10.0 KB
quicklist.c -rw-r--r-- 2.4 KB
readahead.c -rw-r--r-- 15.5 KB
rmap.c -rw-r--r-- 51.2 KB
shmem.c -rw-r--r-- 105.7 KB
slab.c -rw-r--r-- 111.4 KB
slab.h -rw-r--r-- 13.3 KB
slab_common.c -rw-r--r-- 31.2 KB
slob.c -rw-r--r-- 16.0 KB
slub.c -rw-r--r-- 138.3 KB
sparse-vmemmap.c -rw-r--r-- 7.8 KB
sparse.c -rw-r--r-- 20.8 KB
swap.c -rw-r--r-- 27.0 KB
swap_cgroup.c -rw-r--r-- 4.6 KB
swap_state.c -rw-r--r-- 13.2 KB
swapfile.c -rw-r--r-- 77.0 KB
truncate.c -rw-r--r-- 24.0 KB
usercopy.c -rw-r--r-- 7.7 KB
userfaultfd.c -rw-r--r-- 7.2 KB
util.c -rw-r--r-- 15.9 KB
vmacache.c -rw-r--r-- 3.1 KB
vmalloc.c -rw-r--r-- 68.6 KB
vmpressure.c -rw-r--r-- 12.5 KB
vmscan.c -rw-r--r-- 110.9 KB
vmstat.c -rw-r--r-- 47.4 KB
workingset.c -rw-r--r-- 16.8 KB
z3fold.c -rw-r--r-- 21.3 KB
zbud.c -rw-r--r-- 18.2 KB
zpool.c -rw-r--r-- 10.0 KB
zsmalloc.c -rw-r--r-- 60.3 KB
zswap.c -rw-r--r-- 32.3 KB

back to top