Thread (10 messages) 10 messages, 3 authors, 2017-10-25

[PATCH] tpm: Move Linux RNG connection to hwrng

From: Jarkko Sakkinen <hidden>
Date: 2017-10-25 18:58:26
Also in: keyrings, linux-crypto, linux-integrity, lkml

On Wed, Oct 25, 2017 at 08:15:09PM +0530, PrasannaKumar Muralidharan wrote:
quoted
+       if (!IS_ENABLED(CONFIG_HW_RANDOM_TPM))
+               return 0;
Can #ifndef CONFIG_HW_RANDOM_TPM be used instead? That way an if
condition can be avoided.
Nope. There is no reason to avoid the if-condition. Compiler will take
care of it. IS_ENABLED() macro is available just for the purpose Jason
is using it.
quoted
+       char tpm_hwrng_name[64];
+       struct hwrng tpm_hwrng;
+
Can this also be put inside the #ifdef?
Yes. It should be inside #ifdef.

/Jarkko
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help