au-ts / sddf

A collection of interfaces, libraries and tools for writing device drivers for seL4 that allow accessing devices securely and with low overhead.
Other
17 stars 14 forks source link

Fix cache bug #186

Closed Ivan-Velickovic closed 1 month ago

Ivan-Velickovic commented 1 month ago

These functions were copy-and-pasted from the seL4 kernel where they are intended to be inclusive ranges, this is not the case for us though. We want to clean the cache up to the value of end.

Bug noticed by @midnightveil because the block virtualiser does cache clean on a single data region and hence the last virtual address would have been memory that the virtualiser does not have.

I suspect this issue hasn't occurred before because we have contiguous memory and so the last virtual address would have just overlapped with another region of memory. I need to double check this though.

Closes https://github.com/au-ts/sddf/issues/182.

Ivan-Velickovic commented 1 month ago

I suspect this issue hasn't occurred before because we have contiguous memory and so the last virtual address would have just overlapped with another region of memory. I need to double check this though.

It looks like in the echo server case at least, we only use about 1MB of the data region which has a size of 2MB, which is why this hasn't happened before.