|
|
Subscribe / Log in / New account

Support intra-function call validation

From:  Rui Qi <qirui.001-AT-bytedance.com>
To:  bp-AT-alien8.de, mingo-AT-redhat.com, tglx-AT-linutronix.de, hpa-AT-zytor.com, jpoimboe-AT-redhat.com, peterz-AT-infradead.org, mbenes-AT-suse.cz, gregkh-AT-linuxfoundation.org, stable-AT-vger.kernel.org, alexandre.chartre-AT-oracle.com
Subject:  [PATCH 0/3] Support intra-function call validation
Date:  Mon, 26 Feb 2024 17:49:22 +0800
Message-ID:  <20240226094925.95835-1-qirui.001@bytedance.com>
Cc:  x86-AT-kernel.org, linux-kernel-AT-vger.kernel.org, Rui Qi <qirui.001-AT-bytedance.com>
Archive-link:  Article

Since kernel version 5.4.250 LTS, there has been an issue with the kernel live patching feature becoming unavailable. When compiling the sample code for kernel live patching, the following message is displayed when enabled:

livepatch: klp_check_stack: kworker/u256:6:23490 has an unreliable stack

After investigation, it was found that this is due to objtool not supporting intra-function calls, resulting in incorrect orc entry generation.

This patchset adds support for intra-function calls, allowing the kernel live patching feature to work correctly.

Alexandre Chartre (2):
  objtool: is_fentry_call() crashes if call has no destination
  objtool: Add support for intra-function calls

Rui Qi (1):
  x86/speculation: Support intra-function call validation

 arch/x86/include/asm/nospec-branch.h          |  7 ++
 include/linux/frame.h                         | 11 ++++
 .../Documentation/stack-validation.txt        |  8 +++
 tools/objtool/arch/x86/decode.c               |  6 ++
 tools/objtool/check.c                         | 64 +++++++++++++++++--
 5 files changed, 91 insertions(+), 5 deletions(-)

-- 
2.39.2 (Apple Git-143)




Copyright © 2024, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds