public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: x86, mpx: Decode MPX instruction to get bound violation information
Date: Thu, 19 Nov 2015 05:22:56 +0000	[thread overview]
Message-ID: <20151119052256.GW7289@mwanda> (raw)

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

             reply	other threads:[~2015-11-19  5:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-19  5:22 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-05-18 12:32 x86, mpx: Decode MPX instruction to get bound violation information Dan Carpenter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151119052256.GW7289@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox