Bug 19061 - Bad handling of some ROMs when using sysfs
Summary: Bad handling of some ROMs when using sysfs
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Lib/pciaccess (show other bugs)
Version: git
Hardware: All Linux (All)
: high major
Assignee: Xorg Project Team
QA Contact: Xorg Project Team
URL:
Whiteboard: 2011BRB_Reviewed
Keywords:
: 12860 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-12 14:39 UTC by Pierre Willenbrock
Modified: 2018-08-10 20:18 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Make libpciaccess rom handling behave better (1.31 KB, patch)
2008-12-12 14:39 UTC, Pierre Willenbrock
no flags Details | Splinter Review

Description Pierre Willenbrock 2008-12-12 14:39:18 UTC
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
Comment 1 Jeremy Huddleston Sequoia 2011-10-16 16:34:52 UTC
*** Bug 12860 has been marked as a duplicate of this bug. ***
Comment 2 GitLab Migration User 2018-08-10 20:18:29 UTC
-- 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.