[PATCHv2 1/2] arm64: mm: detect bad __create_mapping uses

Catalin Marinas catalin.marinas at arm.com
Thu Nov 26 10:17:36 PST 2015

On Mon, Nov 23, 2015 at 01:26:19PM +0000, Mark Rutland wrote:
> If a caller of __create_mapping provides a PA and VA which have
> different sub-page offsets, it is not clear which offset they expect to
> apply to the mapping, and is indicative of a bad caller.
> In some cases, the region we wish to map may validly have a sub-page
> offset in the physical and virtual addresses. For example, EFI runtime
> regions have 4K granularity, yet may be mapped by a 64K page kernel. So
> long as the physical and virtual offsets are the same, the region will
> be mapped at the expected VAs.
> Disallow calls with differing sub-page offsets, and WARN when they are
> encountered, so that we can detect and fix such cases.
> Signed-off-by: Mark Rutland <mark.rutland at arm.com>
> Acked-by: Ard Biesheuvel <ard.biesheuvel at linaro.org>
> Reviewed-by: Steve Capper <steve.capper at linaro.org>
> Cc: Catalin Marinas <catalin.marinas at arm.com>
> Cc: Laura Abbott <labbott at fedoraproject.org>
> Cc: Will Deacon <will.deacon at arm.com>

On both patches:

Acked-by: Catalin Marinas <catalin.marinas at arm.com>

Since they don't look urgent, I'll leave them to Will for 4.5.


More information about the linux-arm-kernel mailing list