linux_dsm_epyc7002/arch/x86/lib
Masami Hiramatsu 12cb908a11 x86/insn-eval: Use new for_each_insn_prefix() macro to loop over prefixes bytes
Since insn.prefixes.nbytes can be bigger than the size of
insn.prefixes.bytes[] when a prefix is repeated, the proper check must
be

  insn.prefixes.bytes[i] != 0 and i < 4

instead of using insn.prefixes.nbytes. Use the new
for_each_insn_prefix() macro which does it correctly.

Debugged by Kees Cook <keescook@chromium.org>.

 [ bp: Massage commit message. ]

Fixes: 32d0b95300 ("x86/insn-eval: Add utility functions to get segment selector")
Reported-by: syzbot+9b64b619f10f19d19a7c@syzkaller.appspotmail.com
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: stable@vger.kernel.org
Link: https://lkml.kernel.org/r/160697104969.3146288.16329307586428270032.stgit@devnote2
2020-12-06 10:03:08 +01:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
atomic64_32.c
atomic64_386_32.S
atomic64_cx8_32.S
cache-smp.c
checksum_32.S i386: propagate the calling conventions change down to csum_partial_copy_generic() 2020-08-20 15:45:18 -04:00
clear_page_64.S
cmdline.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
cmpxchg8b_emu.S
cmpxchg16b_emu.S
copy_mc_64.S x86/copy_mc: Introduce copy_mc_enhanced_fast_string() 2020-10-06 11:37:36 +02:00
copy_mc.c x86/copy_mc: Introduce copy_mc_enhanced_fast_string() 2020-10-06 11:37:36 +02:00
copy_page_64.S
copy_user_64.S x86/mce: Avoid tail copy when machine check terminated a copy from user 2020-10-07 11:26:56 +02:00
cpu.c
csum-copy_64.S amd64: switch csum_partial_copy_generic() to new calling conventions 2020-08-20 15:45:22 -04:00
csum-partial_64.c
csum-wrappers_64.c amd64: switch csum_partial_copy_generic() to new calling conventions 2020-08-20 15:45:22 -04:00
delay.c x86/delay: Introduce TPAUSE delay 2020-05-07 16:06:20 +02:00
error-inject.c
getuser.S Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-22 09:59:21 -07:00
hweight.S
inat.c
insn-eval.c x86/insn-eval: Use new for_each_insn_prefix() macro to loop over prefixes bytes 2020-12-06 10:03:08 +01:00
insn.c
iomap_copy_64.S
iomem.c
kaslr.c
Makefile * Extend the recovery from MCE in kernel space also to processes which 2020-10-12 10:14:38 -07:00
memcpy_32.c
memcpy_64.S x86/lib: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S 2020-11-04 12:30:20 +01:00
memmove_64.S x86/lib: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S 2020-11-04 12:30:20 +01:00
memset_64.S x86/lib: Change .weak to SYM_FUNC_START_WEAK for arch/x86/lib/mem*_64.S 2020-11-04 12:30:20 +01:00
misc.c
mmx_32.c
msr-reg-export.c
msr-reg.S
msr-smp.c
msr.c
putuser.S Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2020-10-22 09:59:21 -07:00
retpoline.S x86/retpoline: Fix retpoline unwind 2020-04-30 20:14:34 +02:00
string_32.c
strstr_32.c
usercopy_32.c
usercopy_64.c * Extend the recovery from MCE in kernel space also to processes which 2020-10-12 10:14:38 -07:00
usercopy.c
x86-opcode-map.txt x86/insn: Add Control-flow Enforcement (CET) instructions to the opcode map 2020-03-26 12:21:40 +01:00