diff options
author | Vasily Gorbik <gor@linux.ibm.com> | 2019-05-07 16:28:15 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2019-05-08 08:15:52 +0200 |
commit | 7e756f423af808b6571fed3144747db2ef7fa1c5 (patch) | |
tree | 05149366d87dcd557d15d0746a9fba1e5e07d81f /LICENSES | |
parent | 8db16d19111b33bda95f9f0ef02d814d8a49b023 (diff) | |
download | linux-7e756f423af808b6571fed3144747db2ef7fa1c5.tar.gz linux-7e756f423af808b6571fed3144747db2ef7fa1c5.tar.bz2 linux-7e756f423af808b6571fed3144747db2ef7fa1c5.zip |
latent_entropy: avoid build error when plugin cflags are not set
Some architectures set up CFLAGS for linux decompressor phase from
scratch and do not include GCC_PLUGINS_CFLAGS. Since "latent_entropy"
variable declaration is generated by the plugin code itself including
linux/random.h in decompressor code then would cause a build
error. E.g. on s390:
In file included from ./include/linux/net.h:22,
from ./include/linux/skbuff.h:29,
from ./include/linux/if_ether.h:23,
from ./arch/s390/include/asm/diag.h:12,
from arch/s390/boot/startup.c:8:
./include/linux/random.h: In function 'add_latent_entropy':
./include/linux/random.h:26:39: error: 'latent_entropy' undeclared
(first use in this function); did you mean 'add_latent_entropy'?
26 | add_device_randomness((const void *)&latent_entropy,
| ^~~~~~~~~~~~~~
| add_latent_entropy
./include/linux/random.h:26:39: note: each undeclared identifier is
reported only once for each function it appears in
The build error is triggered by commit a80313ff91ab ("s390/kernel:
introduce .dma sections") which made it into 5.2 merge window.
To address that avoid using CONFIG_GCC_PLUGIN_LATENT_ENTROPY in
favour of LATENT_ENTROPY_PLUGIN definition which is defined as a
part of gcc plugins cflags and hence reflect more accurately when gcc
plugin is active. Besides that it is also used for similar purpose in
linux/compiler-gcc.h for latent_entropy attribute definition.
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions