Skip to content
Commit e9b8e266 authored by Peter Zijlstra's avatar Peter Zijlstra Committed by Greg Kroah-Hartman
Browse files

x86/ibt: Suppress spurious ENDBR



[ Upstream commit 25e73b7e ]

It was reported that under certain circumstances GCC emits ENDBR
instructions for _THIS_IP_ usage. Specifically, when it appears at the
start of a basic block -- but not elsewhere.

Since _THIS_IP_ is never used for control flow, these ENDBR
instructions are completely superfluous. Override the _THIS_IP_
definition for x86_64 to avoid this.

Less ENDBR instructions is better.

Fixes: 156ff4a5 ("x86/ibt: Base IBT bits")
Reported-by: default avatarDavid Kaplan <David.Kaplan@amd.com>
Reviewed-by: default avatarAndrew Cooper <andrew.cooper3@citrix.com>
Signed-off-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20230802110323.016197440@infradead.org


Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 03425393
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment