RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1119207 - [rng]qemu-kvm process still can start when specify negative value for max-bytes
Summary: [rng]qemu-kvm process still can start when specify negative value for max-bytes
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: John Snow
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-14 09:24 UTC by Mike Cao
Modified: 2015-11-23 03:37 UTC (History)
10 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.436.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-10-14 07:02:37 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2014:1490 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2014-10-14 01:28:27 UTC

Description Mike Cao 2014-07-14 09:24:58 UTC
Description of problem:


Version-Release number of selected component (if applicable):
2.6.32-478.el6.x86_64
qemu-kvm-0.12.1.2-2.430.el6.x86_64


How reproducible:
100%

Steps to Reproduce:
1.Start VM with -max-byte=-1
CLI:# /usr/libexec/qemu-kvm -name 086RNGBLUE64NQB -enable-kvm -m 6G -smp 4 -uuid d58093ff-d9da-4f75-a648-922e78eac32f -nodefconfig -nodefaults -chardev socket,id=charmonitor,path=/tmp/086RNGBLUE64NQB,server,nowait -mon chardev=charmonitor,id=monitor1,mode=control -rtc base=localtime,driftfix=slew -boot order=cd,menu=on -device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 -drive file=086RNGBLUE64NQB,if=none,id=drive-ide0-0-0,format=raw,serial=mike_cao,cache=none -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -drive file=en_windows_8_1_enterprise_x64_dvd_2971902.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -drive file=086RNGBLUE64NQB.vfd,if=none,id=drive-fdc0-0-0,format=raw,cache=none -global isa-fdc.driveA=drive-fdc0-0-0 -netdev tap,script=/etc/qemu-ifup,downscript=no,id=hostnet0 -device rtl8139,netdev=hostnet0,id=net0,mac=00:52:42:0f:05:69,bus=pci.0,addr=0x3 -chardev pty,id=charserial0 -device isa-serial,chardev=charserial0,id=isa_serial0 -device usb-tablet,id=input0 -vnc 0.0.0.0:0 -vga cirrus -object rng-random,filename=/dev/urandom,id=rng0 -device virtio-rng-pci,rng=rng0,id=device-rng0,max-bytes=-100,period=1 -monitor stdio
2.(qemu)info qtree  (so such commands on qmp)


Actual results:
      dev: virtio-rng-pci, id "device-rng0"
        dev-prop: indirect_desc = on
        dev-prop: event_idx = on
        dev-prop: rng = "rng0"
        dev-prop: max-bytes = 18446744073709551516


Expected results:
   qemu-kvm process shouldn't boot up 

Additional info:
specify negative number for period eg period=-1 ,qemu-kvm can not start

Comment 2 Ademar Reis 2014-07-14 21:53:25 UTC
and upstream apparently crashes with assert(vrng->conf.max_bytes <= (9223372036854775807L))

Feel free to fix it upstream and close this as WONTFIX for RHEL6.

Comment 3 John Snow 2014-07-15 16:13:17 UTC
Submitted upstream, but awaiting merge. http://lists.gnu.org/archive/html/qemu-devel/2014-07/msg02348.html

Comment 4 John Snow 2014-07-23 20:29:01 UTC
Accepted upstream http://git.qemu.org/?p=qemu.git;a=commit;h=713e8a102222b6b8ca65050d13b287f5705831b0

backported and posted to rhvirt-patches.

Comment 5 John Snow 2014-07-29 17:35:20 UTC
Fixing another issue upstream first before resubmitting.

Comment 8 Jeff Nelson 2014-08-07 19:49:42 UTC
Fix included in qemu-kvm-0.12.1.2-2.436.el6

Comment 10 Shaolong Hu 2014-08-14 06:31:09 UTC
Reproduced on qemu-kvm-0.12.1.2-2.435.el6.x86_64:

boot guest with:
-device virtio-rng-pci,rng=rng0,id=device-rng0,max-bytes=-100,period=1

(qemu) info qtree
bus: main-system-bus
  type System
  dev: i440FX-pcihost, id ""
    bus: pci.0
      type PCI
      dev: virtio-rng-pci, id "device-rng0"
        dev-prop: indirect_desc = on
        dev-prop: event_idx = on
        dev-prop: rng = "rng0"
        dev-prop: max-bytes = 18446744073709551516
        dev-prop: period = 1
        bus-prop: addr = 06.0
        bus-prop: romfile = <null>
        bus-prop: rombar = 1
        bus-prop: multifunction = off
        class Class 00ff, addr 00:06.0, pci id 1af4:1005 (sub 1af4:0004)
        bar 0: i/o at 0xc100 [0xc11f]


Verified on qemu-kvm-0.12.1.2-2.436.el6.x86_64:

boot guest with:
-device virtio-rng-pci,rng=rng0,id=device-rng0,max-bytes=-100,period=1

qemu-kvm prompts error and exits:

qemu-kvm: -device virtio-rng-pci,rng=rng0,id=device-rng0,max-bytes=-100,period=1: Parameter 'max-bytes' expects a non-negative integer below 2^63
qemu-kvm: -device virtio-rng-pci,rng=rng0,id=device-rng0,max-bytes=-100,period=1: Device 'virtio-rng-pci' could not be initialized

Comment 11 errata-xmlrpc 2014-10-14 07:02:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1490.html


Note You need to log in before you can comment on or make changes to this bug.