[Trustable-distros] "Requirements" for a trustable OS/distro

Ben Brewer ben.brewer at codethink.co.uk
Tue Aug 21 13:52:53 BST 2018


Hey Paul,

Sorry in advance for being a bit negative about some of these points.

On 14/08/18 14:56, Paul Sherwood wrote:
> 1) POSIX compliance
> - if the OS is asserted to be 'POSIX compliant' it MUST pass the POSIX 
> file system test suite (we could and should do some provenance 
> checking to ensure that what can be found on the internet e.g. [1] and 
> [2] represents the actual test suite)

Somewhat agree, but what does this actually mean? In my eyes it means 
using glibc because that's the most heavily tested POSIX library.

Is the evidence this would produce meaningful in some way I'm missing?

> 2) memory integrity
> - generically an OS MUST offer memory to its processes/guests, and 
> MUST ensure the integrity of the memory
>
> - so this leads to the suggestion that we could establish a test which
>   - requests some memory
>   - populates the memory with a known pattern
>   - later interrogates the memory and verifies the pattern
>
> - presumably it would be worthwhile to exercise the test many times, 
> under as much 'stress' of the OS as possible, to verify that integrity 
> is maintained
>
> - for specific use-cases it might make sense to choose a 
> representative or useful allocation of memory (e.g. a video frame 
> buffer for image processing applications), and possibly perform some 
> representative transaction on the result

I agree with this requirement, but I don't think it's all that useful.

Memory integrity is very important, however any credible OS must already 
provide this with a high degree of success since it is required for 
every type of program/application to run correctly (not least server 
applications).

There are cases where memory integrity fails, we see things like 
rowhammer and meltdown/spectre but these are rare hardware specific edge 
cases which are more of a security issue than a generic memory integrity 
one.
If we go down the rabbit hole of trying to prove there are no security 
issues on a massive proprietary chip then I don't see how we're going to 
get anywhere.

In summary; while memory integrity is obviously important, I don't see a 
meaningful way of testing it. We can run memory tests for long periods 
to prove everything is working as expected in the normal use cases, and 
that there aren't regressions.
We should probably do it, but we shouldn't expect it to ever fail.

> 3) realtime performance and/or deterministic latency
> - for some usecases guarantees are required for latency on calls to 
> processes or guests. the guarantees may be fixed or within a tolerance
>
> - again presumably it would be useful to test latency over a long 
> period of time, under various stresses
>
> - Codethink has been doing some work on this in public at [3] - 
> initially our testing has been on Linux-based systems but the test 
> approach should be applicable for other OSes too.

In many cases I don't think this is actually a requirement, but rather a 
quality issue.

If we need real-time performance:
1. We shouldn't be running on complex hardware that's not designed for 
real-time use.
2. We shouldn't be using a non-realtime operating system.

I would argue that any system running on complicated high-end hardware 
is not ever going to be real-time, and that Linux is the most widely 
tested operating system for use in such contexts, we only have to look 
to the server market to see that.

We should expect any highly complex workload to have a simple 
certifiable hard-realtime fail-safe system backing it up.

I think it's worth testing the latency so that we can tell app 
developers the kinds of delays/response they can expect, so that they 
can plan around it. I do not think that we are going to be guaranteeing 
that Linux will run in real-time, or be deterministic.

It's a worthy goal, but not something we should expect to be proving 
that we've fully achieved.

I also think that if we want to refine these requirements, we really 
need a real world use-case to test them against.

Regards,
Ben



More information about the Trustable-distros mailing list