diff options
-rw-r--r-- | tools/objtool/check.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index cb66e6b16841..b0ef14a5b1ff 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c @@ -3187,7 +3187,7 @@ static int handle_insn_ops(struct instruction *insn, if (update_cfi_state(insn, next_insn, &state->cfi, op)) return 1; - if (!insn->alt_group) + if (!opts.uaccess || !insn->alt_group) continue; if (op->dest.type == OP_DEST_PUSHF) { @@ -3647,6 +3647,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, return 0; case INSN_STAC: + if (!opts.uaccess) + break; + if (state.uaccess) { WARN_INSN(insn, "recursive UACCESS enable"); return 1; @@ -3656,6 +3659,9 @@ static int validate_branch(struct objtool_file *file, struct symbol *func, break; case INSN_CLAC: + if (!opts.uaccess) + break; + if (!state.uaccess && func) { WARN_INSN(insn, "redundant UACCESS disable"); return 1; @@ -4114,7 +4120,8 @@ static int validate_symbol(struct objtool_file *file, struct section *sec, if (!insn || insn->visited) return 0; - state->uaccess = sym->uaccess_safe; + if (opts.uaccess) + state->uaccess = sym->uaccess_safe; ret = validate_branch(file, insn_func(insn), insn, *state); if (ret) |