On 12/13/19 2:39 PM, Dan Aloni wrote:
Do you know if there is something inhibiting usage in e.g. Pixel devices?
Performance impact?
About performance, the gcc RANDSTRUCT implementation also includes a
performance-preserving feature where randomization takes cacheline
boundary into consideration. The Clang implementation is expected to
have this as well. It's a valid concern and definitely garners testing
for anyone enabling the feature.
Just confirming this: the development branch (well I suppose that's
technically the only branch :-) ) for Clang randstruct does already have
this feature -- it will try its hardest to squeeze the fields into cache
lines. It's worth noting however that this algorithm is in its first
iteration with potentially many more to come as people that are much
smarter than me start digging into it and contributing optimizations
while Clang randstruct gets closer and closer to getting merged upstream.
Unfortunately I have not measured or collected any data on the
performance implications of Clang randstruct yet... but that is
something I am interested in doing once we've gotten all of the wrinkles
figured out.
- Connor