Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Feb 2023 12:48:07 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 269823] rand_harvest produces 100%CPU on 1 CPU with virtio_random.ko loaded
Message-ID:  <bug-269823-227-yld7f6GxBZ@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-269823-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-269823-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269823

--- Comment #3 from Mina Gali=C4=87 <freebsd@igalic.co> ---
more info on the hardware, before i try to dive into what's actually going
wrong with the code:

works:

# devinfo -p vtrnd0 -v
vtrnd0 pnpinfo vendor=3D0x00001af4 device=3D0x1005 subvendor=3D0x1af4
device_type=3D0x00000004
 virtio_pci0 pnpinfo vendor=3D0x1af4 device=3D0x1005 subvendor=3D0x1af4
subdevice=3D0x0004 class=3D0x00ff00 at slot=3D2 function=3D0 dbsf=3Dpci0:0:=
2:0
handle=3D\_SB_.PCI0.S10_
 pci0
 pcib0 pnpinfo _HID=3DPNP0A03 _UID=3D1 _CID=3Dnone at handle=3D\_SB_.PCI0
 acpi0
 nexus0

# pciconf -lv | grep -B2 -A1 RNG
virtio_pci0@pci0:0:2:0: class=3D0x00ff00 rev=3D0x00 hdr=3D0x00 vendor=3D0x1=
af4
device=3D0x1005 subvendor=3D0x1af4 subdevice=3D0x0004
    vendor     =3D 'Red Hat, Inc.'
    device     =3D 'Virtio RNG'
    class      =3D old

# sysctl kern.random
kern.random.fortuna.concurrent_read: 1
kern.random.fortuna.minpoolsize: 64
kern.random.rdrand.rdrand_independent_seed: 0
kern.random.use_chacha20_cipher: 1
kern.random.block_seeded_status: 0
kern.random.random_sources: 'VirtIO Entropy Adapter','Intel Secure Key RNG'
kern.random.harvest.mask_symbolic:
PURE_VIRTIO,PURE_RDRAND,[CALLOUT],[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NE=
T_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
kern.random.harvest.mask_bin: 00000010010000000111011111
kern.random.harvest.mask: 590303
kern.random.initial_seeding.disable_bypass_warnings: 0
kern.random.initial_seeding.arc4random_bypassed_before_seeding: 0
kern.random.initial_seeding.read_random_bypassed_before_seeding: 0
kern.random.initial_seeding.bypass_before_seeding: 1


Misbehaves:

# devinfo -p vtrnd0 -v
vtrnd0 pnpinfo vendor=3D0x00001af4 device=3D0x1044 subvendor=3D0x1af4
device_type=3D0x00000004
 virtio_pci1 pnpinfo vendor=3D0x1af4 device=3D0x1044 subvendor=3D0x1af4
subdevice=3D0x1100 class=3D0x00ff00 at slot=3D0 function=3D1 dbsf=3Dpci0:1:=
0:1
 pci1
 pcib1 pnpinfo vendor=3D0x1b36 device=3D0x000c subvendor=3D0x1b36 subdevice=
=3D0x0000
class=3D0x060400 at slot=3D1 function=3D0 dbsf=3Dpci0:0:1:0 handle=3D\_SB_.=
PCI0.S08_
 pci0
 pcib0 pnpinfo _HID=3DPNP0A08 _UID=3D0 _CID=3DPNP0A03 at handle=3D\_SB_.PCI0
 acpi0
 nexus0

# pciconf -lv | grep -B2 -A1 RNG
virtio_pci1@pci0:1:0:1: class=3D0x00ff00 rev=3D0x01 hdr=3D0x00 vendor=3D0x1=
af4
device=3D0x1044 subvendor=3D0x1af4 subdevice=3D0x1100
    vendor     =3D 'Red Hat, Inc.'
    device     =3D 'Virtio RNG'
    class      =3D old

# sysctl kern.random
kern.random.fortuna.concurrent_read: 1
kern.random.fortuna.minpoolsize: 64
kern.random.rdrand.rdrand_independent_seed: 0
kern.random.use_chacha20_cipher: 1
kern.random.block_seeded_status: 0
kern.random.random_sources: 'VirtIO Entropy Adapter','Intel Secure Key RNG'
kern.random.harvest.mask_symbolic:
PURE_VIRTIO,PURE_RDRAND,[CALLOUT],[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NE=
T_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
kern.random.harvest.mask_bin: 00000010010000000111011111
kern.random.harvest.mask: 590303
kern.random.initial_seeding.disable_bypass_warnings: 0
kern.random.initial_seeding.arc4random_bypassed_before_seeding: 0
kern.random.initial_seeding.read_random_bypassed_before_seeding: 0
kern.random.initial_seeding.bypass_before_seeding: 1

The only difference i can see is in the devinfo output.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-269823-227-yld7f6GxBZ>