From: Peter Zijlstra <peterz@infradead.org>
To: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Josh Poimboeuf <jpoimboe@kernel.org>,
Nathan Chancellor <nathan@kernel.org>,
Nick Desaulniers <ndesaulniers@google.com>,
Bill Wendling <morbo@google.com>,
Justin Stitt <justinstitt@google.com>,
Julien Thierry <jthierry@redhat.com>,
Miroslav Benes <mbenes@suse.cz>,
Raphael Gault <raphael.gault@arm.com>,
Michael Ellerman <mpe@ellerman.id.au>,
Nicholas Piggin <npiggin@gmail.com>,
Naveen N Rao <naveen@kernel.org>,
Madhavan Srinivasan <maddy@linux.ibm.com>,
linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
llvm@lists.linux.dev
Subject: Re: [PATCH v5 12/15] objtool: Add support for more complex UACCESS control
Date: Thu, 16 Jan 2025 10:28:32 +0100 [thread overview]
Message-ID: <20250116092832.GG8362@noisy.programming.kicks-ass.net> (raw)
In-Reply-To: <64a6921ec7bc78c4b25561cf13e8147f26e884a6.1736955567.git.christophe.leroy@csgroup.eu>
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.
next prev parent reply other threads:[~2025-01-16 9:28 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 22:42 [PATCH v5 00/15] powerpc/objtool: uaccess validation for PPC32 (v5) Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 01/15] objtool: Fix generic annotation infrastructure cross build Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 02/15] objtool: Move back misplaced comment Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 03/15] objtool: Allow an architecture to disable objtool on ASM files Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 04/15] objtool: Fix JUMP_ENTRY_SIZE for bi-arch like powerpc Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 05/15] objtool: Add INSN_RETURN_CONDITIONAL Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 06/15] objtool: Add support for relative switch tables Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 07/15] objtool: Merge mark_func_jump_tables() and add_func_jump_tables() Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 08/15] objtool: Track general purpose register used for switch table base Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 09/15] objtool: Find end of switch table directly Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 10/15] objtool: When looking for switch tables also follow conditional and dynamic jumps Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 11/15] objtool: .rodata.cst{2/4/8/16} are not switch tables Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 12/15] objtool: Add support for more complex UACCESS control Christophe Leroy
2025-01-16 9:28 ` Peter Zijlstra [this message]
2025-01-15 22:42 ` [PATCH v5 13/15] objtool: Prepare noreturns.h for more architectures Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 14/15] powerpc/bug: Annotate reachable after warning trap Christophe Leroy
2025-01-15 22:42 ` [PATCH v5 15/15] powerpc: Implement UACCESS validation on PPC32 Christophe Leroy
2025-01-16 6:25 ` [PATCH v5 00/15] powerpc/objtool: uaccess validation for PPC32 (v5) Christophe Leroy
2025-01-16 9:38 ` Peter Zijlstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250116092832.GG8362@noisy.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=christophe.leroy@csgroup.eu \
--cc=jpoimboe@kernel.org \
--cc=jthierry@redhat.com \
--cc=justinstitt@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=llvm@lists.linux.dev \
--cc=maddy@linux.ibm.com \
--cc=mbenes@suse.cz \
--cc=morbo@google.com \
--cc=mpe@ellerman.id.au \
--cc=nathan@kernel.org \
--cc=naveen@kernel.org \
--cc=ndesaulniers@google.com \
--cc=npiggin@gmail.com \
--cc=raphael.gault@arm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).