lkml.org 
[lkml]   [2017]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v8 09/28] x86/insn-eval: Do not BUG on invalid register type
From
Date
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

\
 
 \ /
  Last update: 2017-09-07 22:27    [W:0.083 / U:6.680 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site