I'm on an embedded system (Zynq from Xilinx. It uses ARMv7, Cortex-A9), and running Linux. I need to ensure that no access to a certain physical memory range is ever made, either accidentally by the kernel-space or the user. I can signal, data abort, or anything else, but that hardware attempt must not go further than the MMU.
In bare-metal mode and U-Boot, I have direct access to the TLB's location, and can restrict memory access on a hardware level by configuring the MMU to data abort should any read or write access occur. I want to do this in Linux, where even a mmap() would throw a data abort.
In Zynq, 2GB of address space is allocated to a range that might never respond on a hardware level. ARM's AXI/AMBA protocol says that a host can never "give up" on an attempt to access an address, even if nothing is there. If I de-reference a pointer where no hardware resides, the entire chip hangs.
I know I can "just not give sudo" or "just write good drivers", but this is before that level even. I want to, in the early boot, set up the MMU's TLB to completely data abort if my super user does some bad coding. I'd rather not hack boot.S, but modify the TLB directly, then use the API to flush it.