Re: [GIT PULL] x86/mm for 6.4

From: Alexander Potapenko
Date: Fri Jun 16 2023 - 04:47:32 EST


Hi Linus,

> static bool ex_handler_uaccess(const struct exception_table_entry *fixup,
> - struct pt_regs *regs, int trapnr)
> + struct pt_regs *regs, int trapnr,
> + unsigned long fault_address)
> {
> - WARN_ONCE(trapnr == X86_TRAP_GP, "General protection fault in user access. Non-canonical address?");
> + WARN_ONCE(trapnr == X86_TRAP_GP && !gp_fault_address_ok(fault_address),
> + "General protection fault in user access. Non-canonical address?");
> return ex_handler_default(fixup, regs);
> }

Shouldn't ex_handler_copy() be fixed in the same way?
Looks like it's still possible for a tagged userspace address to be passed to it and trigger a warning.

Alex