Loading kernel/power/Kconfig +10 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,16 @@ config HIBERNATION_IMAGE_REUSE For more details, refer to the description of CONFIG_HIBERNATION for booting without resuming. config HIBERNATION_SKIP_CRC bool "Skip LZO image CRC check" default n depends on HIBERNATION ---help--- Some filesystem devices may have hw based integrity checks. In this scenario, repeating the integrity check in software is unnecessary and wasteful. This config option has no effect if uncompressed hibernation images are used. config ARCH_SAVE_PAGE_KEYS bool Loading kernel/power/swap.c +6 −4 Original line number Diff line number Diff line Loading @@ -606,6 +606,7 @@ static int crc32_threadfn(void *data) } atomic_set(&d->ready, 0); if (!IS_ENABLED(CONFIG_HIBERNATION_SKIP_CRC)) for (i = 0; i < d->run_threads; i++) *d->crc32 = crc32_le(*d->crc32, d->unc[i], *d->unc_len[i]); Loading Loading @@ -1455,7 +1456,8 @@ static int load_image_lzo(struct swap_map_handle *handle, if (!snapshot_image_loaded(snapshot)) ret = -ENODATA; if (!ret) { if (swsusp_header->flags & SF_CRC32_MODE) { if ((swsusp_header->flags & SF_CRC32_MODE) && (!IS_ENABLED(CONFIG_HIBERNATION_SKIP_CRC))) { if(handle->crc32 != swsusp_header->crc32) { printk(KERN_ERR "PM: Invalid image CRC32!\n"); Loading Loading
kernel/power/Kconfig +10 −0 Original line number Diff line number Diff line Loading @@ -94,6 +94,16 @@ config HIBERNATION_IMAGE_REUSE For more details, refer to the description of CONFIG_HIBERNATION for booting without resuming. config HIBERNATION_SKIP_CRC bool "Skip LZO image CRC check" default n depends on HIBERNATION ---help--- Some filesystem devices may have hw based integrity checks. In this scenario, repeating the integrity check in software is unnecessary and wasteful. This config option has no effect if uncompressed hibernation images are used. config ARCH_SAVE_PAGE_KEYS bool Loading
kernel/power/swap.c +6 −4 Original line number Diff line number Diff line Loading @@ -606,6 +606,7 @@ static int crc32_threadfn(void *data) } atomic_set(&d->ready, 0); if (!IS_ENABLED(CONFIG_HIBERNATION_SKIP_CRC)) for (i = 0; i < d->run_threads; i++) *d->crc32 = crc32_le(*d->crc32, d->unc[i], *d->unc_len[i]); Loading Loading @@ -1455,7 +1456,8 @@ static int load_image_lzo(struct swap_map_handle *handle, if (!snapshot_image_loaded(snapshot)) ret = -ENODATA; if (!ret) { if (swsusp_header->flags & SF_CRC32_MODE) { if ((swsusp_header->flags & SF_CRC32_MODE) && (!IS_ENABLED(CONFIG_HIBERNATION_SKIP_CRC))) { if(handle->crc32 != swsusp_header->crc32) { printk(KERN_ERR "PM: Invalid image CRC32!\n"); Loading