Skip to contentSkip to conversation

#pragma GCC warnings (was: Re: [PATCH] crypto: drbg - use pragmas for disabling optimization)

PATCH Applied Geert Uytterhoeven 4 participants 13 messages Jun 23, 2015 – Jun 25, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw
Quoted 11 lines · Guenter Roeck
Quoted 9 lines · Stephan Mueller

---8<---
Replace the global -O0 compiler flag from the Makefile with GCC pragmas to mark only the functions required to be compiled without optimizations.

This patch also adds a comment describing the rationale for the functions chosen to be compiled without optimizations.

Quoted 7 lines

With openrisc, I get:

CC [M] crypto/jitterentropy.o
crypto/jitterentropy.c:266:9: warning: #pragma GCC target is not supported for this machine

which may not be perfect, but is better than a compile error ;-).

I get that too with m68k-linux-gcc-4.6.3 and m68k-linux-gcc-4.9.0.

With m68k-linux-gnu-gcc-4.1, which is still my default cross-compiler due to the good unused warning reporting, I get:

crypto/jitterentropy.c:235: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:236: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:266: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:295: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:296: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:336: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:385: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:386: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:416: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:517: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:518: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:580: warning: ignoring #pragma GCC pop_options

If you want to reproduce with a simple test case, you need -Wall.

Which gcc versions introduced support for these pragmas?

I tried all my cross-compilers from https://www.kernel.org/pub/tools/crosstool/,
and it seems I get warnings for all of them, except for powerpc and x86_64:

/opt/cross/gcc-4.2.4-nolibc/avr32-linux/bin/avr32-linux-gcc :
warning: ignoring #pragma GCC push_options
warning: ignoring #pragma GCC optimize
warning: ignoring #pragma GCC pop_options
/opt/cross/gcc-4.5.1-nolibc/or32-linux/bin/or32-linux-gcc :
warning: #pragma GCC target is not supported for this machine
/opt/cross/gcc-4.6.2-nolibc/tilegx-linux/bin/tilegx-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/alpha-linux/bin/alpha-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas] /opt/cross/gcc-4.6.3-nolibc/am33_2.0-linux/bin/am33_2.0-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas] /opt/cross/gcc-4.6.3-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/bfin-uclinux/bin/bfin-uclinux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas] /opt/cross/gcc-4.6.3-nolibc/crisv32-linux/bin/crisv32-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/frv-linux/bin/frv-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/hppa64-linux/bin/hppa64-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/ia64-linux/bin/ia64-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/m32r-linux/bin/m32r-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/m68k-linux/bin/m68k-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/mips64-linux/bin/mips64-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/s390x-linux/bin/s390x-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/sh4-linux/bin/sh4-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas] /opt/cross/gcc-4.6.3-nolibc/sparc64-linux/bin/sparc64-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
/opt/cross/gcc-4.6.3-nolibc/xtensa-linux/bin/xtensa-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas] /opt/cross/gcc-4.8.0-nolibc/microblaze-linux/bin/microblaze-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.8.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc :
/opt/cross/gcc-4.9.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/alpha-linux/bin/alpha-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/am33_2.0-linux/bin/am33_2.0-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/frv-linux/bin/frv-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/h8300-elf/bin/h8300-elf-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/hppa64-linux/bin/hppa64-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/ia64-linux/bin/ia64-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/m32r-linux/bin/m32r-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/m68k-linux/bin/m68k-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/microblaze-linux/bin/microblaze-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/mips64-linux/bin/mips64-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/powerpc64-linux/bin/powerpc64-linux-gcc :
/opt/cross/gcc-4.9.0-nolibc/ppc64le-linux/bin/ppc64le-linux-gcc :
/opt/cross/gcc-4.9.0-nolibc/s390x-linux/bin/s390x-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/sparc64-linux/bin/sparc64-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^
/opt/cross/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-gcc :
/opt/cross/gcc-4.9.0-nolibc/x86_64-linux/bin/x86_64-linux-x86_64-linux-gcc :
/opt/cross/gcc-4.9.0-nolibc/xtensa-linux/bin/xtensa-linux-gcc :
warning: #pragma GCC target is not supported for this machine
[-Wpragmas]
#pragma GCC pop_options
^

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer
#1 lore raw
Quoted 6 lines · Geert Uytterhoeven

I get that too with m68k-linux-gcc-4.6.3 and m68k-linux-gcc-4.9.0.

With m68k-linux-gnu-gcc-4.1, which is still my default cross-compiler due to the good unused warning reporting, I get:

Quoted 12 lines

crypto/jitterentropy.c:235: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:236: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:266: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:295: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:296: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:336: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:385: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:386: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:416: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:517: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:518: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:580: warning: ignoring #pragma GCC pop_options

Stephan, could you look into moving the relevant functions into its own file which can then be compiled with -O0? Obviously any dependency on kernel header files would have to be hidden using functions outside of this file.

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
#2 lore raw

Am Dienstag, 23. Juni 2015, 17:21:06 schrieb Herbert Xu:

Hi Herbert,

Quoted 19 lines · Geert Uytterhoeven
Quoted 5 lines

I get that too with m68k-linux-gcc-4.6.3 and m68k-linux-gcc-4.9.0.

With m68k-linux-gnu-gcc-4.1, which is still my default cross-compiler due to the good unused warning reporting, I get:

Quoted 12 lines

crypto/jitterentropy.c:235: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:236: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:266: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:295: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:296: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:336: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:385: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:386: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:416: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:517: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:518: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:580: warning: ignoring #pragma GCC pop_options

Quoted 4 lines

Stephan, could you look into moving the relevant functions into its own file which can then be compiled with -O0? Obviously any dependency on kernel header files would have to be hidden using functions outside of this file.

I will look into it.

Thanks

Ciao
Stephan

#3 lore raw
In reply to Herbert Xu

Am Dienstag, 23. Juni 2015, 17:21:06 schrieb Herbert Xu:

Hi Herbert,

Quoted 19 lines · Geert Uytterhoeven
Quoted 5 lines

I get that too with m68k-linux-gcc-4.6.3 and m68k-linux-gcc-4.9.0.

With m68k-linux-gnu-gcc-4.1, which is still my default cross-compiler due to the good unused warning reporting, I get:

Quoted 12 lines

crypto/jitterentropy.c:235: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:236: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:266: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:295: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:296: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:336: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:385: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:386: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:416: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:517: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:518: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:580: warning: ignoring #pragma GCC pop_options

Quoted 4 lines

Stephan, could you look into moving the relevant functions into its own file which can then be compiled with -O0? Obviously any dependency on kernel header files would have to be hidden using functions outside of this file.

I have separated all so far. However, there are two items left where I am not sure about:

- asm/types.h: I need __u64

- linux/bitops.h: I need rol64

Can I safely include both header files or do I have to hide them too. If yes, how would I do that in a way that is satisfactory?

Thanks.

Signature · 2 lines
Ciao
Stephan
#4 lore raw

Hi Stephan,

Quoted 24 lines · Stephan Mueller
Quoted 19 lines · Geert Uytterhoeven
Quoted 5 lines

I get that too with m68k-linux-gcc-4.6.3 and m68k-linux-gcc-4.9.0.

With m68k-linux-gnu-gcc-4.1, which is still my default cross-compiler due to the good unused warning reporting, I get:

Quoted 12 lines

crypto/jitterentropy.c:235: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:236: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:266: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:295: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:296: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:336: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:385: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:386: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:416: warning: ignoring #pragma GCC pop_options crypto/jitterentropy.c:517: warning: ignoring #pragma GCC push_options crypto/jitterentropy.c:518: warning: ignoring #pragma GCC optimize crypto/jitterentropy.c:580: warning: ignoring #pragma GCC pop_options

Quoted 4 lines

Stephan, could you look into moving the relevant functions into its own file which can then be compiled with -O0? Obviously any dependency on kernel header files would have to be hidden using functions outside of this file.

Quoted 4 lines

I have separated all so far. However, there are two items left where I am not sure about:

- asm/types.h: I need __u64

I don't expect any reliance on optimization in <asm/types.h>, as it should just add definitions. However, "__u64" is "unsigned long long" everywhere, so you can just use that.

Quoted 4 lines

- linux/bitops.h: I need rol64

Can I safely include both header files or do I have to hide them too. If yes, how would I do that in a way that is satisfactory?

Either open-code rol64() (it's not that complicated), or add a source file that contains only

        #include <linux/types.h>
        #include <linux/bitops.h>

        __u64 outofline_rol64(__u64 word, unsigned int shift)
        {
                return rol64(word, shift);
        }

and call outofline_rol64() from your code.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#5 lore raw

PATCH 1/1 crypto: jitterentropy - avoid compiler warnings

Hi Geert, Guenter,

may I ask that you check that the following patch compiles without errors or warnings on your systems?

Though, when I test that patch with the AVR32 cross compiler, I get a warning about the code being not relaxable.

Thank you very much.

---8<---
The core of the Jitter RNG is intended to be compiled with -O0. To ensure that the Jitter RNG can be compiled on all architectures, separate out the RNG core into a stand-alone C file that can be compiled with -O0 which does not depend on any kernel include file.

As no kernel includes can be used in the C file implementing the core RNG, any dependencies on kernel code must be extracted.

A second file provides the link to the kernel and the kernel crypto API that can be compiled with the regular compile options of the kernel.

---
 crypto/Makefile              |   4 +-
 crypto/jitterentropy-kcapi.c | 208 ++++++++++++++++++++++++++++++++++++++++++
 crypto/jitterentropy.c       | 213 ++++++++-----------------------------------
 3 files changed, 248 insertions(+), 177 deletions(-)
 create mode 100644 crypto/jitterentropy-kcapi.c
crypto/Makefile +3 -1
index 0077476..a16a7e7 100644
@@ -106,7 +106,9 @@ obj-$(CONFIG_CRYPTO_842) += 842.o
 obj-$(CONFIG_CRYPTO_RNG2) += rng.o
 obj-$(CONFIG_CRYPTO_ANSI_CPRNG) += ansi_cprng.o
 obj-$(CONFIG_CRYPTO_DRBG) += drbg.o
-obj-$(CONFIG_CRYPTO_JITTERENTROPY) += jitterentropy.o
+obj-$(CONFIG_CRYPTO_JITTERENTROPY) += jitterentropy_rng.o
+CFLAGS_jitterentropy.o = -O0
+jitterentropy_rng-y := jitterentropy.o jitterentropy-kcapi.o
 obj-$(CONFIG_CRYPTO_TEST) += tcrypt.o
 obj-$(CONFIG_CRYPTO_GHASH) += ghash-generic.o
 obj-$(CONFIG_CRYPTO_USER_API) += af_alg.o
crypto/jitterentropy-kcapi.c new file +208 -0

208 lines not on this page · raw message

crypto/jitterentropy.c +37 -176

367 lines not on this page · raw message

Signature · 1 line
2.4.3
#6 lore raw

Re: [PATCH] crypto: jitterentropy - avoid compiler warnings

Quoted 4 lines · Stephan Mueller

Hi Geert, Guenter,

may I ask that you check that the following patch compiles without errors or warnings on your systems?

Stephan,

I applied your patch on top of the current mainline (which includes the crypto updates for 4.2) and pushed it into my 'testing' branch. You should be able to see the results in a couple of hours at
http://server.roeck-us.net:8010/builders, in the 'testing' column.

The build system doesn't log warnings, but this should give us an idea if the build passes for all architectures.

I'll have a look myself later and let you know as well.

Guenter

#7 lore raw

Re: [PATCH] crypto: jitterentropy - avoid compiler warnings

Am Dienstag, 23. Juni 2015, 08:31:10 schrieb Guenter Roeck:

Hi Guenter,

Quoted 12 lines · Stephan Mueller
Quoted 4 lines

Hi Geert, Guenter,

may I ask that you check that the following patch compiles without errors or warnings on your systems?

Stephan,

I applied your patch on top of the current mainline (which includes the crypto updates for 4.2) and pushed it into my 'testing' branch. You should be able to see the results in a couple of hours at
http://server.roeck-us.net:8010/builders, in the 'testing' column.

Quoted 4 lines

The build system doesn't log warnings, but this should give us an idea if the build passes for all architectures.

I'll have a look myself later and let you know as well.

Thank you very much!

Ciao
Stephan

#8 lore raw

Re: [PATCH] crypto: jitterentropy - avoid compiler warnings

In reply to Stephan Mueller
Quoted 4 lines · Stephan Mueller

Hi Geert, Guenter,

may I ask that you check that the following patch compiles without errors or warnings on your systems?

No build failures for all architectures.

Guenter

#9 lore raw

Re: [PATCH] crypto: jitterentropy - avoid compiler warnings

Am Dienstag, 23. Juni 2015, 10:41:03 schrieb Guenter Roeck:

Hi Guenter, Geert,

Quoted 6 lines · Stephan Mueller
Quoted 4 lines

Hi Geert, Guenter,

may I ask that you check that the following patch compiles without errors or warnings on your systems?

No build failures for all architectures.

Thank you very much for your help.

Now, if Geert would be so kind and have a check on his OpenRISC to ensure that there are no compiler warnings, I would be happy.

Though, does anybody have any idea what the AVR32 compiler warning about crypto/builtin.o not being relaxable mean and whether that is an issue? Note, when I was compiling AVR32, I saw some of these warnings for other builtin.o too.

Ciao
Stephan

#10 lore raw

Re: [PATCH] crypto: jitterentropy - avoid compiler warnings

Quoted 13 lines · Stephan Mueller

Am Dienstag, 23. Juni 2015, 10:41:03 schrieb Guenter Roeck:

Hi Guenter, Geert,

Quoted 6 lines · Stephan Mueller
Quoted 4 lines

Hi Geert, Guenter,

may I ask that you check that the following patch compiles without errors or warnings on your systems?

No build failures for all architectures.

Thank you very much for your help.

Quoted 8 lines

Now, if Geert would be so kind and have a check on his OpenRISC to ensure that there are no compiler warnings, I would be happy.

Though, does anybody have any idea what the AVR32 compiler warning about crypto/builtin.o not being relaxable mean and whether that is an issue? Note, when I was compiling AVR32, I saw some of these warnings for other builtin.o too.

At least it compiles ;-). I don't think there is anything else we can do.

Guenter

#11 lore raw

Re: [PATCH] crypto: jitterentropy - avoid compiler warnings

In reply to Stephan Mueller

Hi Stephan,

Quoted 12 lines · Stephan Mueller

may I ask that you check that the following patch compiles without errors or warnings on your systems?

Though, when I test that patch with the AVR32 cross compiler, I get a warning about the code being not relaxable.

Thank you very much.

---8<---
The core of the Jitter RNG is intended to be compiled with -O0. To ensure that the Jitter RNG can be compiled on all architectures, separate out the RNG core into a stand-alone C file that can be compiled with -O0 which does not depend on any kernel include file.

Quoted 7 lines

As no kernel includes can be used in the C file implementing the core RNG, any dependencies on kernel code must be extracted.

A second file provides the link to the kernel and the kernel crypto API that can be compiled with the regular compile options of the kernel.

Thanks, the warnings I saw before with m68k-linux-gnu-gcc-4.1.2 are gone.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

maintainer Applied
#12 lore raw

Re: [PATCH] crypto: jitterentropy - avoid compiler warnings

In reply to Stephan Mueller
Quoted 14 lines · Stephan Mueller

Hi Geert, Guenter,

may I ask that you check that the following patch compiles without errors or warnings on your systems?

Though, when I test that patch with the AVR32 cross compiler, I get a warning about the code being not relaxable.

Thank you very much.

---8<---
The core of the Jitter RNG is intended to be compiled with -O0. To ensure that the Jitter RNG can be compiled on all architectures, separate out the RNG core into a stand-alone C file that can be compiled with -O0 which does not depend on any kernel include file.

Quoted 7 lines

As no kernel includes can be used in the C file implementing the core RNG, any dependencies on kernel code must be extracted.

A second file provides the link to the kernel and the kernel crypto API that can be compiled with the regular compile options of the kernel.

Applied.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt