All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sean Rhodes <sean@starlabs.systems>
To: "Rafael J. Wysocki" <rafael@kernel.org>,
	Len Brown <lenb@kernel.org>, Pavel Machek <pavel@kernel.org>,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Evan Green <evgreen@chromium.org>, Xueqin Luo <luoxueqin@kylinos.cn>
Subject: [RFC PATCH 0/3] PM: hibernate: encrypted snapshots under lockdown
Date: Mon, 13 Jul 2026 16:39:47 +0100	[thread overview]
Message-ID: <cover.1783956835.git.sean@starlabs.systems> (raw)

This is an RFC for allowing hibernate with lockdown enabled.

The kernel still refuses plain hibernate images under lockdown. This adds an
encrypted snapshot path instead. Early userspace gives the kernel a seed, the
kernel locks it, and /dev/snapshot can then create/load encrypted images. If
that seed is not present and locked, lockdown keeps blocking hibernate as it
does today.

This is based on the older encrypted hibernate work, but with the TPM policy
pushed out of the kernel. The kernel side just handles the snapshot encryption
and the seed ABI.

Testing on Star Labs StarFighter: dmesg shows the seed was locked, S4
entry/exit, and no errors.

Sending as RFC because the ABI and early-userspace split need review before
this should be a proper v1.

Evan Green (1):
  PM: hibernate: add seed-wrapped encrypted snapshots

Sean Rhodes (2):
  PM: hibernate: permit encrypted snapshot device under lockdown
  PM: hibernate: document encrypted snapshot seed ABI

 Documentation/ABI/testing/sysfs-power   |  14 +
 Documentation/power/userland-swsusp.rst |  19 +
 include/uapi/linux/suspend_ioctls.h     |  31 +-
 kernel/power/Kconfig                    |  15 +
 kernel/power/Makefile                   |   1 +
 kernel/power/hibernate.c                |  32 +
 kernel/power/power.h                    |   2 +
 kernel/power/snapenc.c                  | 878 ++++++++++++++++++++++++
 kernel/power/snapshot.c                 |   5 +
 kernel/power/user.c                     |  94 ++-
 kernel/power/user.h                     | 133 ++++
 11 files changed, 1204 insertions(+), 20 deletions(-)
 create mode 100644 kernel/power/snapenc.c
 create mode 100644 kernel/power/user.h


base-commit: dd3210c47e8d3ac6b4e9141fc68acc03b38c0ba3
-- 
2.53.0

             reply	other threads:[~2026-07-13 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-13 15:39 Sean Rhodes [this message]
2026-07-13 15:39 ` [RFC PATCH 1/3] PM: hibernate: add seed-wrapped encrypted snapshots Sean Rhodes
2026-07-13 15:39 ` [RFC PATCH 2/3] PM: hibernate: permit encrypted snapshot device under lockdown Sean Rhodes
2026-07-13 15:39 ` [RFC PATCH 3/3] PM: hibernate: document encrypted snapshot seed ABI Sean Rhodes

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.1783956835.git.sean@starlabs.systems \
    --to=sean@starlabs.systems \
    --cc=evgreen@chromium.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=luoxueqin@kylinos.cn \
    --cc=pavel@kernel.org \
    --cc=rafael@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.