pan/decode: Make mapped memory read-only while decoding
authorIcecream95 <ixn@keemail.me>
Mon, 22 Jun 2020 10:49:53 +0000 (22:49 +1200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Jul 2020 02:29:52 +0000 (02:29 +0000)
commitef67218325fa50e52140eed3b626c55336ce8799
treea83ef46af93ed94ab98e8eebce369387d2e49aa4
parentcb5edcd2154cbed69f9dfb0e6321a62a53af30fd
pan/decode: Make mapped memory read-only while decoding

This will help catch any bugs where descriptors are accidentally
modified.

v2: Use a dynarray of ro memory mappings rather than iterating through
    the mmap hash table.

Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5590>
src/panfrost/pandecode/common.c
src/panfrost/pandecode/decode.c
src/panfrost/pandecode/decode.h