Created attachment 21104 [details] [review] Make libpciaccess rom handling behave better On my system, the "resource"-file for the graphics adapter reports a rom of 0 size, but the "rom"-file is 128k. This leads to rom_size == 0. Intel driver allocates a 64k buffer for read_rom in this case(normally, it allocates rom_size) and read_rom happily overwrites the data after those 64k with the rest of the rom. This does not happen if rom_size is set to 128k and read_rom prevents reading more than advertised(which could still be samller than the size of the rom-file, if the rom-resource line says so). ->cat /sys/bus/pci/devices/0000\:00\:02.0/resource 0x00000000f8100000 0x00000000f81fffff 0x0000000000020204 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x00000000e0000000 0x00000000efffffff 0x000000000002120c 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000001800 0x0000000000001807 0x0000000000020101 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000002 ->ls -l /sys/bus/pci/devices/0000\:00\:02.0/rom -r-------- 1 root root 131072 12. Dez 19:03 /sys/bus/pci/devices/0000:00:02.0/rom
*** Bug 12860 has been marked as a duplicate of this bug. ***
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/lib/libpciaccess/issues/1.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.