From: "Jason A. Donenfeld" <Jason@zx2c4.com>
To: Diederik de Haas <didi.debian@cknow.org>
Cc: Tom Lendacky <thomas.lendacky@amd.com>,
John Allen <john.allen@amd.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [BUG] Non working HWRNG on AMD Ryzen 5 5500GT
Date: Thu, 15 Aug 2024 14:22:29 +0000 [thread overview]
Message-ID: <Zr4PJYISc_h7cQdW@zx2c4.com> (raw)
In-Reply-To: <D3GJCRNY4KDK.3SPJB5WP8Z7DK@cknow.org>
On Thu, Aug 15, 2024 at 03:56:26PM +0200, Diederik de Haas wrote:
> Found an article [1] which could be relevant and downloaded and ran the
> accompanying test program (written by Jason Donenfeld):
> # ./amd-rdrand-bug
> Your RDRAND() does not have the AMD bug.
> # ./test-rdrand
> RDRAND() = 0x47c993c0
> RDRAND() = 0xec7c697d
> ... (more seemingly random numbers)
> RDRAND() = 0xba858101
RDRAND isn't the same as CCP.
> # dmesg | grep ccp
> [ 5.399853] ccp 0000:07:00.2: ccp: unable to access the device: you might
> be running a broken BIOS.
> [ 5.401031] ccp 0000:07:00.2: tee enabled
> [ 5.401113] ccp 0000:07:00.2: psp enabled
Looks like the kernel reports CCP as broken. As the above RDRAND test
doesn't indicate anything about CCP, I don't see rationale for that
determination to be wrong.
Actual test code is in drivers/crypto/ccp/ccp-dev-v5.c:
/* Find available queues */
qmr = ioread32(ccp->io_regs + Q_MASK_REG);
/*
* Check for a access to the registers. If this read returns
* 0xffffffff, it's likely that the system is running a broken
* BIOS which disallows access to the device. Stop here and fail
* the initialization (but not the load, as the PSP could get * properly initialized). */
if (qmr == 0xffffffff) { dev_notice(dev, "ccp: unable to access the device: you might be running a broken BIOS.\n"); return 1; }
next prev parent reply other threads:[~2024-08-15 14:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-15 13:56 [BUG] Non working HWRNG on AMD Ryzen 5 5500GT Diederik de Haas
2024-08-15 14:16 ` Tom Lendacky
2024-08-15 14:40 ` Diederik de Haas
2024-08-15 14:53 ` Tom Lendacky
2024-08-15 15:22 ` Diederik de Haas
2024-08-15 14:22 ` Jason A. Donenfeld [this message]
2024-08-15 14:56 ` Diederik de Haas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zr4PJYISc_h7cQdW@zx2c4.com \
--to=jason@zx2c4.com \
--cc=davem@davemloft.net \
--cc=didi.debian@cknow.org \
--cc=herbert@gondor.apana.org.au \
--cc=john.allen@amd.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.lendacky@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox