Commit b0d1bf27 authored by Zheng Yejian's avatar Zheng Yejian
Browse files

Revert "x86/insn: Make insn_complete() static"

hulk inclusion
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8MGE6


CVE: NA

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

This reverts commit f935178b.
insn_complete() is still used by function of livepatch without ftrace.

Signed-off-by: default avatarZheng Yejian <zhengyejian1@huawei.com>
parent 601dd19c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -180,6 +180,13 @@ static inline int insn_has_emulate_prefix(struct insn *insn)
	return !!insn->emulate_prefix_size;
}

/* Ensure this instruction is decoded completely */
static inline int insn_complete(struct insn *insn)
{
	return insn->opcode.got && insn->modrm.got && insn->sib.got &&
		insn->displacement.got && insn->immediate.got;
}

static inline insn_byte_t insn_vex_m_bits(struct insn *insn)
{
	if (insn->vex_prefix.nbytes == 2)	/* 2 bytes VEX */
+0 −7
Original line number Diff line number Diff line
@@ -715,13 +715,6 @@ int insn_get_length(struct insn *insn)
	return 0;
}

/* Ensure this instruction is decoded completely */
static inline int insn_complete(struct insn *insn)
{
	return insn->opcode.got && insn->modrm.got && insn->sib.got &&
		insn->displacement.got && insn->immediate.got;
}

/**
 * insn_decode() - Decode an x86 instruction
 * @insn:	&struct insn to be initialized
+7 −0
Original line number Diff line number Diff line
@@ -180,6 +180,13 @@ static inline int insn_has_emulate_prefix(struct insn *insn)
	return !!insn->emulate_prefix_size;
}

/* Ensure this instruction is decoded completely */
static inline int insn_complete(struct insn *insn)
{
	return insn->opcode.got && insn->modrm.got && insn->sib.got &&
		insn->displacement.got && insn->immediate.got;
}

static inline insn_byte_t insn_vex_m_bits(struct insn *insn)
{
	if (insn->vex_prefix.nbytes == 2)	/* 2 bytes VEX */
+0 −7
Original line number Diff line number Diff line
@@ -715,13 +715,6 @@ int insn_get_length(struct insn *insn)
	return 0;
}

/* Ensure this instruction is decoded completely */
static inline int insn_complete(struct insn *insn)
{
	return insn->opcode.got && insn->modrm.got && insn->sib.got &&
		insn->displacement.got && insn->immediate.got;
}

/**
 * insn_decode() - Decode an x86 instruction
 * @insn:	&struct insn to be initialized