linux/fs/pstore
Matteo Croce fd49e03280 pstore: Fix linking when crypto API disabled
When building a kernel with CONFIG_PSTORE=y and CONFIG_CRYPTO not set,
a build error happens:

    ld: fs/pstore/platform.o: in function `pstore_dump':
    platform.c:(.text+0x3f9): undefined reference to `crypto_comp_compress'
    ld: fs/pstore/platform.o: in function `pstore_get_backend_records':
    platform.c:(.text+0x784): undefined reference to `crypto_comp_decompress'

This because some pstore code uses crypto_comp_(de)compress regardless
of the CONFIG_CRYPTO status. Fix it by wrapping the (de)compress usage
by IS_ENABLED(CONFIG_PSTORE_COMPRESS)

Signed-off-by: Matteo Croce <mcroce@linux.microsoft.com>
Link: https://lore.kernel.org/lkml/20200706234045.9516-1-mcroce@linux.microsoft.com
Fixes: cb3bee0369 ("pstore: Use crypto compress API")
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
2020-07-06 19:42:31 -07:00
..
blk.c pstore/blk: Introduce "best_effort" mode 2020-05-31 19:49:01 -07:00
ftrace.c pstore/ftrace: Provide ftrace log merging routine 2020-05-30 10:34:02 -07:00
inode.c pstore: Remove filesystem records when backend is unregistered 2020-05-30 10:34:02 -07:00
internal.h pstore/ftrace: Provide ftrace log merging routine 2020-05-30 10:34:02 -07:00
Kconfig Documentation: Add details for pstore/blk 2020-05-30 10:34:03 -07:00
Makefile pstore/blk: Introduce backend for block devices 2020-05-30 10:34:03 -07:00
platform.c pstore: Fix linking when crypto API disabled 2020-07-06 19:42:31 -07:00
pmsg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
ram_core.c pstore: switch to copy_from_user() 2020-04-23 10:52:48 -04:00
ram.c pstore/ram: Introduce max_reason and convert dump_oops 2020-05-30 10:34:03 -07:00
zone.c pstore/blk: Support non-block storage devices 2020-05-31 19:49:00 -07:00