RDRAND issue

By: Linus Torvalds (torvalds.delete@this.linux-foundation.org), August 11, 2019 12:13 pm
Room: Moderated Discussions
@never_released (none.delete@this.none.none) on August 11, 2019 11:10 am wrote:
>
> Why does the kernel rely on RDRAND instead of Intel ME/TXE or AMD PSP or maybe even a TPM
> in those cases? What are the advantages of having RNG instructions right into a processor
> instead of them being available as a coprocessor or a separate device as they should be?

Performance.

Performance matters. A lot.

TPM is a joke, plus why should you trust TPM in the first place, when we know there are broken implementations? Going over a slow bus to get a random number from an untrusted entity is beyond garbage.

Intel ME is another joke - known broken backdoors, undocumented, not architected. Why would you want to use that? People literally try to disable those things because they don't trust them.

Just say no.

If you want external chips doing external security, pick an actual external vendor you trust (and have a reason to trust), and work with that. Not that people really do (they do exist, but people who have trust issues tend to want to not have external random numbers, but external key generation and validation, eg yubikey or similar).

But if what you need is real random numbers, you often need a lot of them, and going over a bus is much much too slow. If you have to go outside the CPU, you'll just have to generate your own instead, and use the insanely slow (and generally not very standardized or widely available) external hardware only to fill your internal pool in order to then do everything else in software.

And whenever you do that, you are just fooling yourself if you think you're "more secure" by going to that external entity.

So an actually architected rdrand instruction is very much the right thing to do. But you'd wish that the CPU vendors had verified it better. Intel apparently did do a good job. Nobody has shown any patterns in their rdrand implementation, and it's been available for a longish while.

But again: the lack of verification on the part of one CPU vendor doesn't mean that anything else is any better. Just google the Infineon TPM key fiasco.

I'd rather trust a documented and architected instruction in a common CPU architecture than the complete random external hardware that may or may not be available, and that is guaranteed to be slow.

Look how quickly this particular AMD bug got caught. Then go look how long it took to notice the Infineon TPM bug... Specialized hardware is usually objectively worse in just about every possible way.

Linus
< Previous Post in ThreadNext Post in Thread >
TopicPosted ByDate
EPYC SAP-SD 2-tier benchmark resultsMichael S2019/08/08 04:18 AM
  EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownMichael S2019/08/08 07:29 AM
    Wrong headline. Should be "SPECpower_ssj2008 - EPYC2 is in class of its own" (NT)Michael S2019/08/08 07:51 AM
    EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownAlberto2019/08/08 02:42 PM
      EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownblue2019/08/08 06:35 PM
      EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownMaynard Handley2019/08/08 07:58 PM
        EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownanon2019/08/09 01:00 AM
          EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownAlberto2019/08/09 02:09 AM
            EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownblue2019/08/09 07:47 AM
        EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownAlberto2019/08/09 01:12 AM
          EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownMaynard Handley2019/08/09 08:25 AM
            EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownDoug S2019/08/09 08:33 AM
              EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownanon2019/08/09 09:24 AM
            EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownAlberto2019/08/10 03:04 AM
          EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownanon.12019/08/09 04:30 PM
        EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownme2019/08/09 08:58 PM
      EPYC SAP-SD 2-tier benchmark results - EPYC2 is in class of its ownanon2019/08/08 11:47 PM
  EPYC SAP-SD 2-tier benchmark resultsLinus Torvalds2019/08/09 02:29 PM
    EPYC SAP-SD 2-tier benchmark resultsanon2019/08/10 06:20 AM
      EPYC SAP-SD 2-tier benchmark resultsme2019/08/10 06:36 AM
        EPYC SAP-SD 2-tier benchmark resultsanon2019/08/10 07:20 AM
          EPYC SAP-SD 2-tier benchmark resultsanon.12019/08/10 08:40 AM
            EPYC SAP-SD 2-tier benchmark resultsanon2019/08/10 09:38 AM
          EPYC SAP-SD 2-tier benchmark resultsblue2019/08/10 08:47 AM
        EPYC SAP-SD 2-tier benchmark resultsAdrian2019/08/10 09:43 AM
          EPYC SAP-SD 2-tier benchmark resultsme2019/08/10 10:06 AM
            EPYC SAP-SD 2-tier benchmark resultsMichael S2019/08/10 10:28 AM
    Big gotchas: poor specsjohn2019/08/10 09:54 AM
      Big gotchas: poor specsme2019/08/10 10:04 AM
      Big gotchas: poor specsanon2019/08/10 10:25 AM
        Big gotchas: poor specsLinus Torvalds2019/08/10 11:13 AM
          Big gotchas: poor specsanon2019/08/10 12:58 PM
          Big gotchas: poor caches2019/08/12 12:51 AM
            Big gotchas: poor caches2019/08/12 12:59 AM
            Big gotchas: poor cachesTravis Downs2019/08/12 08:15 AM
              parallelism vs. efficiencyhobold2019/08/13 03:43 AM
            Big gotchas: poor cachesAndy N2019/08/12 05:45 PM
              Big gotchas: poor cachesanon2019/08/12 11:43 PM
          Big gotchas: poor specsJouni Osmala2019/08/12 09:18 PM
            Big gotchas: poor specsAdrian2019/08/12 10:58 PM
              Kernel compile 25-30s, noise 25-27dBJouni Osmala2019/08/13 03:00 AM
                Quiet and fast workstationsGian-Carlo Pascutto2019/08/13 05:00 AM
                  Quiet and fast workstationsAdrian2019/08/13 06:01 AM
                  Quiet and fast workstationsDavid Hess2019/08/13 12:51 PM
                    Quiet and fast workstationsGian-Carlo Pascutto2019/08/13 11:43 PM
                      Quiet and fast workstationsMichael S2019/08/14 01:09 AM
                        Quiet and fast workstationsGian-Carlo Pascutto2019/08/14 01:59 AM
                          Quiet and fast workstationsDavid Hess2019/08/14 05:05 PM
                        Quiet and fast workstationsDavid Hess2019/08/14 04:56 PM
                      Quiet and fast workstationsDavid Hess2019/08/14 05:30 PM
                  Passively cooled threadripper/xeon WJouni Osmala2019/08/15 02:12 AM
                    Passively cooled threadripper/xeon WAdrian2019/08/15 02:47 AM
                      Passively cooled threadripper/xeon WJouni Osmala2019/08/15 04:58 AM
                        Passively cooled threadripper/xeon WAdrian2019/08/15 11:12 PM
                          Passively cooled threadripper/xeon WAdrian2019/08/15 11:21 PM
                          Passively cooled threadripper/xeon WJouni osmala2019/08/16 08:46 AM
                            Passively cooled threadripper/xeon WGroo2019/08/16 11:07 AM
                Kernel compile 25-30s, noise 25-27dBAdrian2019/08/13 05:39 AM
                Kernel compile 25-30s, noise 25-27dBLinus Torvalds2019/08/13 11:12 AM
                  which graphics card?anonymous22019/08/13 11:52 AM
                    which graphics card?Linus Torvalds2019/08/13 12:12 PM
                  Kernel compile 25-30s, noise 25-27dBDoug S2019/08/13 02:22 PM
                    Kernel compile 25-30s, noise 25-27dBDavid Hess2019/08/14 05:38 PM
                  Kernel compile 25-30s, noise 25-27dBJouni Osmala2019/08/13 11:09 PM
                    AIOsGroo2019/08/14 06:19 AM
                      AIOsGian-Carlo Pascutto2019/08/14 07:52 AM
                        AIOsGroo2019/08/14 08:49 AM
                      AIOsBrett2019/08/14 01:02 PM
                    Kernel compile 25-30s, noise 25-27dBLinus Torvalds2019/08/14 10:10 AM
                  Kernel compile 25-30s, noise 25-27dBGian-Carlo Pascutto2019/08/14 12:33 AM
                    Kernel compile 25-30s, noise 25-27dBAdrian2019/08/14 04:06 AM
                      Kernel compile 25-30s, noise 25-27dBGian-Carlo Pascutto2019/08/14 08:01 AM
                      AMD Bios, etc..Anon2019/08/14 10:39 PM
                        AMD Bios, etc..hobold2019/08/15 06:10 AM
                          AMD Bios, etc..Anon2019/08/15 03:20 PM
                        AMD Bios, etc..Jan Olšan2019/08/15 07:49 AM
                          AMD Bios, etc..Adrian2019/08/15 08:16 AM
                          AMD Bios, etc..Gro2019/08/15 09:57 AM
                        AMD Bios, etc..David Hess2019/08/16 04:39 AM
      Big gotchas: poor specsAdrian2019/08/10 12:28 PM
      Big gotchas: poor specsDummond D. Slow2019/08/10 12:57 PM
        Big gotchas: poor specsanon22019/08/10 11:33 PM
          Big gotchas: poor specsblue2019/08/10 11:57 PM
          Big gotchas: poor specsAdrian2019/08/11 04:41 AM
            Big gotchas: poor specsaaron spink2019/08/12 08:45 AM
              Big gotchas: poor specsFoo_2019/08/12 10:02 AM
              Big gotchas: poor specsTravis Downs2019/08/12 10:26 AM
                Big gotchas: poor specsGabriele Svelto2019/08/13 08:48 AM
                Big gotchas: poor specsaaron spink2019/08/13 06:23 PM
                  Big gotchas: poor specsDoug S2019/08/13 10:15 PM
                    Big gotchas: poor specsGian-Carlo Pascutto2019/08/14 12:35 AM
                    Big gotchas: poor specsaaron spink2019/08/15 04:16 PM
                      Big gotchas: poor specsJouni Osmala2019/08/15 08:03 PM
                        Big gotchas: poor specsaaron spink2019/08/19 03:05 AM
                          Big gotchas: poor specsMichael S2019/08/19 03:37 AM
                            Big gotchas: poor specsRicardo B2019/08/19 04:40 PM
                              Big gotchas: poor specsAaron Spink2019/08/25 01:29 AM
              Big gotchas: poor specsAdrian2019/08/12 10:31 AM
              Big gotchas: poor specsJukka Larja2019/08/13 06:37 AM
              Big gotchas: poor specsLinus Torvalds2019/08/13 10:31 AM
          Big gotchas: poor specsDummond D. Slow2019/08/11 05:23 AM
      FX-9590 > i7-9700KGian-Carlo Pascutto2019/08/12 09:37 AM
    RDRAND issueanonymou52019/08/10 01:52 PM
      RDRAND issueLinus Torvalds2019/08/10 03:15 PM
        RDRAND issueGionatan Danti2019/08/11 12:35 AM
          RDRAND issueLinus Torvalds2019/08/11 09:43 AM
            RDRAND issueLinus Torvalds2019/08/11 10:05 AM
              RDRAND issue@never_released2019/08/11 10:10 AM
                RDRAND issueLinus Torvalds2019/08/11 12:13 PM
                  Err....Groo2019/08/11 05:47 PM
                    Err.... This is a zero content fud posteye roll2019/08/11 07:48 PM
                    Err....Brendan2019/08/11 07:50 PM
                    Err....Jukka Larja2019/08/12 06:38 AM
                  RDRAND issueJose2019/08/12 01:33 AM
              RDRAND issueGionatan Danti2019/08/11 01:12 PM
            RDRAND issueaaron spink2019/08/12 08:18 AM
      RDRAND issuename2019/08/11 08:35 AM
Reply to this Topic
Name:
Email:
Topic:
Body: No Text
How do you spell avocado?