From: Mathieu Desnoyers Date: Tue, 19 Sep 2017 16:16:58 +0000 (-0400) Subject: Fix: mmap: caches aliased on virtual addresses X-Git-Tag: v2.9.4~8 X-Git-Url: http://git.lttng.org/?a=commitdiff_plain;h=90715ba61e3fa66c1bb438138c8716c6e72356f9;hp=90715ba61e3fa66c1bb438138c8716c6e72356f9;p=lttng-modules.git Fix: mmap: caches aliased on virtual addresses Some architectures (e.g. implementations of arm64) implement their caches based on the virtual addresses (rather than physical address). It has the upside of making the cache access faster (no TLB lookup required to access the cache line), but the downside of requiring virtual mappings (e.g. kernel vs user-space) to be aligned on the number of bits used for cache aliasing. Perform dcache flushing for the entire sub-buffer in the get_subbuf operation on those architectures, thus ensuring we don't end up with cache aliasing issues. An alternative approach we could eventually take would be to create a kernel mapping for the ring buffer that is aligned with the user-space mapping. Signed-off-by: Mathieu Desnoyers ---