From: Josh Poimboeuf <jpoimboe@kernel.org>
To: x86@kernel.org
Cc: Peter Zijlstra <peterz@infradead.org>,
Mark Rutland <mark.rutland@arm.com>,
live-patching@vger.kernel.org,
Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH 0/6] x86,objtool: Split UNWIND_HINT_EMPTY in two
Date: Wed, 1 Mar 2023 07:13:06 -0800 [thread overview]
Message-ID: <cover.1677683419.git.jpoimboe@kernel.org> (raw)
Based on tip/objtool/core.
Mark reported that the ORC unwinder incorrectly marks an unwind as
reliable when the unwind terminates prematurely in the dark corners of
return_to_handler() due to lack of information about the next frame.
The problem is UNWIND_HINT_EMPTY is used in two different situations:
end-of-stack marker and undefined stack state.
Split it up into UNWIND_HINT_END_OF_STACK and UNWIND_HINT_UNDEFINED.
Josh Poimboeuf (6):
objtool: Add objtool_types.h
objtool: Use relative pointers for annotations
objtool: Change UNWIND_HINT() argument order
x86,objtool: Introduce ORC_TYPE_*
x86,objtool: Separate unret validation from unwind hints
x86,objtool: Split UNWIND_HINT_EMPTY in two
.../livepatch/reliable-stacktrace.rst | 2 +-
MAINTAINERS | 2 +-
arch/x86/entry/entry_64.S | 26 +--
arch/x86/include/asm/nospec-branch.h | 14 +-
arch/x86/include/asm/orc_types.h | 12 +-
arch/x86/include/asm/unwind_hints.h | 18 +-
arch/x86/kernel/ftrace_64.S | 2 +-
arch/x86/kernel/head_64.S | 17 +-
arch/x86/kernel/relocate_kernel_64.S | 10 +-
arch/x86/kernel/unwind_orc.c | 27 ++-
arch/x86/lib/retpoline.S | 6 +-
arch/x86/platform/pvh/head.S | 2 +-
arch/x86/xen/xen-asm.S | 4 +-
arch/x86/xen/xen-head.S | 4 +-
include/linux/objtool.h | 81 +++----
include/linux/objtool_types.h | 57 +++++
scripts/sorttable.h | 2 +-
tools/arch/x86/include/asm/orc_types.h | 12 +-
tools/include/linux/objtool.h | 200 ------------------
tools/include/linux/objtool_types.h | 57 +++++
tools/objtool/check.c | 69 ++++--
tools/objtool/include/objtool/check.h | 4 +-
tools/objtool/orc_dump.c | 15 +-
tools/objtool/orc_gen.c | 43 ++--
tools/objtool/sync-check.sh | 2 +-
25 files changed, 314 insertions(+), 374 deletions(-)
create mode 100644 include/linux/objtool_types.h
delete mode 100644 tools/include/linux/objtool.h
create mode 100644 tools/include/linux/objtool_types.h
--
2.39.1
next reply other threads:[~2023-03-01 15:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-01 15:13 Josh Poimboeuf [this message]
2023-03-01 15:13 ` [PATCH 1/6] objtool: Add objtool_types.h Josh Poimboeuf
2023-03-01 15:13 ` [PATCH 2/6] objtool: Use relative pointers for annotations Josh Poimboeuf
2023-03-01 15:13 ` [PATCH 3/6] objtool: Change UNWIND_HINT() argument order Josh Poimboeuf
2023-03-01 15:13 ` [PATCH 4/6] x86,objtool: Introduce ORC_TYPE_* Josh Poimboeuf
2023-03-01 15:13 ` [PATCH 5/6] x86,objtool: Separate unret validation from unwind hints Josh Poimboeuf
2023-03-01 15:13 ` [PATCH 6/6] x86,objtool: Split UNWIND_HINT_EMPTY in two Josh Poimboeuf
2023-03-01 17:34 ` Steven Rostedt
2023-03-23 12:38 ` [PATCH 0/6] " 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=cover.1677683419.git.jpoimboe@kernel.org \
--to=jpoimboe@kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=x86@kernel.org \
/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