Skip to content

Commit c4f39a6

Browse files
cavokzrafaeljw
authored andcommitted
PM: hibernate: Split off snapshot dev option
Make it possible to reduce the attack surface in case the snapshot device is not to be used from userspace. Signed-off-by: Domenico Andreoli <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent ab7e9b0 commit c4f39a6

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

kernel/power/Kconfig

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,18 @@ config HIBERNATION
8080

8181
For more information take a look at <file:Documentation/power/swsusp.rst>.
8282

83+
config HIBERNATION_SNAPSHOT_DEV
84+
bool "Userspace snapshot device"
85+
depends on HIBERNATION
86+
default y
87+
---help---
88+
Device used by the uswsusp tools.
89+
90+
Say N if no snapshotting from userspace is needed, this also
91+
reduces the attack surface of the kernel.
92+
93+
If in doubt, say Y.
94+
8395
config PM_STD_PARTITION
8496
string "Default resume partition"
8597
depends on HIBERNATION

kernel/power/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ obj-$(CONFIG_VT_CONSOLE_SLEEP) += console.o
1010
obj-$(CONFIG_FREEZER) += process.o
1111
obj-$(CONFIG_SUSPEND) += suspend.o
1212
obj-$(CONFIG_PM_TEST_SUSPEND) += suspend_test.o
13-
obj-$(CONFIG_HIBERNATION) += hibernate.o snapshot.o swap.o user.o
13+
obj-$(CONFIG_HIBERNATION) += hibernate.o snapshot.o swap.o
14+
obj-$(CONFIG_HIBERNATION_SNAPSHOT_DEV) += user.o
1415
obj-$(CONFIG_PM_AUTOSLEEP) += autosleep.o
1516
obj-$(CONFIG_PM_WAKELOCKS) += wakelock.o
1617

0 commit comments

Comments
 (0)