Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

objtool: Properly disable uaccess validation

If opts.uaccess isn't set, the uaccess validation is disabled, but only
partially: it doesn't read the uaccess_safe_builtin list but still tries
to do the validation. Disable it completely to prevent false warnings.

Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: https://lore.kernel.org/r/0e95581c1d2107fb5f59418edf2b26bba38b0cbb.1742852846.git.jpoimboe@kernel.org

authored by

Josh Poimboeuf and committed by
Ingo Molnar
e1a9dda7 6b023c78

+9 -2
+9 -2
tools/objtool/check.c
··· 3187 3187 if (update_cfi_state(insn, next_insn, &state->cfi, op)) 3188 3188 return 1; 3189 3189 3190 - if (!insn->alt_group) 3190 + if (!opts.uaccess || !insn->alt_group) 3191 3191 continue; 3192 3192 3193 3193 if (op->dest.type == OP_DEST_PUSHF) { ··· 3647 3647 return 0; 3648 3648 3649 3649 case INSN_STAC: 3650 + if (!opts.uaccess) 3651 + break; 3652 + 3650 3653 if (state.uaccess) { 3651 3654 WARN_INSN(insn, "recursive UACCESS enable"); 3652 3655 return 1; ··· 3659 3656 break; 3660 3657 3661 3658 case INSN_CLAC: 3659 + if (!opts.uaccess) 3660 + break; 3661 + 3662 3662 if (!state.uaccess && func) { 3663 3663 WARN_INSN(insn, "redundant UACCESS disable"); 3664 3664 return 1; ··· 4120 4114 if (!insn || insn->visited) 4121 4115 return 0; 4122 4116 4123 - state->uaccess = sym->uaccess_safe; 4117 + if (opts.uaccess) 4118 + state->uaccess = sym->uaccess_safe; 4124 4119 4125 4120 ret = validate_branch(file, insn_func(insn), insn, *state); 4126 4121 if (ret)