Bug 253860 - ccp(4) immediately hangs when creating geli device
Summary: ccp(4) immediately hangs when creating geli device
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-26 03:08 UTC by Alan Somers
Modified: 2021-02-26 08:50 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer 2021-02-26 03:08:42 UTC
The ccp(4) driver immediately hangs if I try to use it on a freshly installed 13.3-BETA3 system.  I can load the driver, but it immediately hangs the first time I try to use it, which is by creating a geli device.

> sudo kldload ccp
> sudo mdconfig -a -t swap -s 64m
md0
> sudo geli onetime -e aes-xts -l 256 -s 4096 /dev/md0
<hangs>

In another terminal, dmesg shows that it ccp is indeed being used:
> dmesg
...
ccp0: <AMD CCP-5a> mem 0xfc000000-0xfc0fffff,0xfc1cc000-0xfc1cdfff irq 54 at device 0.2 on pci12
random: registering fast source AMD CCP TRNG
GEOM_ELI: Device md0.eli created.
GEOM_ELI: Encryption: AES-XTS 256
GEOM_ELI:     Crypto: hardware


> uname -a
FreeBSD XXX.YYY 13.0-BETA3 FreeBSD 13.0-BETA3 #0 releng/13.0-n244525-150b4388d3b: Fri Feb 19 04:04:34 UTC 2021     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

> sysctl hw.model
hw.model: AMD Ryzen 3 3200G with Radeon Vega Graphics
Comment 1 Conrad Meyer freebsd_committer 2021-02-26 04:06:07 UTC
I think there is an earlier ccp/geli bug you can dupe this to. I suggest not loading ccp.ko.
Comment 2 Alan Somers freebsd_committer 2021-02-26 04:15:46 UTC
I found an earlier bug about a panic; I didn't find any about a hang.  Should we disable ccp from the GENERIC build?
Comment 3 Conrad Meyer freebsd_committer 2021-02-26 05:01:54 UTC
Sure, let’s disable it.
Comment 4 Andriy Gapon freebsd_committer 2021-02-26 08:50:49 UTC
I can also add that on my Ryzen 3 3200U with Radeon Vega Mobile the hardware looked like it worked but it never generated an interrupt (or, at least, it was never received).  Tested with both our ccp and on Linux (5.6).