Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kernel: random: ifdef z_early_boot_rand_get #22851

Merged
merged 1 commit into from
Mar 10, 2020

Conversation

ceolin
Copy link
Member

@ceolin ceolin commented Feb 15, 2020

This function had a to sys_rand_get() even without random source. As Zephyr is
built with linkage garbage collection and this function is called only if
either STACK_CANARIES or STACK_POINTER_RANDOM is enabled and these options
automatically enable a random source.

Signed-off-by: Flavio Ceolin flavio.ceolin@intel.com

@ceolin
Copy link
Member Author

ceolin commented Feb 15, 2020

Fixes #20136

@zephyrbot
Copy link
Collaborator

zephyrbot commented Feb 15, 2020

All checks are passing now.

checkpatch (informational only, not a failure)

-:17: WARNING:LONG_LINE_COMMENT: line over 80 characters
#17: FILE: kernel/init.c:483:
+/* defined(CONFIG_ENTROPY_HAS_DRIVER) || defined(CONFIG_TEST_RANDOM_GENERATOR) */

- total: 0 errors, 1 warnings, 15 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

Your patch has style problems, please review.

NOTE: Ignored message types: AVOID_EXTERNS BRACES CONFIG_EXPERIMENTAL CONST_STRUCT DATE_TIME FILE_PATH_CHANGES MINMAX NETWORKING_BLOCK_COMMENT_STYLE PRINTK_WITHOUT_KERN_LEVEL SPLIT_STRING VOLATILE

NOTE: If any of the errors are false positives, please report
      them to the maintainers.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

Copy link
Member

@stephanosio stephanosio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO, making it #ifdef CONFIG_ENTROPY_GENERATOR would be better as that is really what determines the availability of z_early_boot_rand_get.

kernel/init.c Outdated Show resolved Hide resolved
This function had a to sys_rand_get() even without random source. As
Zephyr is built with linkage garbage collection and this function is
called only if either ENTROPY_HAS_DRIVER or TEST_RANDOM_GENERATOR is
enabled and these options automatically enable a random source.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
@ceolin
Copy link
Member Author

ceolin commented Feb 21, 2020

@stephanosio Can you take a look again ?

@ceolin ceolin added this to the v2.3.0 milestone Mar 6, 2020
@jhedberg jhedberg merged commit 8ae822c into zephyrproject-rtos:master Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants