Re: [PATCH v2 20/23] x86,usercopy: Remove .fixup usage

From: Josh Poimboeuf
Date: Thu Nov 11 2021 - 02:51:52 EST


On Wed, Nov 10, 2021 at 11:01:22AM +0100, Peter Zijlstra wrote:
> +static bool ex_handler_ucopy_leng(const struct exception_table_entry *fixup,
> + struct pt_regs *regs, int trapnr, int reg, int imm)
> +{
> + regs->cx = imm * regs->cx + *pt_regs_nr(regs, reg);
> + return ex_handler_uaccess(fixup, regs, trapnr);
> +}
> +
> int ex_get_fixup_type(unsigned long ip)
> {
> const struct exception_table_entry *e = search_exception_tables(ip);
> @@ -217,6 +224,8 @@ int fixup_exception(struct pt_regs *regs
> return ex_handler_imm_reg(e, regs, reg, imm);
> case EX_TYPE_FAULT_SGX:
> return ex_handler_sgx(e, regs, trapnr);
> + case EX_TYPE_UCOPY_LEN:
> + return ex_handler_ucopy_leng(e, regs, trapnr, reg, imm);

"leng"?

--
Josh