x86/kprobes: Use switch-case for 0xFF opcodes in prepare_emulation
authorChuang Wang <nashuiliang@gmail.com>
Tue, 29 Nov 2022 08:39:51 +0000 (16:39 +0800)
committerIngo Molnar <mingo@kernel.org>
Tue, 10 Jan 2023 11:37:14 +0000 (12:37 +0100)
commit9fcad995c6c52cc9791f7ee9f1386a5684055f9c
tree59debf93ae4d59458c437d624b16ac4da9d78d7f
parent7bdb1767bf011c7f6065ac483ad2f00e434c3979
x86/kprobes: Use switch-case for 0xFF opcodes in prepare_emulation

For the `FF /digit` opcodes in prepare_emulation, use switch-case
instead of hand-written code to make the logic easier to understand.

Signed-off-by: Chuang Wang <nashuiliang@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Link: https://lore.kernel.org/r/20221129084022.718355-1-nashuiliang@gmail.com
arch/x86/kernel/kprobes/core.c