mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-19 17:14:40 +08:00
81a31a860b
Without EXCLUSIVE_SYSTEM_RAM, users are allowed to map arbitrary physical memory regions into the userspace via /dev/mem. At the same time, pages may change their properties (e.g., from anonymous pages to named pages) while they are still being mapped in the userspace, leading to "corruption" detected by the page table check. To avoid these false positives, this patch makes PAGE_TABLE_CHECK depends on EXCLUSIVE_SYSTEM_RAM. This dependency is understandable because PAGE_TABLE_CHECK is a hardening technique but /dev/mem without STRICT_DEVMEM (i.e., !EXCLUSIVE_SYSTEM_RAM) is itself a security problem. Even with EXCLUSIVE_SYSTEM_RAM, I/O pages may be still allowed to be mapped via /dev/mem. However, these pages are always considered as named pages, so they won't break the logic used in the page table check. Cc: <stable@vger.kernel.org> # 5.17 Signed-off-by: Ruihan Li <lrh2000@pku.edu.cn> Acked-by: David Hildenbrand <david@redhat.com> Acked-by: Pasha Tatashin <pasha.tatashin@soleen.com> Link: https://lore.kernel.org/r/20230515130958.32471-4-lrh2000@pku.edu.cn Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
damon | ||
active_mm.rst | ||
arch_pgtable_helpers.rst | ||
balance.rst | ||
bootmem.rst | ||
free_page_reporting.rst | ||
frontswap.rst | ||
highmem.rst | ||
hmm.rst | ||
hugetlbfs_reserv.rst | ||
hwpoison.rst | ||
index.rst | ||
ksm.rst | ||
memory-model.rst | ||
mmu_notifier.rst | ||
multigen_lru.rst | ||
numa.rst | ||
oom.rst | ||
overcommit-accounting.rst | ||
page_allocation.rst | ||
page_cache.rst | ||
page_frags.rst | ||
page_migration.rst | ||
page_owner.rst | ||
page_reclaim.rst | ||
page_table_check.rst | ||
page_tables.rst | ||
physical_memory.rst | ||
process_addrs.rst | ||
remap_file_pages.rst | ||
shmfs.rst | ||
slab.rst | ||
slub.rst | ||
split_page_table_lock.rst | ||
swap.rst | ||
transhuge.rst | ||
unevictable-lru.rst | ||
vmalloc.rst | ||
vmalloced-kernel-stacks.rst | ||
vmemmap_dedup.rst | ||
z3fold.rst | ||
zsmalloc.rst |