SlideShare a Scribd company logo
1 of 44
Goto Failing, Sharing,
and Scheduling

Try this now: rust-class.org/ssl.html
Plan for Today
Apple’s SSL Bug
Sharing Memory
Scheduling

1
Try this now: rust-class.org/ssl.html

2
3
SSL/TLS Handshake Protocol
Client

Verify Certificate
using KUCA

Hello

Server

KRCA[Server Identity, KUS]

Check identity
matches URL
Generate
random K

EKUS (K)
Secure channel using K

Decrypt
using
KRS
4
SSL/TLS Handshake Protocol
Client

Verify Certificate
using KUCA
Check identity
matches URL
Generate
random K

Hello

Server

KRCA[Server Identity, KUS]

How did client get KUCA?
EKUS (K)
Secure channel using K

Decrypt
using
KRS
5
6
SSL/TLS Handshake Protocol
Client

Verify Certificate
using KUCA

Hello

Server

KRCA[Server Identity, KUS]

Check identity
matches URL
Generate
random K

EKUS (K)
Secure channel using K

Decrypt
using
KRS
7
static OSStatus
SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams,
uint8_t *signature, UInt16 signatureLen)
{
OSStatus
err;
SSLBuffer
hashOut, hashCtx, clientRandom, serverRandom;
uint8_t
hashes[SSL_SHA1_DIGEST_LEN + SSL_MD5_DIGEST_LEN];
SSLBuffer
signedHashes;
uint8_t
*dataToSign;
size_t
dataToSignLen;
signedHashes.data = 0;
hashCtx.data = 0;

Apple’s
Implementation

clientRandom.data = ctx->clientRandom;
clientRandom.length = SSL_CLIENT_SRVR_RAND_SIZE;
serverRandom.data = ctx->serverRandom;
serverRandom.length = SSL_CLIENT_SRVR_RAND_SIZE;

…
hashOut.data = hashes + SSL_MD5_DIGEST_LEN;
hashOut.length = SSL_SHA1_DIGEST_LEN;
if ((err = SSLFreeBuffer(&hashCtx)) != 0)
goto fail;

[Link]
8
static OSStatus SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams,
uint8_t *signature, UInt16 signatureLen)
{
…
if ((err = ReadyHash(&SSLHashSHA1, &hashCtx)) != 0)
goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &clientRandom)) != 0)
goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
goto fail;
goto fail;
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
goto fail;

Apple’s Implementation
(cleaned up and excerpted)

err = sslRawVerify(ctx, ctx->peerPubKey, dataToSign, dataToSignLen, signature, signatureLen);
if(err) {
sslErrorLog("SSLDecodeSignedServerKeyExchange: sslRawVerify returned %dn", (int)err);
goto fail;
}
fail:
SSLFreeBuffer(&signedHashes);
SSLFreeBuffer(&hashCtx);
return err;
}

9
…
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
goto fail;
goto fail;
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
goto fail;
err = sslRawVerify(ctx, ctx->peerPubKey, dataToSign, dataToSignLen, signature, signatureLen);
if(err) {
sslErrorLog("SSLDecodeSignedServerKeyExchange: sslRawVerify returned %dn", (int)err);
goto fail;
}
fail:
SSLFreeBuffer(&signedHashes);
Apple’s Implementation
SSLFreeBuffer(&hashCtx);
(cleaned up and excerpted)
return err;
}
10
…
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
goto fail;
goto fail;
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
goto fail;

How should these kinds of
mistakes be prevented?

err = sslRawVerify(ctx, ctx->peerPubKey, dataToSign, dataToSignLen,
signature, signatureLen);
if(err) {
sslErrorLog("SSLDecodeSignedServerKeyExchange: sslRawVerify
returned %dn", (int)err);
goto fail;
}
fail:
SSLFreeBuffer(&signedHashes);
SSLFreeBuffer(&hashCtx);
return err;
}

11
12
Theory Excursion
How hard is it for a compiler to
provide unreachable code warnings?

13
Unreachable is Undecidable

14
Unreachable is Undecidable
fn halts(program: &str) {
execute(program);
println!(“Am I unreachable?”);
}
Compilers shouldn’t be constrained by theory!
Goal is to help programmers
Okay for warnings to be unsound and incomplete
(even okay for errors!)
15
My New
Theory of Computation
Book!
16
plug book

A Tragicomic Tale of
Combinatorics and
Computability
for Curious Children of All Ages
Illustrations by
Kim Dylla
Sharing
Memory
in Tasks

18
Tasks

Class 7:

fn spawn(f: proc ())
spawn( proc() {
println(“Get to work!”);
});

Thread
Own PC
Own stack, registers
Safely shared immutable memory
Safely independent own memory

Task = Thread – unsafe memory sharing
or
Task = Process + safe memory sharing – cost of OS process
19
static mut count: uint = 0;

fn update_count() {
unsafe { count += 1; }
}
fn main() {
for _ in range(0u, 10) {
for _ in range(0u, 1000) {
update_count();
}
}
println!("Count: {:}", unsafe { count });
}
20
static mut count: uint = 0;

fn update_count() {
unsafe { count += 1; }
}
fn main() {
for _ in range(0u, 10) {
for _ in range(0u, 1000) {
update_count();
}
}
println!("Count: {:}", unsafe { count });
}

> rustc unsafe1.rs
> ./unsafe1
Count: 10000
> ./unsafe1
Count: 10000
> ./unsafe1
Count: 10000

21
static mut count: uint = 0;
fn update_count() {
unsafe { count += 1; }
}
fn main() {
for _ in range(0u, 10) {
spawn(proc() {
for _ in range(0u, 1000) {
update_count();
}
});
}
println!("Count: {:}", unsafe { count });
}

> rustc unsafe2.rs
> ./unsafe2
Count: 6955
> ./unsafe2
Count: 6473
> ./unsafe2
Count: 6367
> ./unsafe2
Count: 7557

22
static mut count: uint = 0;
fn update_count(id: uint) {
unsafe {
println!("Before update from {:}: {:}", id, count);
count += 1;
println!("After update from {:}: {:}", id, count);
}
}
fn main() {
for id in range(0u, 10) {
spawn(proc() {
for _ in range(0u, 1000) {
update_count(id);
}
});
}
println!("Count: {:}", unsafe { count });
}

23
static mut count: uint = 0;

> ./unsafe3
Before
fn update_count(id: uint) { update from 0: 0
unsafe {
Before update from 1: 0
println!("Before updateupdate from 0: 1
After from {:}: {:}", id, count);
count += 1;
Before update from 0: 1
println!("After update from {:}: {:}", id, count);
After update from 0: 2
}
}
…
After update from 2: 81
fn main() {
Before update from 0: 81
for id in range(0u, 10) {
spawn(proc() { After update from 3: 83
for _ in range(0u, 1000) update from 2: After update from 5: 83
Before {
update_count(id);
83
}
Before update from 3: 84
});
Before update from 6: 22
}
println!("Count: {:}", unsafe { count from 0: 84
After update });
}
…

24
static mut count: uint = 0;
fn update_count(id: uint) {
unsafe {
println!("Before update from {:}: {:}", id, count);
count += 1;
println!("After update from {:}: {:}", id, count);
}
}
fn main() {
for id in range(0u, 10) {
spawn(proc() {
for _ in range(0u, 1000) {
update_count(id);
}
});
}
println!("Count: {:}", unsafe { count });
}

…
Before update from 5: 6977
Before updCount: 6849
After update from 0: 6867
ate from 7: 6977
After update from 8: 6958
…
After update from 1: 9716
Before update from 1: 9716
After update from 1: 9717
Before update from 1: 9717
After update from 1: 9718
>
25
fn update_count() {
unsafe { count += 1; }
}

How atomic is count += 1?

26
unsafe2.s

__ZN12update_count19h86817af0b0797e96al4v0.0E:
.cfi_startproc
cmpq %gs:816, %rsp
ja LBB0_0
rustc -S unsafe2.rs
movabsq $16, %r10
movabsq $0, %r11
callq ___morestack
ret
LBB0_0:
pushq %rbp
Ltmp2:
.cfi_def_cfa_offset 16
Ltmp3:
.cfi_offset %rbp, -16
movq %rsp, %rbp
Ltmp4:
…

27
unsafe2.s
Ltmp4:
.cfi_def_cfa_register %rbp
pushq %rax
movq __ZN5count19hc6afed277fb1b6c3ah4v0.0E(%rip), %rax
addq $1, %rax
movq %rax, __ZN5count19hc6afed277fb1b6c3ah4v0.0E(%rip)
movq %rdi, -8(%rbp)
addq $8, %rsp
popq %rbp
ret
.cfi_endproc
28
rustc -O

fn update_count() {
unsafe { count += 1; }
}
fn main() {
for _ in range(0u, 10) {
spawn(proc() {
for _ in range(0u, 1000) {
update_count();
}
});
}
println!("Count: {:}", …);

__ZN4main4anon7expr_fn2agE:
.cfi_startproc
…
pushq %rbp
Ltmp15:
.cfi_def_cfa_offset 16
Ltmp16:
.cfi_offset %rbp, -16
movq %rsp, %rbp
}
Ltmp17:
.cfi_def_cfa_register %rbp
addq $1000, __ZN5count19hc6afed277v0.0E(%rip)
popq %rbp
ret
.cfi_endproc

> rustc unsafe2.rs
> ./unsafe2
Count: 7628
> ./unsafe2
Count: 6672
> rustc -O unsafe2.rs
> ./unsafe2
Count: 10000
> ./unsafe2
Count: 10000
> ./unsafe2
Count: 10000
> ./unsafe2
Count: 10000
> ./unsafe2
Count: 9000
29
ARCs
Automatically
Reference
Counted

extra::arc provides:
Arc
wrapper for shared immutable state
MutexArc
mutable shared state
protected by mutual exclusion
RWArc
mutable shared state
protected by reader-writer lock

30
Creating an RWArc

let counter: RWArc<int> = RWArc::new(0);

31
RWArc write

32
33
|count: &mut int|
fn update_count(counter: RWArc<int>) {
counter.write(|count| { *count += 1; });
}
34
extern mod extra;
use extra::arc::RWArc;

fn update_count(counter: RWArc<int>) {
counter.write(|count| { *count += 1; });
}
fn main() {
let counter: RWArc<int> = RWArc::new(0);
for _ in range(0, 10) {
let ccounter = counter.clone();
spawn(proc() {
for _ in range(0, 1000) { update_count(ccounter.clone()); }
});
}
counter.read(|count| { println!("Count: {:d}", *count); });
}
35
extern mod extra;
use extra::arc::RWArc;

What is the value printed for Count?

fn update_count(counter: RWArc<int>) {
counter.write(|count| { *count += 1; });
}
fn main() {
let counter: RWArc<int> = RWArc::new(0);
for _ in range(0, 10) {
let ccounter = counter.clone();
spawn(proc() {
for _ in range(0, 1000) { update_count(ccounter.clone()); }
});
}

> ./rwarc1
Count: 1139
> ./rwarc1
Count: 1146
> ./rwarc1
Count: 1158

counter.read(|count| { println!("Count: {:d}", *count); });
}
36
fn main() {
let counter: RWArc<int> = RWArc::new(0);
let running: RWArc<int> = RWArc::new(0);
for _ in range(0, 10) {
let ccounter = counter.clone();
running.write(|n| { *n += 1; });
let crunning = running.clone();
spawn(proc() {
for _ in range(0, 100) { update_count(ccounter.clone()); }
crunning.write(|n| { *n -= 1; });
});
}
while running.read(|n| { *n }) > 0 { ; }
counter.read(|count| { println!("Count: {:d}", *count); });
}
37
Scheduling
38
Remember from Class 4:

1. How should the supervisor decide which program to run?
2. How long should the alarm clock be set for?
39
Scheduler
Desiderata

Go placidly amid the noise and haste, and
remember what peace there may be in silence.
As far as possible without surrender be on good
terms with all persons. Speak your truth quietly
and clearly; and listen to others, even the dull
and the ignorant; they too have their story.
Avoid loud and aggressive persons, they are
vexations to the spirit. … Exercise caution in
your business affairs; for the world is full of
trickery. …And whether or not it is clear to
you, no doubt the universe is unfolding as it
should…whatever your labors and
aspirations, in the noisy confusion of life keep
peace with your soul. With all its
sham, drudgery, and broken dreams, it is still a
beautiful world. Be cheerful. Strive to be happy.
Max Ehrmann, “Desiderata” (1927)
40
How well do traffic lights do?

41
How well do traffic lights do?

42
dori-mic.org
“If only I had this book when I was
a young student, I might have
done something useful with my
life like discover a new complexity
class instead of dropping out and
wasting my life flipping
pancakes, playing with basic
blocks, and eradicating polo.”
Gill Bates,
Founder of Mic-Soft Corporation

MiniLEGO [FJNNO 2013]

More Related Content

What's hot

Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyAnne Nicolas
 
Migrating KSM page causes the VM lock up as the KSM page merging list is too ...
Migrating KSM page causes the VM lock up as the KSM page merging list is too ...Migrating KSM page causes the VM lock up as the KSM page merging list is too ...
Migrating KSM page causes the VM lock up as the KSM page merging list is too ...Gavin Guo
 
Crossing into Kernel Space
Crossing into Kernel SpaceCrossing into Kernel Space
Crossing into Kernel SpaceDavid Evans
 
Making a Process
Making a ProcessMaking a Process
Making a ProcessDavid Evans
 
Putting a Fork in Fork (Linux Process and Memory Management)
Putting a Fork in Fork (Linux Process and Memory Management)Putting a Fork in Fork (Linux Process and Memory Management)
Putting a Fork in Fork (Linux Process and Memory Management)David Evans
 
Kernel Recipes 2019 - RCU in 2019 - Joel Fernandes
Kernel Recipes 2019 - RCU in 2019 - Joel FernandesKernel Recipes 2019 - RCU in 2019 - Joel Fernandes
Kernel Recipes 2019 - RCU in 2019 - Joel FernandesAnne Nicolas
 
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이GangSeok Lee
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging RubyAman Gupta
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby SystemsEngine Yard
 
Virtual Memory (Making a Process)
Virtual Memory (Making a Process)Virtual Memory (Making a Process)
Virtual Memory (Making a Process)David Evans
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackKernel TLV
 
How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)Gavin Guo
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Ontico
 
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCsw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCanSecWest
 
Kernel Recipes 2015: Introduction to Kernel Power Management
Kernel Recipes 2015: Introduction to Kernel Power ManagementKernel Recipes 2015: Introduction to Kernel Power Management
Kernel Recipes 2015: Introduction to Kernel Power ManagementAnne Nicolas
 
Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]RootedCON
 
Preparation for mit ose lab4
Preparation for mit ose lab4Preparation for mit ose lab4
Preparation for mit ose lab4Benux Wei
 

What's hot (20)

Storage
StorageStorage
Storage
 
Kernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easyKernel Recipes 2019 - Formal modeling made easy
Kernel Recipes 2019 - Formal modeling made easy
 
Migrating KSM page causes the VM lock up as the KSM page merging list is too ...
Migrating KSM page causes the VM lock up as the KSM page merging list is too ...Migrating KSM page causes the VM lock up as the KSM page merging list is too ...
Migrating KSM page causes the VM lock up as the KSM page merging list is too ...
 
Crossing into Kernel Space
Crossing into Kernel SpaceCrossing into Kernel Space
Crossing into Kernel Space
 
Making a Process
Making a ProcessMaking a Process
Making a Process
 
Putting a Fork in Fork (Linux Process and Memory Management)
Putting a Fork in Fork (Linux Process and Memory Management)Putting a Fork in Fork (Linux Process and Memory Management)
Putting a Fork in Fork (Linux Process and Memory Management)
 
Kernel Recipes 2019 - RCU in 2019 - Joel Fernandes
Kernel Recipes 2019 - RCU in 2019 - Joel FernandesKernel Recipes 2019 - RCU in 2019 - Joel Fernandes
Kernel Recipes 2019 - RCU in 2019 - Joel Fernandes
 
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
[2012 CodeEngn Conference 06] pwn3r - Secuinside 2012 CTF 예선 문제풀이
 
Debugging Ruby
Debugging RubyDebugging Ruby
Debugging Ruby
 
Debugging Ruby Systems
Debugging Ruby SystemsDebugging Ruby Systems
Debugging Ruby Systems
 
Virtual Memory (Making a Process)
Virtual Memory (Making a Process)Virtual Memory (Making a Process)
Virtual Memory (Making a Process)
 
Specializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network StackSpecializing the Data Path - Hooking into the Linux Network Stack
Specializing the Data Path - Hooking into the Linux Network Stack
 
How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)How to use KASAN to debug memory corruption in OpenStack environment- (2)
How to use KASAN to debug memory corruption in OpenStack environment- (2)
 
Scheduling
SchedulingScheduling
Scheduling
 
Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)Performance tweaks and tools for Linux (Joe Damato)
Performance tweaks and tools for Linux (Joe Damato)
 
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacketCsw2016 wheeler barksdale-gruskovnjak-execute_mypacket
Csw2016 wheeler barksdale-gruskovnjak-execute_mypacket
 
Kernel Recipes 2015: Introduction to Kernel Power Management
Kernel Recipes 2015: Introduction to Kernel Power ManagementKernel Recipes 2015: Introduction to Kernel Power Management
Kernel Recipes 2015: Introduction to Kernel Power Management
 
Meltdown & spectre
Meltdown & spectreMeltdown & spectre
Meltdown & spectre
 
Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]Pepe Vila - Cache and Syphilis [rooted2019]
Pepe Vila - Cache and Syphilis [rooted2019]
 
Preparation for mit ose lab4
Preparation for mit ose lab4Preparation for mit ose lab4
Preparation for mit ose lab4
 

Viewers also liked

Invent the Future (Operating Systems in 2029)
Invent the Future (Operating Systems in 2029)Invent the Future (Operating Systems in 2029)
Invent the Future (Operating Systems in 2029)David Evans
 
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...David Evans
 
Once Upon a Process
Once Upon a ProcessOnce Upon a Process
Once Upon a ProcessDavid Evans
 
Inventing the Future
Inventing the FutureInventing the Future
Inventing the FutureDavid Evans
 
Kernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring NaughtKernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring NaughtDavid Evans
 
Class 1: What is an Operating System?
Class 1: What is an Operating System?Class 1: What is an Operating System?
Class 1: What is an Operating System?David Evans
 
Microkernels and Beyond
Microkernels and BeyondMicrokernels and Beyond
Microkernels and BeyondDavid Evans
 
Gash Has No Privileges
Gash Has No PrivilegesGash Has No Privileges
Gash Has No PrivilegesDavid Evans
 
Flash! (Modern File Systems)
Flash! (Modern File Systems)Flash! (Modern File Systems)
Flash! (Modern File Systems)David Evans
 
Zero to a Billion in 4.86 Years (A Whirlwind History of Operating Systems)
Zero to a Billion in 4.86 Years (A Whirlwind History of Operating Systems)Zero to a Billion in 4.86 Years (A Whirlwind History of Operating Systems)
Zero to a Billion in 4.86 Years (A Whirlwind History of Operating Systems)David Evans
 
Operating Systems 1 (7/12) - Threads
Operating Systems 1 (7/12) - ThreadsOperating Systems 1 (7/12) - Threads
Operating Systems 1 (7/12) - ThreadsPeter Tröger
 
Operating System-Threads-Galvin
Operating System-Threads-GalvinOperating System-Threads-Galvin
Operating System-Threads-GalvinSonali Chauhan
 

Viewers also liked (13)

Invent the Future (Operating Systems in 2029)
Invent the Future (Operating Systems in 2029)Invent the Future (Operating Systems in 2029)
Invent the Future (Operating Systems in 2029)
 
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...
Smarter Scheduling (Priorities, Preemptive Priority Scheduling, Lottery and S...
 
Once Upon a Process
Once Upon a ProcessOnce Upon a Process
Once Upon a Process
 
Inventing the Future
Inventing the FutureInventing the Future
Inventing the Future
 
Managing Memory
Managing MemoryManaging Memory
Managing Memory
 
Kernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring NaughtKernel-Level Programming: Entering Ring Naught
Kernel-Level Programming: Entering Ring Naught
 
Class 1: What is an Operating System?
Class 1: What is an Operating System?Class 1: What is an Operating System?
Class 1: What is an Operating System?
 
Microkernels and Beyond
Microkernels and BeyondMicrokernels and Beyond
Microkernels and Beyond
 
Gash Has No Privileges
Gash Has No PrivilegesGash Has No Privileges
Gash Has No Privileges
 
Flash! (Modern File Systems)
Flash! (Modern File Systems)Flash! (Modern File Systems)
Flash! (Modern File Systems)
 
Zero to a Billion in 4.86 Years (A Whirlwind History of Operating Systems)
Zero to a Billion in 4.86 Years (A Whirlwind History of Operating Systems)Zero to a Billion in 4.86 Years (A Whirlwind History of Operating Systems)
Zero to a Billion in 4.86 Years (A Whirlwind History of Operating Systems)
 
Operating Systems 1 (7/12) - Threads
Operating Systems 1 (7/12) - ThreadsOperating Systems 1 (7/12) - Threads
Operating Systems 1 (7/12) - Threads
 
Operating System-Threads-Galvin
Operating System-Threads-GalvinOperating System-Threads-Galvin
Operating System-Threads-Galvin
 

Similar to SSL Failing, Sharing, and Scheduling

Hello, Is That FreeSWITCH? Then We're Coming to Check You!
Hello, Is That FreeSWITCH? Then We're Coming to Check You!Hello, Is That FreeSWITCH? Then We're Coming to Check You!
Hello, Is That FreeSWITCH? Then We're Coming to Check You!PVS-Studio
 
Expert JavaScript tricks of the masters
Expert JavaScript  tricks of the mastersExpert JavaScript  tricks of the masters
Expert JavaScript tricks of the mastersAra Pehlivanian
 
Static analysis and writing C/C++ of high quality code for embedded systems
Static analysis and writing C/C++ of high quality code for embedded systemsStatic analysis and writing C/C++ of high quality code for embedded systems
Static analysis and writing C/C++ of high quality code for embedded systemsAndrey Karpov
 
Aaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security TeamsAaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security Teamscentralohioissa
 
Information security programming in ruby
Information security programming in rubyInformation security programming in ruby
Information security programming in rubyHiroshi Nakamura
 
MongoDB World 2019: Life In Stitch-es
MongoDB World 2019: Life In Stitch-esMongoDB World 2019: Life In Stitch-es
MongoDB World 2019: Life In Stitch-esMongoDB
 
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...OWASP
 
Azure SQL Database - Connectivity Best Practices
Azure SQL Database - Connectivity Best PracticesAzure SQL Database - Connectivity Best Practices
Azure SQL Database - Connectivity Best PracticesJose Manuel Jurado Diaz
 
maxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingmaxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingMax Kleiner
 
Sigfox + Arduino MKRFOX Workshop
Sigfox + Arduino MKRFOX WorkshopSigfox + Arduino MKRFOX Workshop
Sigfox + Arduino MKRFOX WorkshopNicolas Lesconnec
 
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019DevClub_lv
 
Csw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemesCsw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemesCanSecWest
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsFrancois Zaninotto
 
Insecure coding in C (and C++)
Insecure coding in C (and C++)Insecure coding in C (and C++)
Insecure coding in C (and C++)Olve Maudal
 
The Ring programming language version 1.10 book - Part 10 of 212
The Ring programming language version 1.10 book - Part 10 of 212The Ring programming language version 1.10 book - Part 10 of 212
The Ring programming language version 1.10 book - Part 10 of 212Mahmoud Samir Fayed
 

Similar to SSL Failing, Sharing, and Scheduling (20)

Hello, Is That FreeSWITCH? Then We're Coming to Check You!
Hello, Is That FreeSWITCH? Then We're Coming to Check You!Hello, Is That FreeSWITCH? Then We're Coming to Check You!
Hello, Is That FreeSWITCH? Then We're Coming to Check You!
 
Expert JavaScript tricks of the masters
Expert JavaScript  tricks of the mastersExpert JavaScript  tricks of the masters
Expert JavaScript tricks of the masters
 
Static analysis and writing C/C++ of high quality code for embedded systems
Static analysis and writing C/C++ of high quality code for embedded systemsStatic analysis and writing C/C++ of high quality code for embedded systems
Static analysis and writing C/C++ of high quality code for embedded systems
 
Aaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security TeamsAaron Bedra - Effective Software Security Teams
Aaron Bedra - Effective Software Security Teams
 
Pycon - Python for ethical hackers
Pycon - Python for ethical hackers Pycon - Python for ethical hackers
Pycon - Python for ethical hackers
 
Networking Core Concept
Networking Core ConceptNetworking Core Concept
Networking Core Concept
 
Information security programming in ruby
Information security programming in rubyInformation security programming in ruby
Information security programming in ruby
 
MongoDB World 2019: Life In Stitch-es
MongoDB World 2019: Life In Stitch-esMongoDB World 2019: Life In Stitch-es
MongoDB World 2019: Life In Stitch-es
 
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
OWASP Poland Day 2018 - Pedro Fortuna - Are your Java Script based protection...
 
Azure SQL Database - Connectivity Best Practices
Azure SQL Database - Connectivity Best PracticesAzure SQL Database - Connectivity Best Practices
Azure SQL Database - Connectivity Best Practices
 
maxbox starter72 multilanguage coding
maxbox starter72 multilanguage codingmaxbox starter72 multilanguage coding
maxbox starter72 multilanguage coding
 
Sigfox + Arduino MKRFOX Workshop
Sigfox + Arduino MKRFOX WorkshopSigfox + Arduino MKRFOX Workshop
Sigfox + Arduino MKRFOX Workshop
 
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019Managing State in React Apps with RxJS by James Wright at FrontCon 2019
Managing State in React Apps with RxJS by James Wright at FrontCon 2019
 
Marat-Slides
Marat-SlidesMarat-Slides
Marat-Slides
 
3
33
3
 
Csw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemesCsw2016 gawlik bypassing_differentdefenseschemes
Csw2016 gawlik bypassing_differentdefenseschemes
 
Bonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node jsBonnes pratiques de développement avec Node js
Bonnes pratiques de développement avec Node js
 
Insecure coding in C (and C++)
Insecure coding in C (and C++)Insecure coding in C (and C++)
Insecure coding in C (and C++)
 
The Ring programming language version 1.10 book - Part 10 of 212
The Ring programming language version 1.10 book - Part 10 of 212The Ring programming language version 1.10 book - Part 10 of 212
The Ring programming language version 1.10 book - Part 10 of 212
 
Price of an Error
Price of an ErrorPrice of an Error
Price of an Error
 

More from David Evans

Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!David Evans
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksDavid Evans
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeDavid Evans
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in BitcoinDavid Evans
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm ConfirmationsDavid Evans
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting TransactionsDavid Evans
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in ParadiseDavid Evans
 
Mining Economics
Mining EconomicsMining Economics
Mining EconomicsDavid Evans
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More ParanoidDavid Evans
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key SignaturesDavid Evans
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to CryptographyDavid Evans
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?David Evans
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the MassesDavid Evans
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of ReserveDavid Evans
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!David Evans
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinDavid Evans
 

More from David Evans (20)

Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!Cryptocurrency Jeopardy!
Cryptocurrency Jeopardy!
 
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for CypherpunksTrick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
Trick or Treat?: Bitcoin for Non-Believers, Cryptocurrencies for Cypherpunks
 
Hidden Services, Zero Knowledge
Hidden Services, Zero KnowledgeHidden Services, Zero Knowledge
Hidden Services, Zero Knowledge
 
Anonymity in Bitcoin
Anonymity in BitcoinAnonymity in Bitcoin
Anonymity in Bitcoin
 
Midterm Confirmations
Midterm ConfirmationsMidterm Confirmations
Midterm Confirmations
 
Scripting Transactions
Scripting TransactionsScripting Transactions
Scripting Transactions
 
How to Live in Paradise
How to Live in ParadiseHow to Live in Paradise
How to Live in Paradise
 
Bitcoin Script
Bitcoin ScriptBitcoin Script
Bitcoin Script
 
Mining Economics
Mining EconomicsMining Economics
Mining Economics
 
Mining
MiningMining
Mining
 
The Blockchain
The BlockchainThe Blockchain
The Blockchain
 
Becoming More Paranoid
Becoming More ParanoidBecoming More Paranoid
Becoming More Paranoid
 
Asymmetric Key Signatures
Asymmetric Key SignaturesAsymmetric Key Signatures
Asymmetric Key Signatures
 
Introduction to Cryptography
Introduction to CryptographyIntroduction to Cryptography
Introduction to Cryptography
 
Class 1: What is Money?
Class 1: What is Money?Class 1: What is Money?
Class 1: What is Money?
 
Multi-Party Computation for the Masses
Multi-Party Computation for the MassesMulti-Party Computation for the Masses
Multi-Party Computation for the Masses
 
Proof of Reserve
Proof of ReserveProof of Reserve
Proof of Reserve
 
Silk Road
Silk RoadSilk Road
Silk Road
 
Blooming Sidechains!
Blooming Sidechains!Blooming Sidechains!
Blooming Sidechains!
 
Useful Proofs of Work, Permacoin
Useful Proofs of Work, PermacoinUseful Proofs of Work, Permacoin
Useful Proofs of Work, Permacoin
 

Recently uploaded

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxSayali Powar
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfSumit Tiwari
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Recently uploaded (20)

SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptxPOINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
POINT- BIOCHEMISTRY SEM 2 ENZYMES UNIT 5.pptx
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdfEnzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
Enzyme, Pharmaceutical Aids, Miscellaneous Last Part of Chapter no 5th.pdf
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 

SSL Failing, Sharing, and Scheduling

  • 1. Goto Failing, Sharing, and Scheduling Try this now: rust-class.org/ssl.html
  • 2. Plan for Today Apple’s SSL Bug Sharing Memory Scheduling 1
  • 3. Try this now: rust-class.org/ssl.html 2
  • 4. 3
  • 5. SSL/TLS Handshake Protocol Client Verify Certificate using KUCA Hello Server KRCA[Server Identity, KUS] Check identity matches URL Generate random K EKUS (K) Secure channel using K Decrypt using KRS 4
  • 6. SSL/TLS Handshake Protocol Client Verify Certificate using KUCA Check identity matches URL Generate random K Hello Server KRCA[Server Identity, KUS] How did client get KUCA? EKUS (K) Secure channel using K Decrypt using KRS 5
  • 7. 6
  • 8. SSL/TLS Handshake Protocol Client Verify Certificate using KUCA Hello Server KRCA[Server Identity, KUS] Check identity matches URL Generate random K EKUS (K) Secure channel using K Decrypt using KRS 7
  • 9. static OSStatus SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams, uint8_t *signature, UInt16 signatureLen) { OSStatus err; SSLBuffer hashOut, hashCtx, clientRandom, serverRandom; uint8_t hashes[SSL_SHA1_DIGEST_LEN + SSL_MD5_DIGEST_LEN]; SSLBuffer signedHashes; uint8_t *dataToSign; size_t dataToSignLen; signedHashes.data = 0; hashCtx.data = 0; Apple’s Implementation clientRandom.data = ctx->clientRandom; clientRandom.length = SSL_CLIENT_SRVR_RAND_SIZE; serverRandom.data = ctx->serverRandom; serverRandom.length = SSL_CLIENT_SRVR_RAND_SIZE; … hashOut.data = hashes + SSL_MD5_DIGEST_LEN; hashOut.length = SSL_SHA1_DIGEST_LEN; if ((err = SSLFreeBuffer(&hashCtx)) != 0) goto fail; [Link] 8
  • 10. static OSStatus SSLVerifySignedServerKeyExchange(SSLContext *ctx, bool isRsa, SSLBuffer signedParams, uint8_t *signature, UInt16 signatureLen) { … if ((err = ReadyHash(&SSLHashSHA1, &hashCtx)) != 0) goto fail; if ((err = SSLHashSHA1.update(&hashCtx, &clientRandom)) != 0) goto fail; if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0) goto fail; if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) goto fail; goto fail; if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0) goto fail; Apple’s Implementation (cleaned up and excerpted) err = sslRawVerify(ctx, ctx->peerPubKey, dataToSign, dataToSignLen, signature, signatureLen); if(err) { sslErrorLog("SSLDecodeSignedServerKeyExchange: sslRawVerify returned %dn", (int)err); goto fail; } fail: SSLFreeBuffer(&signedHashes); SSLFreeBuffer(&hashCtx); return err; } 9
  • 11. … if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0) goto fail; if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) goto fail; goto fail; if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0) goto fail; err = sslRawVerify(ctx, ctx->peerPubKey, dataToSign, dataToSignLen, signature, signatureLen); if(err) { sslErrorLog("SSLDecodeSignedServerKeyExchange: sslRawVerify returned %dn", (int)err); goto fail; } fail: SSLFreeBuffer(&signedHashes); Apple’s Implementation SSLFreeBuffer(&hashCtx); (cleaned up and excerpted) return err; } 10
  • 12. … if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0) goto fail; if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0) goto fail; goto fail; if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0) goto fail; How should these kinds of mistakes be prevented? err = sslRawVerify(ctx, ctx->peerPubKey, dataToSign, dataToSignLen, signature, signatureLen); if(err) { sslErrorLog("SSLDecodeSignedServerKeyExchange: sslRawVerify returned %dn", (int)err); goto fail; } fail: SSLFreeBuffer(&signedHashes); SSLFreeBuffer(&hashCtx); return err; } 11
  • 13. 12
  • 14. Theory Excursion How hard is it for a compiler to provide unreachable code warnings? 13
  • 16. Unreachable is Undecidable fn halts(program: &str) { execute(program); println!(“Am I unreachable?”); } Compilers shouldn’t be constrained by theory! Goal is to help programmers Okay for warnings to be unsound and incomplete (even okay for errors!) 15
  • 17. My New Theory of Computation Book! 16
  • 18. plug book A Tragicomic Tale of Combinatorics and Computability for Curious Children of All Ages Illustrations by Kim Dylla
  • 20. Tasks Class 7: fn spawn(f: proc ()) spawn( proc() { println(“Get to work!”); }); Thread Own PC Own stack, registers Safely shared immutable memory Safely independent own memory Task = Thread – unsafe memory sharing or Task = Process + safe memory sharing – cost of OS process 19
  • 21. static mut count: uint = 0; fn update_count() { unsafe { count += 1; } } fn main() { for _ in range(0u, 10) { for _ in range(0u, 1000) { update_count(); } } println!("Count: {:}", unsafe { count }); } 20
  • 22. static mut count: uint = 0; fn update_count() { unsafe { count += 1; } } fn main() { for _ in range(0u, 10) { for _ in range(0u, 1000) { update_count(); } } println!("Count: {:}", unsafe { count }); } > rustc unsafe1.rs > ./unsafe1 Count: 10000 > ./unsafe1 Count: 10000 > ./unsafe1 Count: 10000 21
  • 23. static mut count: uint = 0; fn update_count() { unsafe { count += 1; } } fn main() { for _ in range(0u, 10) { spawn(proc() { for _ in range(0u, 1000) { update_count(); } }); } println!("Count: {:}", unsafe { count }); } > rustc unsafe2.rs > ./unsafe2 Count: 6955 > ./unsafe2 Count: 6473 > ./unsafe2 Count: 6367 > ./unsafe2 Count: 7557 22
  • 24. static mut count: uint = 0; fn update_count(id: uint) { unsafe { println!("Before update from {:}: {:}", id, count); count += 1; println!("After update from {:}: {:}", id, count); } } fn main() { for id in range(0u, 10) { spawn(proc() { for _ in range(0u, 1000) { update_count(id); } }); } println!("Count: {:}", unsafe { count }); } 23
  • 25. static mut count: uint = 0; > ./unsafe3 Before fn update_count(id: uint) { update from 0: 0 unsafe { Before update from 1: 0 println!("Before updateupdate from 0: 1 After from {:}: {:}", id, count); count += 1; Before update from 0: 1 println!("After update from {:}: {:}", id, count); After update from 0: 2 } } … After update from 2: 81 fn main() { Before update from 0: 81 for id in range(0u, 10) { spawn(proc() { After update from 3: 83 for _ in range(0u, 1000) update from 2: After update from 5: 83 Before { update_count(id); 83 } Before update from 3: 84 }); Before update from 6: 22 } println!("Count: {:}", unsafe { count from 0: 84 After update }); } … 24
  • 26. static mut count: uint = 0; fn update_count(id: uint) { unsafe { println!("Before update from {:}: {:}", id, count); count += 1; println!("After update from {:}: {:}", id, count); } } fn main() { for id in range(0u, 10) { spawn(proc() { for _ in range(0u, 1000) { update_count(id); } }); } println!("Count: {:}", unsafe { count }); } … Before update from 5: 6977 Before updCount: 6849 After update from 0: 6867 ate from 7: 6977 After update from 8: 6958 … After update from 1: 9716 Before update from 1: 9716 After update from 1: 9717 Before update from 1: 9717 After update from 1: 9718 > 25
  • 27. fn update_count() { unsafe { count += 1; } } How atomic is count += 1? 26
  • 28. unsafe2.s __ZN12update_count19h86817af0b0797e96al4v0.0E: .cfi_startproc cmpq %gs:816, %rsp ja LBB0_0 rustc -S unsafe2.rs movabsq $16, %r10 movabsq $0, %r11 callq ___morestack ret LBB0_0: pushq %rbp Ltmp2: .cfi_def_cfa_offset 16 Ltmp3: .cfi_offset %rbp, -16 movq %rsp, %rbp Ltmp4: … 27
  • 29. unsafe2.s Ltmp4: .cfi_def_cfa_register %rbp pushq %rax movq __ZN5count19hc6afed277fb1b6c3ah4v0.0E(%rip), %rax addq $1, %rax movq %rax, __ZN5count19hc6afed277fb1b6c3ah4v0.0E(%rip) movq %rdi, -8(%rbp) addq $8, %rsp popq %rbp ret .cfi_endproc 28
  • 30. rustc -O fn update_count() { unsafe { count += 1; } } fn main() { for _ in range(0u, 10) { spawn(proc() { for _ in range(0u, 1000) { update_count(); } }); } println!("Count: {:}", …); __ZN4main4anon7expr_fn2agE: .cfi_startproc … pushq %rbp Ltmp15: .cfi_def_cfa_offset 16 Ltmp16: .cfi_offset %rbp, -16 movq %rsp, %rbp } Ltmp17: .cfi_def_cfa_register %rbp addq $1000, __ZN5count19hc6afed277v0.0E(%rip) popq %rbp ret .cfi_endproc > rustc unsafe2.rs > ./unsafe2 Count: 7628 > ./unsafe2 Count: 6672 > rustc -O unsafe2.rs > ./unsafe2 Count: 10000 > ./unsafe2 Count: 10000 > ./unsafe2 Count: 10000 > ./unsafe2 Count: 10000 > ./unsafe2 Count: 9000 29
  • 31. ARCs Automatically Reference Counted extra::arc provides: Arc wrapper for shared immutable state MutexArc mutable shared state protected by mutual exclusion RWArc mutable shared state protected by reader-writer lock 30
  • 32. Creating an RWArc let counter: RWArc<int> = RWArc::new(0); 31
  • 34. 33
  • 35. |count: &mut int| fn update_count(counter: RWArc<int>) { counter.write(|count| { *count += 1; }); } 34
  • 36. extern mod extra; use extra::arc::RWArc; fn update_count(counter: RWArc<int>) { counter.write(|count| { *count += 1; }); } fn main() { let counter: RWArc<int> = RWArc::new(0); for _ in range(0, 10) { let ccounter = counter.clone(); spawn(proc() { for _ in range(0, 1000) { update_count(ccounter.clone()); } }); } counter.read(|count| { println!("Count: {:d}", *count); }); } 35
  • 37. extern mod extra; use extra::arc::RWArc; What is the value printed for Count? fn update_count(counter: RWArc<int>) { counter.write(|count| { *count += 1; }); } fn main() { let counter: RWArc<int> = RWArc::new(0); for _ in range(0, 10) { let ccounter = counter.clone(); spawn(proc() { for _ in range(0, 1000) { update_count(ccounter.clone()); } }); } > ./rwarc1 Count: 1139 > ./rwarc1 Count: 1146 > ./rwarc1 Count: 1158 counter.read(|count| { println!("Count: {:d}", *count); }); } 36
  • 38. fn main() { let counter: RWArc<int> = RWArc::new(0); let running: RWArc<int> = RWArc::new(0); for _ in range(0, 10) { let ccounter = counter.clone(); running.write(|n| { *n += 1; }); let crunning = running.clone(); spawn(proc() { for _ in range(0, 100) { update_count(ccounter.clone()); } crunning.write(|n| { *n -= 1; }); }); } while running.read(|n| { *n }) > 0 { ; } counter.read(|count| { println!("Count: {:d}", *count); }); } 37
  • 40. Remember from Class 4: 1. How should the supervisor decide which program to run? 2. How long should the alarm clock be set for? 39
  • 41. Scheduler Desiderata Go placidly amid the noise and haste, and remember what peace there may be in silence. As far as possible without surrender be on good terms with all persons. Speak your truth quietly and clearly; and listen to others, even the dull and the ignorant; they too have their story. Avoid loud and aggressive persons, they are vexations to the spirit. … Exercise caution in your business affairs; for the world is full of trickery. …And whether or not it is clear to you, no doubt the universe is unfolding as it should…whatever your labors and aspirations, in the noisy confusion of life keep peace with your soul. With all its sham, drudgery, and broken dreams, it is still a beautiful world. Be cheerful. Strive to be happy. Max Ehrmann, “Desiderata” (1927) 40
  • 42. How well do traffic lights do? 41
  • 43. How well do traffic lights do? 42
  • 44. dori-mic.org “If only I had this book when I was a young student, I might have done something useful with my life like discover a new complexity class instead of dropping out and wasting my life flipping pancakes, playing with basic blocks, and eradicating polo.” Gill Bates, Founder of Mic-Soft Corporation MiniLEGO [FJNNO 2013]