On Wed, 2017-04-12 at 12:03 +0200, Borislav Petkov wrote:
* If mod is 0 and register R/EBP (regno=5) isindicated in the
* base part of the SIB byte, the value of suchregister should
* not be used in the address computation. Also, a32-bit
* displacement is expected in this case; theinstruction
* decoder takes care of it. This is true for both R13and
* R/EBP as REX.B will not be decoded.*/if (regno == 5 && X86_MODRM_MOD(insn->modrm.value) ==
return -EDOM;if (X86_REX_B(insn->rex_prefix.value))regno += 8;break;default:pr_err("invalid register type");BUG();WARNING: Avoid crashing the kernel - try using WARN_ON & recovery code rather than BUG() or BUG_ON() #211: FILE: arch/x86/lib/insn-eval.c:90:
BUG();And checkpatch is kinda right. We need to warn here, not explode. Oh and that function returns negative values on error...
Please change that with a patch ontop of the move.
Sure, I will change it.