All of lore.kernel.org
 help / color / mirror / Atom feed
* Loss of performance in RDRAND and RDSEED?
@ 2021-01-03  3:55 Jeffrey Walton
  2021-01-03  9:59 ` Jari Ruusu
  0 siblings, 1 reply; 2+ messages in thread
From: Jeffrey Walton @ 2021-01-03  3:55 UTC (permalink / raw)
  To: Linux Crypto Mailing List

Hi Everyone,

I was performing some benchmarking today. On a Skylake Core-i5-6400
machine, and in the past (May 30, 2020), I would see these performance
numbers:

  RDRAND: 67 MB/s, ~38 cpb
  RDSEED: 24 MB/s, ~105 cpb

I ran the same benchmarks today (January 2 2020) and the benchmark
program reported:

  RDRAND: 7 MB/s, ~360 cpb
  RDSEED: 7 MB/s, ~360 cpb

I checked out the same code from the past (May 30, 2020) and the
numbers stayed the same:

  RDRAND: 7 MB/s, ~360 cpb
  RDSEED: 7 MB/s, ~360 cpb

SSE2, SSE4, AVX, AES-NI, SHA-NI, etc are OK.

The hardware is the same, but the OS was upgraded from Fedora 32 to
Fedora 33. The kernel and possibly intel-microcode have changed
between May 2020 and January 2021.

I'm aware of this problem with AMD's RDRAND and RDSEED, but it doesn't
affect Intel machines:
https://bugzilla.kernel.org/show_bug.cgi?id=85911 (so there should not
be any remediations in place).

My question is, is anyone aware of what may be responsible for the
performance loss?

Thanks in advance,

Jeff

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Loss of performance in RDRAND and RDSEED?
  2021-01-03  3:55 Loss of performance in RDRAND and RDSEED? Jeffrey Walton
@ 2021-01-03  9:59 ` Jari Ruusu
  0 siblings, 0 replies; 2+ messages in thread
From: Jari Ruusu @ 2021-01-03  9:59 UTC (permalink / raw)
  To: noloader; +Cc: Linux Crypto Mailing List

Jeffrey Walton wrote:
> The hardware is the same, but the OS was upgraded from Fedora 32 to
> Fedora 33. The kernel and possibly intel-microcode have changed
> between May 2020 and January 2021.
> 
> I'm aware of this problem with AMD's RDRAND and RDSEED, but it doesn't
> affect Intel machines:
> https://bugzilla.kernel.org/show_bug.cgi?id=85911 (so there should not
> be any remediations in place).
> 
> My question is, is anyone aware of what may be responsible for the
> performance loss?

Intel messed up RDRAND security. Microcode fix to avoid data leak includes
getting exclusive lock on some processor internal bus or something like that.
That can be used as DoS tool: run those RDRAND instructions in tight loop,
and all code execution on that CPU does slows down significantly.

https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00320.html

-- 
Jari Ruusu  4096R/8132F189 12D6 4C3A DCDA 0AA4 27BD  ACDF F073 3C80 8132 F189

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-01-03 10:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-03  3:55 Loss of performance in RDRAND and RDSEED? Jeffrey Walton
2021-01-03  9:59 ` Jari Ruusu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.