[PATCH v2 2/3] arm64: mm: Handle PAN faults on uaccess CPY* instructions

Catalin Marinas catalin.marinas at arm.com
Fri Mar 7 08:57:28 PST 2025


On Thu, Mar 06, 2025 at 03:28:26PM +0000, Robin Murphy wrote:
> On 28/02/2025 5:00 pm, Kristina Martšenko wrote:
> > A subsequent patch will use CPY* instructions to copy between user and
> > kernel memory. Add handling for PAN faults caused by an intended kernel
> > memory access erroneously accessing user memory, in order to make it
> > easier to debug kernel bugs and to keep the same behavior as with
> > regular loads/stores.
> 
> I'd be tempted to fold the search_exception_tables() call into
> insn_may_access_user() itself, but either way,

Yeah, I think it looks better folded in. I did it locally.

> Reviewed-by: Robin Murphy <robin.murphy at arm.com>

Thanks.

-- 
Catalin



More information about the linux-arm-kernel mailing list