Messages in this thread |  | | Subject | Re: [PATCH v8 09/28] x86/insn-eval: Do not BUG on invalid register type | From | Ricardo Neri <> | Date | Thu, 07 Sep 2017 13:27:21 -0700 |
| |
On Thu, 2017-09-07 at 19:54 +0200, Borislav Petkov wrote: > > Also, I meant to add it to pr_fmt. Feel free to merge this hunk ontop > of > yours: > > --- > diff --git a/arch/x86/lib/insn-eval.c b/arch/x86/lib/insn-eval.c > index 3919458fecbf..d46034ddfbb7 100644 > --- a/arch/x86/lib/insn-eval.c > +++ b/arch/x86/lib/insn-eval.c > @@ -10,6 +10,9 @@ > #include <asm/insn.h> > #include <asm/insn-eval.h> > > +#undef pr_fmt > +#define pr_fmt(fmt) "insn: " fmt > + > enum reg_type { > REG_TYPE_RM = 0, > REG_TYPE_INDEX, > @@ -86,7 +89,7 @@ static int get_reg_offset(struct insn *insn, struct > pt_regs *regs, > break; > > default: > - pr_err_ratelimited("insn: x86: invalid register > type"); > + pr_err_ratelimited("invalid register type: %d\n", > type); > return -EINVAL; > } >
Oh, I didn't understand your comment initially. Sure, I will add merge this on top of my patch.
Thanks and BR, Ricardo
|  |