I would appreciate if everyone stepped back on this.

1. repeatedly reading constant data and shoving it into the kernel
   software RNG is safe.  Such values do not saturate or decrease the
   quality.

2. The kernel software RNG does not require a hardware RNG to be
   available.

3. The people who have these can work on fixing them, but noone else
   actually has any interest.  If you find a way to fix it, bravo.  If
   you don't, there is really on drama because of points 1 and 2 and
   so noone will care.


Paul de Weerd <we...@weirdnet.nl> wrote:

> I wanted to see how this would behave on my APUs.  One gave 0000000,
> another ffffffff consistently.  But then I had this diff in my tree
> and I rebuilt for my workstation.  That has
> 
> cpu0: AMD Ryzen 9 7950X 16-Core Processor, 4500.00 MHz, 19-61-02
> ...
> ccp0 at pci21 dev 0 function 2 "AMD 17h/90h Crypto" rev 0x00
> 
> and it too gives:
> 
> ccp: rng ffffffff
> ccp: rng ffffffff
> ccp: rng ffffffff
> ccp: rng ffffffff
> 
> Is anyone else seeing non-random output from ccp(4) on non-APU
> systems?
> 
> Paul
> 
> On Wed, Apr 19, 2023 at 05:18:11PM +0200, Christian Weisgerber wrote:
> | Christian Weisgerber:
> | 
> | > ccp(4) attaches, so presumably it is used as a source of entropy.
> | > Whether the hardware actually provides random output, I don't know.
> | 
> | I built a kernel with an instrumented driver.  Unfortunately, no
> | entropy is provided:
> | 
> | ccp: rng 00000000
> | ccp: rng 00000000
> | ccp: rng 00000000
> | ccp: rng 00000000
> | ccp: rng 00000000
> | 
> | This is with the lastest firmware:
> | bios0: vendor coreboot version "v4.19.0.1" date 01/31/2023
> | 
> | 
> | Index: dev/ic/ccp.c
> | ===================================================================
> | RCS file: /cvs/src/sys/dev/ic/ccp.c,v
> | retrieving revision 1.3
> | diff -u -p -r1.3 ccp.c
> | --- dev/ic/ccp.c    29 May 2020 04:42:25 -0000      1.3
> | +++ dev/ic/ccp.c    19 Apr 2023 15:12:17 -0000
> | @@ -56,6 +56,7 @@ ccp_rng(void *arg)
> |     trng = bus_space_read_4(sc->sc_iot, sc->sc_ioh, CCP_REG_TRNG);
> |     if (trng != 0)
> |             enqueue_randomness(trng);
> | +   printf("ccp: rng %08x\n", trng);
> |  
> | -   timeout_add_msec(&sc->sc_tick, 100);
> | +   timeout_add_msec(&sc->sc_tick, 5000);
> |  }
> | -- 
> | Christian "naddy" Weisgerber                          na...@mips.inka.de
> | 
> 
> -- 
> >++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
> +++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
>                  http://www.weirdnet.nl/                 
> 

Reply via email to