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

From: Peter Zijlstra
Date: Thu Nov 11 2021 - 03:28:29 EST


On Wed, Nov 10, 2021 at 11:51:43PM -0800, Josh Poimboeuf wrote:
> 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"?

OMG, I really should just take a break or something :/ I'll go fix.