From: Domenico Andreoli <domenico.andreoli@linux.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>, Pavel Machek <pavel@ucw.cz>
Cc: Linux PM <linux-pm@vger.kernel.org>,
Domenico Andreoli <domenico.andreoli@linux.com>
Subject: [PATCH v2 2/2] hibernate: split snapshot dev option
Date: Fri, 01 May 2020 17:14:54 +0200 [thread overview]
Message-ID: <20200501152304.609906298@gmail.com> (raw)
In-Reply-To: 20200501151452.621900831@gmail.com
[-- Attachment #1: hibernate-split-snapshot-dev-option --]
[-- Type: text/plain, Size: 2020 bytes --]
From: Domenico Andreoli <domenico.andreoli@linux.com>
Make it possible to reduce the attack surface in case the snapshot
device is not to be used from userspace.
v2:
- the option is enabled by default (it was disabled by default)
- remove the premature "DEPRECATED" marking
- drop the redefinition of mutual exclusion helpers (in v2 they are
owned by hibernte.c) in case the option is deselected
- add the help message to the config option
Signed-off-by: Domenico Andreoli <domenico.andreoli@linux.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Linux PM <linux-pm@vger.kernel.org>
---
kernel/power/Kconfig | 12 ++++++++++++
kernel/power/Makefile | 3 ++-
2 files changed, 14 insertions(+), 1 deletion(-)
Index: b/kernel/power/Kconfig
===================================================================
--- a/kernel/power/Kconfig
+++ b/kernel/power/Kconfig
@@ -80,6 +80,18 @@ config HIBERNATION
For more information take a look at <file:Documentation/power/swsusp.rst>.
+config HIBERNATION_SNAPSHOT_DEV
+ bool "Userspace snapshot device"
+ depends on HIBERNATION
+ default y
+ ---help---
+ Device used by the uswsusp tools.
+
+ Say N if no snapshotting from userspace is needed, this also
+ reduces the attack surface of the kernel.
+
+ If in doubt, say Y.
+
config PM_STD_PARTITION
string "Default resume partition"
depends on HIBERNATION
Index: b/kernel/power/Makefile
===================================================================
--- a/kernel/power/Makefile
+++ b/kernel/power/Makefile
@@ -10,7 +10,8 @@ obj-$(CONFIG_VT_CONSOLE_SLEEP) += consol
obj-$(CONFIG_FREEZER) += process.o
obj-$(CONFIG_SUSPEND) += suspend.o
obj-$(CONFIG_PM_TEST_SUSPEND) += suspend_test.o
-obj-$(CONFIG_HIBERNATION) += hibernate.o snapshot.o swap.o user.o
+obj-$(CONFIG_HIBERNATION) += hibernate.o snapshot.o swap.o
+obj-$(CONFIG_HIBERNATION_SNAPSHOT_DEV) += user.o
obj-$(CONFIG_PM_AUTOSLEEP) += autosleep.o
obj-$(CONFIG_PM_WAKELOCKS) += wakelock.o
prev parent reply other threads:[~2020-05-01 15:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-01 15:14 [PATCH v2 0/2] hibernate: add config option for snapshot device Domenico Andreoli
2020-05-01 15:14 ` [PATCH v2 1/2] hibernate: incorporate concurrency handling Domenico Andreoli
2020-05-01 15:14 ` Domenico Andreoli [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=20200501152304.609906298@gmail.com \
--to=domenico.andreoli@linux.com \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
/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.