From: sashiko-bot@kernel.org
To: "Ben Cressey" <ben@cressey.dev>,
"Catalin Marinas" <catalin.marinas@arm.com>,
"Will Deacon" <will@kernel.org>,
"Mark Rutland" <mark.rutland@arm.com>,
"Pasha Tatashin" <pasha.tatashin@soleen.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
"Pavel Machek" <pavel@kernel.org>
Cc: "Kees Cook" <kees@kernel.org>,
"Sami Tolvanen" <samitolvanen@google.com>,
kexec@lists.infradead.org,
"Nathan Chancellor" <nathan@kernel.org>,
"Zhaoyang Huang" <zhaoyang.huang@unisoc.com>,
"Jeson Gao" <jeson.gao@unisoc.com>
Subject: Re: [PATCH v2 2/2] arm64: hibernate: use a typed entry to drop __nocfi
Date: Wed, 11 Nov 2026 23:43:10 +0000 [thread overview]
Message-ID: <sashiko-outbox-209863@kernel.org> (raw)
In-Reply-To: <20261111-arm64-kexec-nocfi-v2-2-ddf0c4aa326f@cressey.dev>
> swsusp_arch_resume() calls the safe page's copy of
> swsusp_arch_suspend_exit() indirectly, without a kCFI check. The MMU is
> on at the call and TTBR0 maps only that page. The copy starts at the
> page's first byte, so the check's load of the type hash in front of it
> would fault. SYM_CODE_START() also gives the routine no hash.
> Commit e2f8216ca2d8 ("arm64: Set __nocfi on swsusp_arch_resume()")
> disabled the check "for now", since the entry had to be first
> in .hibernate_exit.text.
>
> SYM_TYPED_FUNC_START() emits the hash inside that section, and
> create_safe_exec_page() already copies the whole section, at most 4 KiB,
> to the page's start, so the page holds both hash and entry. Relax the
> linker script's ASSERT, so the entry need only be in the section.
>
> Fix by typing the routine, with a C prototype, entering the copy at the
> symbol's offset in the section, and dropping __nocfi.
>
> Suggested-by: Mark Rutland <mark.rutland@arm.com>
> Link: https://lore.kernel.org/linux-arm-kernel/arZSe8hNnRPM5FqY@J2N7QTR9R3.cambridge.arm.com/
> Signed-off-by: Ben Cressey <ben@cressey.dev>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261111-arm64-kexec-nocfi-v2-0-ddf0c4aa326f@cressey.dev?part=2
prev parent reply other threads:[~2026-11-11 23:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 23:26 [PATCH v2 0/2] arm64: use typed entries into copied code for kCFI Ben Cressey
2026-11-11 23:26 ` [PATCH v2 1/2] arm64: kexec: use a typed entry to fix kCFI oops Ben Cressey
2026-11-11 23:42 ` sashiko-bot
2026-11-11 23:26 ` [PATCH v2 2/2] arm64: hibernate: use a typed entry to drop __nocfi Ben Cressey
2026-11-11 23:43 ` sashiko-bot [this message]
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=sashiko-outbox-209863@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=ben@cressey.dev \
--cc=catalin.marinas@arm.com \
--cc=jeson.gao@unisoc.com \
--cc=kees@kernel.org \
--cc=kexec@lists.infradead.org \
--cc=mark.rutland@arm.com \
--cc=nathan@kernel.org \
--cc=pasha.tatashin@soleen.com \
--cc=pavel@kernel.org \
--cc=rafael@kernel.org \
--cc=samitolvanen@google.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=will@kernel.org \
--cc=zhaoyang.huang@unisoc.com \
/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