Re: [PATCH v5 12/15] objtool: Add support for more complex UACCESS control
From: Peter Zijlstra <peterz@infradead.org>
Date: 2025-01-16 09:28:43
Also in:
lkml, llvm
From: Peter Zijlstra <peterz@infradead.org>
Date: 2025-01-16 09:28:43
Also in:
lkml, llvm
On Wed, Jan 15, 2025 at 11:42:52PM +0100, Christophe Leroy wrote:
diff --git a/tools/objtool/check.c b/tools/objtool/check.c index 91436f4b3622..54625f09d831 100644 --- a/tools/objtool/check.c +++ b/tools/objtool/check.c@@ -2422,6 +2422,14 @@ static int __annotate_late(struct objtool_file *file, int type, struct instructi insn->dead_end = false; break; + case ANNOTYPE_UACCESS_BEGIN: + insn->type = INSN_STAC; + break; + + case ANNOTYPE_UACCESS_END: + insn->type = INSN_CLAC; + break;
I would feel better if this had something like: if (insn->type != INSN_OTHER) WARN_INSN(insn, "over-riding instruction type: %d", insn->type); Adding these annotations to control flow instruction would be bad etc.