forked fromtorvalds/linux
- Notifications
You must be signed in to change notification settings - Fork0
Commit84da009
x86/sev-es: Use new for_each_insn_prefix() macro to loop over prefixes bytes
Since insn.prefixes.nbytes can be bigger than the size ofinsn.prefixes.bytes[] when a prefix is repeated, the propercheck must be: insn.prefixes.bytes[i] != 0 and i < 4instead of using insn.prefixes.nbytes. Use the newfor_each_insn_prefix() macro which does it correctly.Debugged by Kees Cook <keescook@chromium.org>. [ bp: Massage commit message. ]Fixes:25189d0 ("x86/sev-es: Add support for handling IOIO exceptions")Reported-by: syzbot+9b64b619f10f19d19a7c@syzkaller.appspotmail.comSigned-off-by: Masami Hiramatsu <mhiramat@kernel.org>Signed-off-by: Borislav Petkov <bp@suse.de>Link:https://lkml.kernel.org/r/160697106089.3146288.2052422845039649176.stgit@devnote21 parent12cb908 commit84da009
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 40 | + | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
0 commit comments
Comments
(0)