[libvirt] unchecked malloc+syscall uses
by Jim Meyering
I was looking through recent changes and spotted two potential
NULL-dereferences in this change set:
http://git.et.redhat.com/?p=libvirt.git;a=commitdiff;h=70c01b4c1adea75e9
In src/opennebula/one_client.c:
+ one_client.url=(char *)malloc(64);
+ snprintf(one_client.url, 63, "http://localhost:%d/RPC2", ONED_PORT);
+#else
+ one_client.url=(char *)"http://localhost:2633/RPC2";
+#endif
--
+ file_text=(char *)malloc(size+1);
+ bytes_read=read(file, file_text, size);
+ close(file);
+
+ if(bytes_read==size) {
Perhaps of more immediate concern,
these syscalls are not checked for failure:
+ file=open(template_file, O_RDONLY);
+ size=lseek(file, 0, SEEK_END);
+ lseek(file, 0, SEEK_SET);
and same for the "read" syscall above.
Note, this is just the result of a few minutes cursory review.
15 years, 9 months
[libvirt] More then one pci device possible with libvirt and pci passthrough?
by Mirko Raasch
Hi,
i want to use more then one pci card in my debian guest.
But when i start the guest, the log says:
libvirtd: 15:44:55.459: warning : pciTrySecondaryBusReset:483 : Other
devices on bus with 0000:05:01.0, not doing bus reset
With "/usr/bin/qemu-system-x86_64 -m 512 -name test -hda
/media/vm/test.img -boot c -vnc :2 -k de -pcidevice host=05:01.0
-pcidevice host=05:02.0 -pcidevice host=05:03.0" there seems to be no
problems.
How can i start my guest with three pci devices passed through and libvirt?
My hostdev section in the xml looks like this:
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x05' slot='0x01' function='0x0'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x05' slot='0x02' function='0x0'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x05' slot='0x03' function='0x0'/>
</source>
</hostdev>
Greetings
Mirko
15 years, 9 months
[libvirt] Can't scale XP on remote
by sean darcy
Just starting out with an XP guest on Fedora 11 kvm. I'm using
virt-manager to connect from a laptop.
Server:
kernel-2.6.29.4-167.fc11.x86_64
qemu-*-0.10.50-6.kvm86.fc11.x86_64
libvirt-0.6.4-2.fc11.x86_64
On the laptop:
virt-manager-0.7.0-5.fc11.i586
libvirt-0.6.2-11.fc11.i586
The console comes, and XP runs fine. But, screen is scaled too large
vertically for my laptop screen which is 1280x800. Only with fullscreen
can I see the bottom menu bar. I would have assumed I could change the
size of the screen (even if not the aspect ratio), but I can't.
Am I doing something wrong, or is this just The Way Things Are?
sean
15 years, 9 months
[libvirt] [PATCH 3/5] disk geometry
by Henrik Persson
Reads the disk geometry to be able to align disk partitions on cylinder boundries.
Msdos partition tables really like this stuff.
15 years, 9 months