kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: x86, mpx: Decode MPX instruction to get bound violation information
@ 2015-11-19  5:22 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-11-19  5:22 UTC (permalink / raw)
  To: kernel-janitors

Hey Dave,

Whatever happened with this?

regards,
dan carpenter

On Mon, May 18, 2015 at 03:32:16PM +0300, Dan Carpenter wrote:
> Hello Dave Hansen,
> 
> The patch fcc7ffd67991: "x86, mpx: Decode MPX instruction to get
> bound violation information" from Nov 14, 2014, leads to the
> following static checker warning:
> 
> 	arch/x86/mm/mpx.c:147 get_reg_offset()
> 	warn: masked condition is always false. '((insn->rex_prefix.value) & 2) = 1'
> 
> arch/x86/mm/mpx.c
>    138          switch (type) {
>    139          case REG_TYPE_RM:
>    140                  regno = X86_MODRM_RM(insn->modrm.value);
>    141                  if (X86_REX_B(insn->rex_prefix.value) = 1)
>    142                          regno += 8;
>    143                  break;
>    144  
>    145          case REG_TYPE_INDEX:
>    146                  regno = X86_SIB_INDEX(insn->sib.value);
>    147                  if (X86_REX_X(insn->rex_prefix.value) = 1)
>                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Was X86_REX_B() intended?
> 
>    148                          regno += 8;
>    149                  break;
>    150  
>    151          case REG_TYPE_BASE:
>    152                  regno = X86_SIB_BASE(insn->sib.value);
>    153                  if (X86_REX_B(insn->rex_prefix.value) = 1)
>    154                          regno += 8;
>    155                  break;
>    156  
>    157          default:
>    158                  pr_err("invalid register type");
>    159                  BUG();
>    160                  break;
>    161          }
> 
> regards,
> dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

* re: x86, mpx: Decode MPX instruction to get bound violation information
@ 2015-05-18 12:32 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2015-05-18 12:32 UTC (permalink / raw)
  To: kernel-janitors

Hello Dave Hansen,

The patch fcc7ffd67991: "x86, mpx: Decode MPX instruction to get
bound violation information" from Nov 14, 2014, leads to the
following static checker warning:

	arch/x86/mm/mpx.c:147 get_reg_offset()
	warn: masked condition is always false. '((insn->rex_prefix.value) & 2) = 1'

arch/x86/mm/mpx.c
   138          switch (type) {
   139          case REG_TYPE_RM:
   140                  regno = X86_MODRM_RM(insn->modrm.value);
   141                  if (X86_REX_B(insn->rex_prefix.value) = 1)
   142                          regno += 8;
   143                  break;
   144  
   145          case REG_TYPE_INDEX:
   146                  regno = X86_SIB_INDEX(insn->sib.value);
   147                  if (X86_REX_X(insn->rex_prefix.value) = 1)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Was X86_REX_B() intended?

   148                          regno += 8;
   149                  break;
   150  
   151          case REG_TYPE_BASE:
   152                  regno = X86_SIB_BASE(insn->sib.value);
   153                  if (X86_REX_B(insn->rex_prefix.value) = 1)
   154                          regno += 8;
   155                  break;
   156  
   157          default:
   158                  pr_err("invalid register type");
   159                  BUG();
   160                  break;
   161          }

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-19  5:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-19  5:22 x86, mpx: Decode MPX instruction to get bound violation information Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2015-05-18 12:32 Dan Carpenter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).