mbox series

[V3,0/2] mm/ioremap: Check virtual address alignment

Message ID 1557377177-20695-1-git-send-email-anshuman.khandual@arm.com (mailing list archive)
Headers show
Series mm/ioremap: Check virtual address alignment | expand

Message

Anshuman Khandual May 9, 2019, 4:46 a.m. UTC
This series makes sure that ioremap_page_range()'s input virtual address
alignment is checked along with physical address before creating huge page
kernel mappings to avoid problems related to random freeing of PMD or PTE
pgtable pages potentially with existing valid entries. It also cleans up
arm64 pgtable page address offset in [pud|pmd]_free_[pmd|pte]_page().

Changes in V3:

- Added virtual address alignment check in ioremap_page_range()
- Dropped VM_WARN_ONCE() as input virtual addresses are aligned for sure

Changes in V2: (https://patchwork.kernel.org/patch/10922795/)

- Replaced WARN_ON_ONCE() with VM_WARN_ONCE() as per Catalin

Changes in V1: (https://patchwork.kernel.org/patch/10921135/)

Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Toshi Kani <toshi.kani@hpe.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Chintan Pandya <cpandya@codeaurora.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: Laura Abbott <labbott@redhat.com>

Anshuman Khandual (2):
  mm/ioremap: Check virtual address alignment while creating huge mappings
  arm64/mm: Change offset base address in [pud|pmd]_free_[pmd|pte]_page()

 arch/arm64/mm/mmu.c | 6 +++---
 lib/ioremap.c       | 6 ++++++
 2 files changed, 9 insertions(+), 3 deletions(-)