Commit ce7f20d0 authored by Lin Yujun's avatar Lin Yujun Committed by Zheng Zengkai
Browse files

Re-add padlen to the structure alt_instr

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5QC2M


CVE: NA

--------------------------------

After optimize_nops() is optimized, redundant padlen is
deleted, and ALT_ENTRY_SIZE is reduced to 12. However,
the ALT_ENTRY_SIZE used by previously compiled .ko is
still 13. As a result, an error is reported when the
previously compiled .ko is inserted:

kernel BUG at arch/x86/kernel/alternative.c:444!
invalid opcode: 000 [#1] SMP PTI

Add 'padlen' back and change ALT_ENTRY_SIZE back to 13
to solve the problem.

Fixes: e68db6f780c6 ("x86/alternatives: Optimize optimize_nops()")

Signed-off-by: default avatarLin Yujun <linyujun809@huawei.com>
Reviewed-by: default avatarZhang Jianhua <chris.zjh@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent 055190f0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment