linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <dave@sr71.net>
To: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
Cc: linux-kernel@vger.kernel.org, dave.hansen@linux.intel.com,
	x86@kernel.org, a.p.zijlstra@chello.nl, paulus@samba.org,
	acme@kernel.org, jkenisto@us.ibm.com, srikar@linux.vnet.ibm.com,
	tglx@linutronix.de, ananth@in.ibm.com,
	anil.s.keshavamurthy@intel.com, davem@davemloft.net
Subject: Re: [PATCH] x86: remove arbitrary instruction size limit in instruction decoder
Date: Mon, 17 Nov 2014 12:49:46 -0800	[thread overview]
Message-ID: <546A5F6A.7070704@sr71.net> (raw)
In-Reply-To: <5464C4FD.60705@hitachi.com>

On 11/13/2014 06:49 AM, Masami Hiramatsu wrote:
> (2014/11/13 7:53), Dave Hansen wrote:
>> The kprobes code probably needs to be looked at here a bit more
>> carefully.  This patch still respects the MAX_INSN_SIZE limit
>> there but the kprobes code does look like it might be able to
>> be a bit more strict than it currently is.
> 
> Would you mean kprobes can copy shorter? Maybe, but I think current
> one is enough because it is on a cold path.
> OK, at least this looks good to me.

As it stands now, if you happened to be decoding an instruction which is
short and it was *JUST* before a memory hole, I think it could oops the
kernel.

This doesn't look like it is very common (or maybe even possible) in
practice.

>> Note: the v10 version of the MPX patches I just posted depends
>> on this patch.
> 
> BTW, current insn decoder doesn't support MPX... That should be
> updated (add bnd* to x86-insn-map.txt)

I think they're in there already:

> grep -i bnd arch/x86/lib/x86-opcode-map.txt
1a: BNDCL Ev,Gv | BNDCU Ev,Gv | BNDMOV Gv,Ev | BNDLDX Gv,Ev,Gv
1b: BNDCN Ev,Gv | BNDMOV Ev,Gv | BNDMK Gv,Ev | BNDSTX Ev,GV,Gv

Or were there others you were thinking of?

  reply	other threads:[~2014-11-17 20:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-12 22:53 [PATCH] x86: remove arbitrary instruction size limit in instruction decoder Dave Hansen
2014-11-13  1:43 ` Peter Zijlstra
2014-11-13 14:49 ` Masami Hiramatsu
2014-11-17 20:49   ` Dave Hansen [this message]
2014-11-17 22:16     ` Masami Hiramatsu
2014-11-14  0:20 ` Jim Keniston

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=546A5F6A.7070704@sr71.net \
    --to=dave@sr71.net \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=ananth@in.ibm.com \
    --cc=anil.s.keshavamurthy@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=jkenisto@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=masami.hiramatsu.pt@hitachi.com \
    --cc=paulus@samba.org \
    --cc=srikar@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=x86@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;
as well as URLs for NNTP newsgroup(s).