diff options
author | Peter Zijlstra <peterz@infradead.org> | 2021-03-26 16:12:00 +0100 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2021-03-31 16:20:22 +0200 |
commit | 52fa82c21f64e900a72437269a5cc9e0034b424e (patch) | |
tree | b2a122854db8fa1ed6adc80be5e5dee1dc3ab22f /arch/x86/kernel/alternative.c | |
parent | 2304d14db6595bea5292bece06c4c625b12d8f89 (diff) | |
download | lwn-52fa82c21f64e900a72437269a5cc9e0034b424e.tar.gz lwn-52fa82c21f64e900a72437269a5cc9e0034b424e.zip |
x86: Add insn_decode_kernel()
Add a helper to decode kernel instructions; there's no point in
endlessly repeating those last two arguments.
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lkml.kernel.org/r/20210326151259.379242587@infradead.org
Diffstat (limited to 'arch/x86/kernel/alternative.c')
-rw-r--r-- | arch/x86/kernel/alternative.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kernel/alternative.c b/arch/x86/kernel/alternative.c index ce28c5c1deba..ff359b3a30e7 100644 --- a/arch/x86/kernel/alternative.c +++ b/arch/x86/kernel/alternative.c @@ -1280,7 +1280,7 @@ static void text_poke_loc_init(struct text_poke_loc *tp, void *addr, if (!emulate) emulate = opcode; - ret = insn_decode(&insn, emulate, MAX_INSN_SIZE, INSN_MODE_KERN); + ret = insn_decode_kernel(&insn, emulate); BUG_ON(ret < 0); BUG_ON(len != insn.length); |