<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>15360</bug_id>
          
          <creation_ts>2024-01-18 17:41:38 +0000</creation_ts>
          <short_desc>Add a boot-time random number generation (entropy pool) test</short_desc>
          <delta_ts>2025-01-30 16:08:03 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>11</classification_id>
          <classification>Runtime</classification>
          <product>System Startup</product>
          <component>system-startup</component>
          <version>5.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>NEW</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>5.99</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Randy MacLeod">randy.macleod</reporter>
          <assigned_to name="Unassigned">unassigned</assigned_to>
          <cc>kevin.tian</cc>
    
    <cc>scott.murray</cc>
    
    <cc>yoann.congal</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>Don&apos;t know</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>97913</commentid>
    <comment_count>0</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-01-18 17:41:38 +0000</bug_when>
    <thetext>When trying to clean up by moving rng-tools from oe-core to meta-oe, it
became clear that we don&apos;t have a way to confirm that the entropy pool
has sufficient sources of randomness to avoid having getrandom() block for &quot;too long&quot;. This can be a problem, especially at boot time.

rng-tools was brought back into oe-core with the following log:

&gt; Revert this commit since:
&gt;
&gt;  - some systems using oe-core master may still be using kernels from
&gt;    before 5.6 pulled in the rng-tools algorithm, and
&gt;
&gt;  - some hardware platforms may not have a hardware random number generator
&gt;    and could therefore need to run rngd to avoid long boot-time initialization
&gt;    due to a depleted entropy pool.


and this comment from me:

   The additional context that doesn&apos;t belong in the commit log
   is that we talked about this change in the YP bug review meeting
   and decided that we would keep rng-tools in oe-core for 5.0-M2
   for the two reasons given above. If we end up adding a test, as described below,
   we may never move the recipe to meta-oe.


   It seems to me that we need a test that checks if the entropy pool size
   ever falls below a critical threshold for &quot;too long&quot; in the first N seconds of boot time.

   Getting that test written so that: 
    - qemu VMs and
    - real HW with and without /dev/hwrng 

   all pass without the test being too permissive may take some time.


Related email threads:
https://lists.openembedded.org/g/openembedded-core/message/193798
https://lists.openembedded.org/g/openembedded-core/message/193994


Also should we document the test or how we recommend that people test their hardware?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>98030</commentid>
    <comment_count>1</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2024-01-25 15:33:48 +0000</bug_when>
    <thetext>Scott, will you be able to own this bug and add the test.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>100804</commentid>
    <comment_count>2</comment_count>
    <who name="Randy MacLeod">randy.macleod</who>
    <bug_when>2025-01-30 16:06:39 +0000</bug_when>
    <thetext>Bulk move to 5.2-M3.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>