Re: [PATCH 1/2] powerpc/book3s64/hash: Disable 16M linear mapping size if not aligned

2020-01-28 Thread Michael Ellerman
On Tue, 2019-12-24 at 06:41:25 UTC, Russell Currey wrote: > With STRICT_KERNEL_RWX on in a relocatable kernel under the hash MMU, if > the position the kernel is loaded at is not 16M aligned, the kernel > miscalculates its ALIGN*()s and things go horribly wrong. > > We can easily avoid this when

[PATCH 1/2] powerpc/book3s64/hash: Disable 16M linear mapping size if not aligned

2019-12-23 Thread Russell Currey
With STRICT_KERNEL_RWX on in a relocatable kernel under the hash MMU, if the position the kernel is loaded at is not 16M aligned, the kernel miscalculates its ALIGN*()s and things go horribly wrong. We can easily avoid this when selecting the linear mapping size, so do so and print a warning. I