Linux Hardening
 help / color / mirror / Atom feed
From: Karl Mehltretter <kmehltretter@gmail.com>
To: Kees Cook <kees@kernel.org>
Cc: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
	"Linus Walleij" <linusw@kernel.org>,
	"Nathan Chancellor" <nathan@kernel.org>,
	"Sami Tolvanen" <samitolvanen@google.com>,
	"Zhen Lei" <thunder.leizhen@huawei.com>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Michał Pecio" <michal.pecio@gmail.com>,
	"Sebastian Andrzej Siewior" <bigeasy@linutronix.de>,
	linux-arm-kernel@lists.infradead.org,
	"Russell King" <linux@armlinux.org.uk>,
	"Will Deacon" <will@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Nick Desaulniers" <ndesaulniers@google.com>,
	"Bill Wendling" <morbo@google.com>,
	"Justin Stitt" <justinstitt@google.com>,
	linux-kernel@vger.kernel.org, llvm@lists.linux.dev,
	linux-hardening@vger.kernel.org
Subject: Re: [PATCH v3] ARM: traps: Implement KCFI trap handler for ARM32
Date: Mon, 27 Jul 2026 02:10:19 +0200	[thread overview]
Message-ID: <amafzynVg0_hlOZN@gmail.com> (raw)
In-Reply-To: <20260715175223.make.153-kees@kernel.org>

On Wed, Jul 15, 2026 at 10:52:27AM +0100, Kees Cook wrote:
> +bool arm_cfi_handle_failure(struct pt_regs *regs, enum bug_trap_type type)
> +{
> +	switch (type) {
> +	case BUG_TRAP_TYPE_BUG:
> +		die("Oops - CFI", regs, 0);
> +		break;
> +	case BUG_TRAP_TYPE_WARN:
> +		/* Permissive mode: skip the trapping instruction and continue. */
> +		instruction_pointer(regs) += 4;
> +		break;

On Thumb-2, Clang emits a 16-bit BKPT for CFI checks.
This skips the following Thumb instruction.

Thanks,
Karl

  parent reply	other threads:[~2026-07-27  0:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-15 17:52 [PATCH v3] ARM: traps: Implement KCFI trap handler for ARM32 Kees Cook
2026-07-21  0:11 ` Nathan Chancellor
2026-07-21  7:54 ` Linus Walleij
2026-07-21 16:15   ` Nick Desaulniers
2026-07-27  0:10 ` Karl Mehltretter [this message]
2026-07-27  1:28 ` Karl Mehltretter
2026-07-27  1:37 ` Karl Mehltretter

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=amafzynVg0_hlOZN@gmail.com \
    --to=kmehltretter@gmail.com \
    --cc=arnd@arndb.de \
    --cc=bigeasy@linutronix.de \
    --cc=justinstitt@google.com \
    --cc=kees@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-hardening@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=llvm@lists.linux.dev \
    --cc=mark.rutland@arm.com \
    --cc=michal.pecio@gmail.com \
    --cc=morbo@google.com \
    --cc=nathan@kernel.org \
    --cc=ndesaulniers@google.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=samitolvanen@google.com \
    --cc=thunder.leizhen@huawei.com \
    --cc=will@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