diff options
| author | Matteo Croce <[email protected]> | 2020-07-07 02:37:36 +0000 |
|---|---|---|
| committer | Kees Cook <[email protected]> | 2020-07-07 02:42:31 +0000 |
| commit | fd49e03280e596e54edb93a91bc96170f8e97e4a (patch) | |
| tree | 5194bfae6b3457cc67ec0467528e4cd16912de84 /scripts/gcc-plugins/sancov_plugin.c | |
| parent | Linux 5.8-rc2 (diff) | |
| download | kernel-fd49e03280e596e54edb93a91bc96170f8e97e4a.tar.gz kernel-fd49e03280e596e54edb93a91bc96170f8e97e4a.zip | |
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 <[email protected]>
Link: https://lore.kernel.org/lkml/[email protected]
Fixes: cb3bee0369bc ("pstore: Use crypto compress API")
Cc: [email protected]
Signed-off-by: Kees Cook <[email protected]>
Diffstat (limited to 'scripts/gcc-plugins/sancov_plugin.c')
0 files changed, 0 insertions, 0 deletions
