sel4test icon indicating copy to clipboard operation
sel4test copied to clipboard

Add tests for all of the ARM cache operations on all kinds of frame mappings.

Open Ivan-Velickovic opened this issue 1 year ago • 7 comments

This PR aims to add test coverage for https://github.com/seL4/seL4/issues/214. More specifically. it implement tests for the scenarios outlined here: https://github.com/seL4/seL4/issues/214#issuecomment-1558628554.

I have left out testing of VMKernelReadOnly mappings as I believe there is no way to produce this mapping from user-space.

Ivan-Velickovic avatar May 23 '23 09:05 Ivan-Velickovic

One observation is that the kernel doesn't track whether a mapping is cached or uncached. I wouldn't expect the architecture to have a problem with cache maintenance operations on mappings that are uncached, but maybe the seL4 design would wish to block cache maintenance operations on uncached mappings done through the vspace cap?

If seL4 doesn't care and the hardware doesn't care, why bother?

Indanz avatar Jun 20 '23 09:06 Indanz

If seL4 doesn't care and the hardware doesn't care, why bother?

It's not blocking now, but the point is that there could be an ambient authority situation where an uncached mapping implies an authority to manage caches for that mapped region. But you're right its probably a non-issue at this point because seL4 already doesn't care in other ways (ie there's no rights for restricting the ability to map something cached vs uncached).

kent-mcleod avatar Jun 20 '23 23:06 kent-mcleod

@Indanz can you please check if you're now happy with Ivan's changes?

lsf37 avatar Jun 17 '24 05:06 lsf37

While we're expecting the tests to currently fail, it looks to me like some of the operations are returning a different kind of error, e.g. cap lookup fault instead of illegal operation.

lsf37 avatar Jun 17 '24 05:06 lsf37

While we're expecting the tests to currently fail, it looks to me like some of the operations are returning a different kind of error, e.g. cap lookup fault instead of illegal operation.

yea I don't know what's going on. I'll have a look tomorrow.

Ivan-Velickovic avatar Jun 17 '24 06:06 Ivan-Velickovic

(rebased and tweaked under which configs we should expect an error)

lsf37 avatar Jul 03 '24 04:07 lsf37

Now passes on all runs for all boards. We still need to fix up the review comments, though.

lsf37 avatar Jul 03 '24 08:07 lsf37