1
0
Fork 0
alistair23-linux/fs/pstore
Matteo Croce 17f9ba7229 pstore: Fix linking when crypto API disabled
commit fd49e03280 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-08-19 08:16:27 +02:00
..
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ftrace.c pstore: no need to check return value of debugfs_create functions 2019-07-08 21:04:42 -07:00
inode.c pstore: pstore_ftrace_seq_next should increase position index 2020-04-17 10:50:12 +02:00
internal.h pstore: Centralize init/exit routines 2018-10-22 07:11:58 -07:00
platform.c pstore: Fix linking when crypto API disabled 2020-08-19 08:16:27 +02:00
pmsg.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
ram.c pstore/ram: Regularize prz label allocation lifetime 2020-01-14 20:08:28 +01:00
ram_core.c pstore/ram: Regularize prz label allocation lifetime 2020-01-14 20:08:28 +01:00