When we originally added modifiers support we were, apparently, way more sloppy with our implementations of the core queries than anyone realized. We just dumped out the intel_image_formats table with very little thought to whether or not we actually wanted to support them all. We also didn't bother to really check that the format the client specified in the modifiers query was actually supported. We also, apparently, didn't bother to write any tests whatsoever.
The end result was that a very casual and obvious usage of the queries where you query for supported formats and then walk the list and query for supported modifers would end up doing piles of OOB array reads in ISL and may or may not crash. In the case of Eero's build in his CI system, it instantly crashes the X server when a DRI3 app starts and asks for modifiers. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106642 Jason Ekstrand (7): intel/isl: Add bounds-checking assertions in isl_format_get_layout intel/isl: Add bounds-checking assertions for the format_info table i965/screen: Refactor query_dma_buf_formats i965/screen: Return false for unsupported formats in query_modifiers i965/screen: Don't advertise support for RG formats i965/screen: Use RGBA non-sRGB formats for images i965/screen: Sanity check that all formats we advertise are useable src/intel/isl/isl.h | 32 ++++++---- src/intel/isl/isl_format.c | 24 +++++--- src/mesa/drivers/dri/i965/intel_screen.c | 76 ++++++++++++++++++++---- 3 files changed, 100 insertions(+), 32 deletions(-) -- 2.17.1 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
