Re: [PATCH 0/5] ARM: NOMMU: fix PMSAv7/v8 MPU setup on M-class

From: Arnd Bergmann

Date: Wed Nov 25 2026 - 02:47:27 EST


On Wed, Nov 25, 2026, at 03:57, Brad Hawthorne wrote:
> With CONFIG_ARM_MPU=y, a Cortex-M3 kernel under QEMU (mps2-an385)
> panics before its console comes up. Patch 1 fixes that: the M-class
> region base register has VALID and REGION in its low bits, so the
> R-class probe selects a region that does not exist. After that,
> allocate_region() can return one region too many (2),
> mpu_setup_region() accepts a number one past the end (3), and
> try_split_region() can return a base not aligned to its size (4).
> Patch 5 fixes the same off-by-one as patch 3 in pmsa-v8.c.

I had a look at these and they all make sense to me, thanks for
addressing these issues!

Arnd