[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220225004940.vjchjwghtf3laolu@treble>
Date: Thu, 24 Feb 2022 16:49:40 -0800
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: x86@...nel.org, joao@...rdrivepizza.com, hjl.tools@...il.com,
andrew.cooper3@...rix.com, linux-kernel@...r.kernel.org,
ndesaulniers@...gle.com, keescook@...omium.org,
samitolvanen@...gle.com, mark.rutland@....com,
alyssa.milburn@...el.com, mbenes@...e.cz, rostedt@...dmis.org,
mhiramat@...nel.org, alexei.starovoitov@...il.com
Subject: Re: [PATCH v2 24/39] x86/text-patching: Make text_gen_insn() IBT
aware
On Thu, Feb 24, 2022 at 03:52:02PM +0100, Peter Zijlstra wrote:
> + /*
> + * Hide the addresses to avoid the compiler folding in constants when
> + * referencing code, these can mess up annotations like
> + * ANNOTATE_NOENDBR.
> + */
> + OPTIMIZER_HIDE_VAR(addr);
> + OPTIMIZER_HIDE_VAR(dest);
> +
> +#ifdef CONFIG_X86_KERNEL_IBT
> + if (is_endbr(*(u32 *)dest))
> + dest += 4;
> +#endif
Another unnecessary ifdef.
--
Josh
Powered by blists - more mailing lists