···1818// take measurements without security checks too so you can see the security overhead
1919//
20202121-== Validation
2222-2323-The first test is a basic scenario as a check to make sure the system is behaving as intended, and
2424-a more expressive test to demonstrate the flexibility of the model. Eventually, I intend to work with
2525-my advisor and peers to form a proof of correctness for the security model, as well
2626-as empirical testing to demonstrate its rigidity.
2727-2828-=== Basic
2929-TBA
3030-== Expressive
3131-TBA
3232-3333-3434-== Micro Benchmarks
3535-Additionally, we have microbenchmarks of core security operations in Twizzler. All
3636-benchmarks were run with a Ryzen 5 2600, with Twizzler virtualized in QEMU. Unfortunately
3737-I ran out of time to perform benchmarks on bare metal, but hope to find
2121+We have microbenchmarks of core security operations in Twizzler. All
2222+benchmarks were run with a Ryzen 5 2600 with 16 gigs of ram, running Ubuntu
2323+22.04, with Twizzler virtualized in QEMU. The storage backend for all created
2424+objects was volatile. Unfortunately I ran out of time to perform benchmarks on
2525+bare metal, but hope to find
3826any discrepencies between virtualized and actual performance in future work.
39274040-=== Kernel
2828+== Kernel
41294242-The kernel benchmarking framework takes a closure ( a block of code we want to benchmark ),
4343-runs it atleast 100 times, and scales the number of iterations to reach 2 seconds of total runtime, and stores
4444-the time it takes for each run. Then it computes the average, and the standard deviation from the timings.
3030+The kernel benchmarking framework takes a closure ( a block of code we want to
3131+benchmark ), runs it atleast 100 times, and scales the number of iterations to
3232+reach 2 seconds of total runtime, storing the time it takes for each run. Then
3333+it computes the average, and the standard deviation from the timings.
45344646-There a couple of things we benchmark inside the kernel, including core cryptographic
4747-operations like signature generation and verification, as well as the total time it takes
4848-to verify a capability.
3535+There are a couple of things we benchmark inside the kernel, including core
3636+cryptographic operations like signature generation and verification, as well as
3737+the time it takes to verify a capability.
49385039#figure(
5140table(
···9584total time taken for the verification of a capability. It's also important to
9685note that this cost of verifying a capability for access is done on the first-page fault, then the kernel uses caching to store the granted permissions and
9786provides those on subsequent page faults into that object. In the future, I hope
9898-to measure the difference between a cached and uncached verification. Secondly,
9999-we only measure verification inside kernel space; as discussed in section 3,
100100-capability creation only takes place in user space.
101101-8787+to measure the difference between a cached and uncached permissions calculation, as well
8888+as how many practical accesses are granted using the cache compared to capability verifications.
10289=== UserSpace
103103-Userspace benchmarks were calculated using rust's built in
9090+Userspace benchmarks were run using rust's built in
10491#link("https://doc.rust-lang.org/cargo/commands/cargo-bench.html")[benchmarking tool].
1059210693In userspace, we benchmark keypair and capability creation, as these operations are core to
···141128to form its signature, which is why it's in the same ballpark as the signature creation we saw earlier.
142129143130The high standard deviation in Keypair objects and Security context creation happens from the
144144-unpredictable time it takes for the kernel to create an object on disk. The reason keypairs
145145-are almost 2x more expensive since they create two separate objects, one for the signing key,
146146-and one for the verifying key.
131131+unpredictable time it takes for the kernel to create an object. The reason keypairs
132132+are almost 2x more expensive because two separate objects are created, one for the signing key,
133133+and one for the verifying key. Performance gains would only be possible from optimizing
134134+how the kernel creates obejcts.