[Trustable-distros] "Requirements" for a trustable OS/distro
Paul Sherwood
paul.sherwood at codethink.co.uk
Thu Aug 23 14:06:27 BST 2018
Hi Ben,
thanks for your feedback. Comments inline...
Niall... request to you is at the end of the mail.
On 2018-08-21 13:52, Ben Brewer wrote:
> 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.
Ok but others are possible, and if one was used, we should be able to
test it.
> Is the evidence this would produce meaningful in some way I'm missing?
In the context of establishing a body of evidence to support the
assertion that an OS is trustable, one of the things we would need to do
is show that it does something useful. So I'm taking POSIX as an example
of that. It's not worth much on its own, obviously.
>> 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.
Again, this is just a small part of what's required. I'm only suggesting
its 'slightly' useful, better than nothing. The way to eat an elephant
is one bite at a time... I suggest this as one mouthful.
> 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).
True.
> 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.
Agreed. But now we are aware of these cases, we could try to
trigger/exploit them while running the integrity tests.
> 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.
I'm not proposing that. We should have a separate thread on security
requirements. All I'm starting with here is core functionality
requirements.
> 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.
Totally agree.
>> 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.
Agreed.
Note that you're focusing on the realtime point, but I'm just as
interested in latency guarantees that are within a tolerance. I believe,
but may be wrong, that some workloads are fine with occasional spikes on
latency provided the frequency/magnitudes are known.
> 2. We shouldn't be using a non-realtime operating system.
Again, true.
> 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.
Yes, understood.
> We should expect any highly complex workload to have a simple
> certifiable hard-realtime fail-safe system backing it up.
Yes, but that's outside the scope of the OS itself, which is the
discussion I'm hoping to focus on in this thread. We can start a
separate discussion about watchdogs/failsafes/backups if you think it's
relevant at this point?
> 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.
I don't think I suggested real-time, but some workloads do require that.
My hypothesis at the moment is that
a) there are many workloads requiring a trustable OS
b) a subset of these workloads care about latency, and therefore require
guarantees about latency behaviour
c) and only a subset of thesse require guaranteed real-time response at
all times
I'm proposing that we could establish tests for b) and c). I'd expect to
see failure of the b) tests on non-realtime OS (e.g. using normal Linux
kernel) and/or non-realtime hardware.
> It's a worthy goal, but not something we should expect to be proving
> that we've fully achieved.
Again, just one bite at a time. Once we achieve something (partial)
let's think about how to close the gaps.
> I also think that if we want to refine these requirements, we really
> need a real world use-case to test them against.
Absolutely.
Niall,
you mentioned that you're working on autonomous applications. I wonder
if you could offer some information in public about the use case and any
existing requirements you're aware of?
br
Paul
More information about the Trustable-distros
mailing list