From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Ian Jackson <Ian.Jackson@eu.citrix.com>,
Wei Liu <wei.liu2@citrix.com>
Subject: [PATCH v2 for-4.9 6/7] tools/insn-fuzz: Provide IA32_DEBUGCTL consistently to the emulator
Date: Wed, 5 Apr 2017 18:53:32 +0100 [thread overview]
Message-ID: <1491414813-30003-7-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1491414813-30003-1-git-send-email-andrew.cooper3@citrix.com>
x86_emulates()'s is_branch_step() performs a speculative read of
IA32_DEBUGCTL, but doesn't squash exceptions should they arise. In reality,
this MSR is always available.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
---
CC: George Dunlap <george.dunlap@eu.citrix.com>
CC: Ian Jackson <Ian.Jackson@eu.citrix.com>
CC: Wei Liu <wei.liu2@citrix.com>
---
tools/fuzz/x86_instruction_emulator/fuzz-emul.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c
index fedeb9f..9e3a10a 100644
--- a/tools/fuzz/x86_instruction_emulator/fuzz-emul.c
+++ b/tools/fuzz/x86_instruction_emulator/fuzz-emul.c
@@ -402,7 +402,8 @@ enum {
MSRI_STAR,
MSRI_LSTAR,
MSRI_CSTAR,
- MSRI_SYSCALL_MASK
+ MSRI_SYSCALL_MASK,
+ MSRI_IA32_DEBUGCTLMSR,
};
static const unsigned int msr_index[MSR_INDEX_MAX] = {
@@ -413,7 +414,8 @@ static const unsigned int msr_index[MSR_INDEX_MAX] = {
[MSRI_STAR] = MSR_STAR,
[MSRI_LSTAR] = MSR_LSTAR,
[MSRI_CSTAR] = MSR_CSTAR,
- [MSRI_SYSCALL_MASK] = MSR_SYSCALL_MASK
+ [MSRI_SYSCALL_MASK] = MSR_SYSCALL_MASK,
+ [MSRI_IA32_DEBUGCTLMSR] = MSR_IA32_DEBUGCTLMSR,
};
static int fuzz_read_msr(
--
2.1.4
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-04-05 17:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-05 17:53 [PATCH v2 for-4.9 0/7] x86/emul: Userspace fuzzing harness fixes Andrew Cooper
2017-04-05 17:53 ` [PATCH v2 for-4.9 1/7] MAINTAINERS: Move the x86 instruction emulator under x86 maintainership Andrew Cooper
2017-04-06 9:13 ` Wei Liu
2017-04-06 11:00 ` Ian Jackson
2017-04-05 17:53 ` [PATCH v2 for-4.9 2/7] tools/insn-fuzz: Don't hit memcpy() for zero-length reads Andrew Cooper
2017-04-06 9:22 ` Jan Beulich
2017-04-05 17:53 ` [PATCH v2 for-4.9 3/7] tools/insn-fuzz: Avoid making use of static data Andrew Cooper
2017-04-05 17:53 ` [PATCH v2 for-4.9 4/7] tools/insn-fuzz: Fix a stability bug in afl-clang-fast mode Andrew Cooper
2017-04-05 17:53 ` [PATCH v2 for-4.9 5/7] tools/insn-fuzz: Correct hook prototypes, and assert() appropriate segments Andrew Cooper
2017-04-06 9:28 ` Jan Beulich
2017-04-05 17:53 ` Andrew Cooper [this message]
2017-04-05 17:53 ` [PATCH v2 for-4.9 7/7] tools/insn-fuzz: Fix assertion failures in x86_emulate_wrapper() Andrew Cooper
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=1491414813-30003-7-git-send-email-andrew.cooper3@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=george.dunlap@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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).