Skip to content

Commit

Permalink
PM: hibernate: Split off snapshot dev option
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
cavokz authored and rafaeljw committed May 19, 2020
1 parent ab7e9b0 commit c4f39a6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
12 changes: 12 additions & 0 deletions kernel/power/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion kernel/power/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ obj-$(CONFIG_VT_CONSOLE_SLEEP) += console.o
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

Expand Down

0 comments on commit c4f39a6

Please sign in to comment.