[Mesa-dev] [Bug 100073] Shader Disk Cache 32/64 bit detection has a flaw. Missed existence of x32 ABI

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Mar 12 06:33:55 UTC 2017


https://bugs.freedesktop.org/show_bug.cgi?id=100073

oiaohm at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|WONTFIX                     |FIXED

--- Comment #33 from oiaohm at gmail.com ---
(In reply to Timothy Arceri from comment #32)
> As has been stated multiple times 32bit, 64bit, x32, arm, x86 etc are all
> mean nothing in regards to the resulting shader cache entries, you should be
> able to share them across platforms if not then there is a bug.
> 
> The only reason for the 32, ipl-32 and 64 folders was to help keep different
> Mesa versions for 32 vs 64 from causing the cache to be deleted.
> 
> After discussions about another issue it's been decided to move all cache
> entries to a single cache dir and instead use the timestamp (in future maybe
> build-id hash) and gpu id as part of the cache entries sha input.

I would suggest keeping build-id and gpu-id outside the sha value.  Hash
collisions are rare but you can fairly much bet someone will do it at some
point not point salting the hash and altering risk.   Also if have removed a
particular version of mesa from the system for good being able to flush all
cache entries that no longer apply by deleting all the cache entries with that
build-id.  If you have removed a particular gpu for good same with the gpu-id. 
Embedded in the hash will make cleaning cache harder.

Basically make mesa form triplets [build-id]-[gpu-id]-[hash] for platform
sensitive [build-id]-[gpu-id]-[arch]-[hash]

That should cover most cases.   Also having the file-name triplet it could be
possible to have a update tool to update from one build-id to new build-id
cache entries if someone every wants to attempt that.

It is important that everyone learns don't trust timestamps to be unique the
world no longer works that way.

So this fix my worry by completely doing away with split.   Seeing a split I
was thinking some form of shader uniqueness to arch or it was just masking over
a bug that need fixing it turned out to be the case.   So thank you for your
time.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170312/dc0addbf/attachment.html>


More information about the mesa-dev mailing list