live-patching.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] x86,objtool: Split UNWIND_HINT_EMPTY in two
@ 2023-03-01 15:13 Josh Poimboeuf
  2023-03-01 15:13 ` [PATCH 1/6] objtool: Add objtool_types.h Josh Poimboeuf
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Josh Poimboeuf @ 2023-03-01 15:13 UTC (permalink / raw)
  To: x86; +Cc: Peter Zijlstra, Mark Rutland, live-patching, Steven Rostedt

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-03-23 12:38 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-01 15:13 [PATCH 0/6] x86,objtool: Split UNWIND_HINT_EMPTY in two Josh Poimboeuf
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

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).